You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Allow set_custom_mouse_cursor use same cursor(image) with different shapes.
This commit is contained in:
@@ -413,10 +413,6 @@ void InputDefault::set_mouse_position(const Point2 &p_posf) {
|
|||||||
|
|
||||||
mouse_speed_track.update(p_posf - mouse_pos);
|
mouse_speed_track.update(p_posf - mouse_pos);
|
||||||
mouse_pos = p_posf;
|
mouse_pos = p_posf;
|
||||||
if (custom_cursor.is_valid()) {
|
|
||||||
//removed, please insist that we implement hardware cursors
|
|
||||||
// VisualServer::get_singleton()->cursor_set_pos(get_mouse_position());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Point2 InputDefault::get_mouse_position() const {
|
Point2 InputDefault::get_mouse_position() const {
|
||||||
@@ -503,11 +499,6 @@ void InputDefault::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_sh
|
|||||||
if (Engine::get_singleton()->is_editor_hint())
|
if (Engine::get_singleton()->is_editor_hint())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (custom_cursor == p_cursor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
custom_cursor = p_cursor;
|
|
||||||
|
|
||||||
OS::get_singleton()->set_custom_mouse_cursor(p_cursor, (OS::CursorShape)p_shape, p_hotspot);
|
OS::get_singleton()->set_custom_mouse_cursor(p_cursor, (OS::CursorShape)p_shape, p_hotspot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ class InputDefault : public Input {
|
|||||||
SpeedTrack mouse_speed_track;
|
SpeedTrack mouse_speed_track;
|
||||||
Map<int, Joypad> joy_names;
|
Map<int, Joypad> joy_names;
|
||||||
int fallback_mapping;
|
int fallback_mapping;
|
||||||
RES custom_cursor;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum HatMask {
|
enum HatMask {
|
||||||
|
|||||||
Reference in New Issue
Block a user