Skip to content

Commit 5289709

Browse files
committed
Merge pull request #99409 from passivestar/state-machine-focus-border-color
Expose state machine focus color to theming
2 parents 03d9d4f + edd6acd commit 5289709

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

editor/plugins/animation_state_machine_editor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
917917
}
918918

919919
if (state_machine_draw->has_focus()) {
920-
state_machine_draw->draw_rect(Rect2(Point2(), state_machine_draw->get_size()), theme_cache.highlight_color, false);
920+
state_machine_draw->draw_rect(Rect2(Point2(), state_machine_draw->get_size()), theme_cache.focus_color, false);
921921
}
922922
int sep = 3 * EDSCALE;
923923

@@ -1642,6 +1642,7 @@ void AnimationNodeStateMachineEditor::_bind_methods() {
16421642
BIND_THEME_ITEM_EXT(Theme::DATA_TYPE_COLOR, AnimationNodeStateMachineEditor, transition_icon_disabled_color, "transition_icon_disabled_color", "GraphStateMachine");
16431643
BIND_THEME_ITEM_EXT(Theme::DATA_TYPE_COLOR, AnimationNodeStateMachineEditor, highlight_color, "highlight_color", "GraphStateMachine");
16441644
BIND_THEME_ITEM_EXT(Theme::DATA_TYPE_COLOR, AnimationNodeStateMachineEditor, highlight_disabled_color, "highlight_disabled_color", "GraphStateMachine");
1645+
BIND_THEME_ITEM_EXT(Theme::DATA_TYPE_COLOR, AnimationNodeStateMachineEditor, focus_color, "focus_color", "GraphStateMachine");
16451646
BIND_THEME_ITEM_EXT(Theme::DATA_TYPE_COLOR, AnimationNodeStateMachineEditor, guideline_color, "guideline_color", "GraphStateMachine");
16461647

16471648
BIND_THEME_ITEM_EXT(Theme::DATA_TYPE_ICON, AnimationNodeStateMachineEditor, transition_icons[0], "TransitionImmediateBig", "EditorIcons");

editor/plugins/animation_state_machine_editor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
117117
Color transition_icon_disabled_color;
118118
Color highlight_color;
119119
Color highlight_disabled_color;
120+
Color focus_color;
120121
Color guideline_color;
121122

122123
Ref<Texture2D> transition_icons[6]{};

editor/themes/editor_theme_manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,6 +2506,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
25062506
p_theme->set_color("transition_icon_disabled_color", "GraphStateMachine", Color(1, 1, 1, 0.2));
25072507
p_theme->set_color("highlight_color", "GraphStateMachine", p_config.accent_color);
25082508
p_theme->set_color("highlight_disabled_color", "GraphStateMachine", p_config.accent_color * Color(1, 1, 1, 0.6));
2509+
p_theme->set_color("focus_color", "GraphStateMachine", p_config.accent_color);
25092510
p_theme->set_color("guideline_color", "GraphStateMachine", p_config.font_color * Color(1, 1, 1, 0.3));
25102511

25112512
p_theme->set_color("playback_color", "GraphStateMachine", p_config.font_color);

0 commit comments

Comments
 (0)