diff options
Diffstat (limited to 'editor/action_map_editor.cpp')
-rw-r--r-- | editor/action_map_editor.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index b0b79ca069..fe1401bdf9 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -310,7 +310,7 @@ void InputEventConfigurationDialog::_update_input_list() { MouseButton mouse_buttons[9] = { MOUSE_BUTTON_LEFT, MOUSE_BUTTON_RIGHT, MOUSE_BUTTON_MIDDLE, MOUSE_BUTTON_WHEEL_UP, MOUSE_BUTTON_WHEEL_DOWN, MOUSE_BUTTON_WHEEL_LEFT, MOUSE_BUTTON_WHEEL_RIGHT, MOUSE_BUTTON_XBUTTON1, MOUSE_BUTTON_XBUTTON2 }; for (int i = 0; i < 9; i++) { Ref<InputEventMouseButton> mb; - mb.instance(); + mb.instantiate(); mb->set_button_index(mouse_buttons[i]); String desc = get_event_text(mb); @@ -333,8 +333,8 @@ void InputEventConfigurationDialog::_update_input_list() { for (int i = 0; i < JOY_BUTTON_MAX; i++) { Ref<InputEventJoypadButton> joyb; - joyb.instance(); - joyb->set_button_index(i); + joyb.instantiate(); + joyb->set_button_index((JoyButton)i); String desc = get_event_text(joyb); if (!search_term.is_empty() && desc.findn(search_term) == -1) { @@ -358,8 +358,8 @@ void InputEventConfigurationDialog::_update_input_list() { int axis = i / 2; int direction = (i & 1) ? 1 : -1; Ref<InputEventJoypadMotion> joym; - joym.instance(); - joym->set_axis(axis); + joym.instantiate(); + joym->set_axis((JoyAxis)axis); joym->set_axis_value(direction); String desc = get_event_text(joym); @@ -458,7 +458,7 @@ void InputEventConfigurationDialog::_input_list_item_selected() { case InputEventConfigurationDialog::INPUT_KEY: { int kc = selected->get_meta("__keycode"); Ref<InputEventKey> k; - k.instance(); + k.instantiate(); if (physical_key_checkbox->is_pressed()) { k->set_physical_keycode(kc); @@ -481,8 +481,8 @@ void InputEventConfigurationDialog::_input_list_item_selected() { case InputEventConfigurationDialog::INPUT_MOUSE_BUTTON: { int idx = selected->get_meta("__index"); Ref<InputEventMouseButton> mb; - mb.instance(); - mb->set_button_index(idx); + mb.instantiate(); + mb->set_button_index((MouseButton)idx); // Maintain modifier state from checkboxes mb->set_alt_pressed(mod_checkboxes[MOD_ALT]->is_pressed()); mb->set_shift_pressed(mod_checkboxes[MOD_SHIFT]->is_pressed()); @@ -495,7 +495,7 @@ void InputEventConfigurationDialog::_input_list_item_selected() { } break; case InputEventConfigurationDialog::INPUT_JOY_BUTTON: { int idx = selected->get_meta("__index"); - Ref<InputEventJoypadButton> jb = InputEventJoypadButton::create_reference(idx); + Ref<InputEventJoypadButton> jb = InputEventJoypadButton::create_reference((JoyButton)idx); _set_event(jb); } break; case InputEventConfigurationDialog::INPUT_JOY_MOTION: { @@ -503,8 +503,8 @@ void InputEventConfigurationDialog::_input_list_item_selected() { int value = selected->get_meta("__value"); Ref<InputEventJoypadMotion> jm; - jm.instance(); - jm->set_axis(axis); + jm.instantiate(); + jm->set_axis((JoyAxis)axis); jm->set_axis_value(value); _set_event(jm); } break; @@ -1125,9 +1125,9 @@ ActionMapEditor::ActionMapEditor() { action_tree->set_column_title(0, TTR("Action")); action_tree->set_column_title(1, TTR("Deadzone")); action_tree->set_column_expand(1, false); - action_tree->set_column_min_width(1, 80 * EDSCALE); + action_tree->set_column_custom_minimum_width(1, 80 * EDSCALE); action_tree->set_column_expand(2, false); - action_tree->set_column_min_width(2, 50 * EDSCALE); + action_tree->set_column_custom_minimum_width(2, 50 * EDSCALE); action_tree->connect("item_edited", callable_mp(this, &ActionMapEditor::_action_edited)); action_tree->connect("item_activated", callable_mp(this, &ActionMapEditor::_tree_item_activated)); action_tree->connect("button_pressed", callable_mp(this, &ActionMapEditor::_tree_button_pressed)); |