diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/input_default.cpp | 6 | ||||
-rw-r--r-- | main/main.cpp | 1 | ||||
-rw-r--r-- | main/tests/test_gdscript.cpp | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index 65910b34bc..e9f1eeff6a 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -355,7 +355,7 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool Ref<InputEventMouseButton> button_event; button_event.instance(); - button_event->set_device(-1); + button_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE); button_event->set_position(st->get_position()); button_event->set_global_position(st->get_position()); button_event->set_pressed(st->is_pressed()); @@ -384,7 +384,7 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool Ref<InputEventMouseMotion> motion_event; motion_event.instance(); - motion_event->set_device(-1); + motion_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE); motion_event->set_position(sd->get_position()); motion_event->set_global_position(sd->get_position()); motion_event->set_relative(sd->get_relative()); @@ -602,7 +602,7 @@ void InputDefault::ensure_touch_mouse_raised() { Ref<InputEventMouseButton> button_event; button_event.instance(); - button_event->set_device(-1); + button_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE); button_event->set_position(mouse_pos); button_event->set_global_position(mouse_pos); button_event->set_pressed(false); diff --git a/main/main.cpp b/main/main.cpp index 3d72e90f2c..fc9ec3b2d9 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1209,6 +1209,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { GLOBAL_DEF("display/mouse_cursor/custom_image", String()); GLOBAL_DEF("display/mouse_cursor/custom_image_hotspot", Vector2()); + GLOBAL_DEF("display/mouse_cursor/tooltip_position_offset", Point2(10, 10)); ProjectSettings::get_singleton()->set_custom_property_info("display/mouse_cursor/custom_image", PropertyInfo(Variant::STRING, "display/mouse_cursor/custom_image", PROPERTY_HINT_FILE, "*.png,*.webp")); if (String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")) != String()) { diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp index 55e31a18c3..7a711e8cc9 100644 --- a/main/tests/test_gdscript.cpp +++ b/main/tests/test_gdscript.cpp @@ -127,6 +127,7 @@ static String _parser_expr(const GDScriptParser::Node *p_expr) { case GDScriptParser::OperatorNode::OP_PARENT_CALL: txt += "."; + FALLTHROUGH; case GDScriptParser::OperatorNode::OP_CALL: { ERR_FAIL_COND_V(c_node->arguments.size() < 1, ""); @@ -563,7 +564,7 @@ static void _disassemble_class(const Ref<GDScript> &p_class, const Vector<String case GDScriptFunction::OPCODE_OPERATOR: { int op = code[ip + 1]; - txt += "op "; + txt += " op "; String opname = Variant::get_operator_name(Variant::Operator(op)); |