summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-30 14:06:58 +0100
committerGitHub <noreply@github.com>2018-12-30 14:06:58 +0100
commit1d7b69ebbc02fa566e2e2a62b231b44a39f5a2c2 (patch)
tree530174f93a8268ec7f49769f1f800e53894ea60f /editor
parentc64b07b264845a1cad8a500badc0407d593a453f (diff)
parent58ae20f239792fed6ca041515914d2fef4198fc6 (diff)
Merge pull request #24664 from SoIAS/graph_node_headers_statemachine-24458
Removed graph node headers from state machine nodes
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_themes.cpp10
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp4
2 files changed, 12 insertions, 2 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index eacf2ee1b4..8a2206d06c 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -994,6 +994,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
graphsbposition->set_draw_center(false);
graphsbposition->set_border_color_all(error_color);
graphsbposition->set_shadow_color(error_color * Color(1.0, 1.0, 1.0, 0.2));
+ Ref<StyleBoxFlat> smgraphsb = make_flat_stylebox(Color(mv, mv, mv, 0.7), gn_margin_side, 24, gn_margin_side, 5);
+ smgraphsb->set_border_width_all(border_width);
+ smgraphsb->set_border_color_all(Color(mv2, mv2, mv2, 0.9));
+ Ref<StyleBoxFlat> smgraphsbselected = make_flat_stylebox(Color(mv, mv, mv, 0.9), gn_margin_side, 24, gn_margin_side, 5);
+ smgraphsbselected->set_border_width_all(border_width);
+ smgraphsbselected->set_border_color_all(Color(accent_color.r, accent_color.g, accent_color.b, 0.9));
+ smgraphsbselected->set_shadow_size(8 * EDSCALE);
+ smgraphsbselected->set_shadow_color(shadow_color);
if (use_gn_headers) {
graphsb->set_border_width(MARGIN_TOP, 24 * EDSCALE);
@@ -1008,6 +1016,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("commentfocus", "GraphNode", graphsbcommentselected);
theme->set_stylebox("breakpoint", "GraphNode", graphsbbreakpoint);
theme->set_stylebox("position", "GraphNode", graphsbposition);
+ theme->set_stylebox("state_machine_frame", "GraphNode", smgraphsb);
+ theme->set_stylebox("state_machine_selectedframe", "GraphNode", smgraphsbselected);
Color default_node_color = Color(mv2, mv2, mv2);
theme->set_color("title_color", "GraphNode", default_node_color);
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index ee30294fe7..427b4eebee 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -572,8 +572,8 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
- Ref<StyleBox> style = get_stylebox("frame", "GraphNode");
- Ref<StyleBox> style_selected = get_stylebox("selectedframe", "GraphNode");
+ Ref<StyleBox> style = get_stylebox("state_machine_frame", "GraphNode");
+ Ref<StyleBox> style_selected = get_stylebox("state_machine_selectedframe", "GraphNode");
Ref<Font> font = get_font("title_font", "GraphNode");
Color font_color = get_color("title_color", "GraphNode");