Removed graph node headers from state machine nodes

This commit is contained in:
Dawid Wdowiak 2018-12-30 09:03:59 +01:00
parent ee6f1fa3f8
commit 58ae20f239
2 changed files with 12 additions and 2 deletions

View file

@ -994,6 +994,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
graphsbposition->set_draw_center(false); graphsbposition->set_draw_center(false);
graphsbposition->set_border_color_all(error_color); graphsbposition->set_border_color_all(error_color);
graphsbposition->set_shadow_color(error_color * Color(1.0, 1.0, 1.0, 0.2)); 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) { if (use_gn_headers) {
graphsb->set_border_width(MARGIN_TOP, 24 * EDSCALE); 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("commentfocus", "GraphNode", graphsbcommentselected);
theme->set_stylebox("breakpoint", "GraphNode", graphsbbreakpoint); theme->set_stylebox("breakpoint", "GraphNode", graphsbbreakpoint);
theme->set_stylebox("position", "GraphNode", graphsbposition); 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); Color default_node_color = Color(mv2, mv2, mv2);
theme->set_color("title_color", "GraphNode", default_node_color); theme->set_color("title_color", "GraphNode", default_node_color);

View file

@ -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<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 = get_stylebox("state_machine_frame", "GraphNode");
Ref<StyleBox> style_selected = get_stylebox("selectedframe", "GraphNode"); Ref<StyleBox> style_selected = get_stylebox("state_machine_selectedframe", "GraphNode");
Ref<Font> font = get_font("title_font", "GraphNode"); Ref<Font> font = get_font("title_font", "GraphNode");
Color font_color = get_color("title_color", "GraphNode"); Color font_color = get_color("title_color", "GraphNode");