diff options
-rw-r--r-- | core/input/input.cpp | 4 | ||||
-rw-r--r-- | core/input/input.h | 3 | ||||
-rw-r--r-- | doc/classes/Input.xml | 2 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 7 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 3 | ||||
-rw-r--r-- | scene/main/window.cpp | 2 |
6 files changed, 12 insertions, 9 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index 4befdfac58..dbb6bd8d9c 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -1401,8 +1401,8 @@ String Input::get_joy_guid(int p_device) const { return joy_names[p_device].uid; } -Array Input::get_connected_joypads() { - Array ret; +TypedArray<int> Input::get_connected_joypads() { + TypedArray<int> ret; HashMap<int, Joypad>::Iterator elem = joy_names.begin(); while (elem) { if (elem->value.connected) { diff --git a/core/input/input.h b/core/input/input.h index 9a5b8e6e06..35812604b2 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -36,6 +36,7 @@ #include "core/os/keyboard.h" #include "core/os/thread_safe.h" #include "core/templates/rb_set.h" +#include "core/variant/typed_array.h" class Input : public Object { GDCLASS(Input, Object); @@ -259,7 +260,7 @@ public: float get_joy_axis(int p_device, JoyAxis p_axis) const; String get_joy_name(int p_idx); - Array get_connected_joypads(); + TypedArray<int> get_connected_joypads(); Vector2 get_joy_vibration_strength(int p_device); float get_joy_vibration_duration(int p_device); uint64_t get_joy_vibration_timestamp(int p_device); diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 2a4381b41b..dcbdbe6fb4 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -80,7 +80,7 @@ </description> </method> <method name="get_connected_joypads"> - <return type="Array" /> + <return type="int[]" /> <description> Returns an [Array] containing the device IDs of all currently connected joypads. </description> diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index c53c04af4e..fa106979be 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1484,6 +1484,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { const int gn_margin_side = 2; const int gn_margin_bottom = 2; + // StateMachine + const int sm_margin_side = 10; + Color graphnode_bg = dark_color_3; if (!dark_theme) { graphnode_bg = prop_section_color; @@ -1510,10 +1513,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { graphsbposition->set_border_color(error_color); graphsbposition->set_shadow_color(error_color * Color(1.0, 1.0, 1.0, 0.2)); Ref<StyleBoxEmpty> graphsbslot = make_empty_stylebox(12, 0, 12, 0); - Ref<StyleBoxFlat> smgraphsb = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.7), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); + Ref<StyleBoxFlat> smgraphsb = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.7), sm_margin_side, 24, sm_margin_side, gn_margin_bottom, corner_width); smgraphsb->set_border_width_all(border_width); smgraphsb->set_border_color(graphnode_bg); - Ref<StyleBoxFlat> smgraphsbselected = make_flat_stylebox(graphnode_bg * Color(1, 1, 1, 0.9), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); + Ref<StyleBoxFlat> smgraphsbselected = make_flat_stylebox(graphnode_bg * Color(1, 1, 1, 0.9), sm_margin_side, 24, sm_margin_side, gn_margin_bottom, corner_width); smgraphsbselected->set_border_width_all(2 * EDSCALE + border_width); smgraphsbselected->set_border_color(Color(accent_color.r, accent_color.g, accent_color.b, 0.9)); smgraphsbselected->set_shadow_size(8 * EDSCALE); diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index bd9b89cbb7..ece0c6a0ce 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1220,7 +1220,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { for (const StringName &E : nodes) { Ref<AnimationNode> anode = state_machine->get_node(E); String name = E; - bool needs_editor = EditorNode::get_singleton()->item_has_editor(anode.ptr()); + bool needs_editor = AnimationTreeEditor::get_singleton()->can_edit(anode); Ref<StyleBox> sb = selected_nodes.has(E) ? style_selected : style; Size2 s = sb->get_minimum_size(); @@ -1432,7 +1432,6 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { } else { state_machine_draw->draw_texture(edit, nr.edit.position); } - offset.x += sep + edit->get_width(); } } diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 193f18c075..9b347ed7c8 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -681,7 +681,7 @@ void Window::_update_viewport_size() { } break; case CONTENT_SCALE_MODE_VIEWPORT: { - final_size = viewport_size; + final_size = (viewport_size / content_scale_factor).floor(); attach_to_screen_rect = Rect2(margin, screen_size); } break; |