diff options
Diffstat (limited to 'scene/gui/graph_node.cpp')
-rw-r--r-- | scene/gui/graph_node.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 82e890395a..5dbc5bc50d 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -117,8 +117,8 @@ void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const { void GraphNode::_resort() { - int sep = get_constant("separation"); - Ref<StyleBox> sb = get_stylebox("frame"); + int sep = get_theme_constant("separation"); + Ref<StyleBox> sb = get_theme_stylebox("frame"); bool first = true; Size2 minsize; @@ -169,8 +169,8 @@ void GraphNode::_resort() { bool GraphNode::has_point(const Point2 &p_point) const { if (comment) { - Ref<StyleBox> comment = get_stylebox("comment"); - Ref<Texture2D> resizer = get_icon("resizer"); + Ref<StyleBox> comment = get_theme_stylebox("comment"); + Ref<Texture2D> resizer = get_theme_icon("resizer"); if (Rect2(get_size() - resizer->get_size(), resizer->get_size()).has_point(p_point)) { return true; @@ -195,28 +195,28 @@ void GraphNode::_notification(int p_what) { Ref<StyleBox> sb; if (comment) { - sb = get_stylebox(selected ? "commentfocus" : "comment"); + sb = get_theme_stylebox(selected ? "commentfocus" : "comment"); } else { - sb = get_stylebox(selected ? "selectedframe" : "frame"); + sb = get_theme_stylebox(selected ? "selectedframe" : "frame"); } //sb=sb->duplicate(); //sb->call("set_modulate",modulate); - Ref<Texture2D> port = get_icon("port"); - Ref<Texture2D> close = get_icon("close"); - Ref<Texture2D> resizer = get_icon("resizer"); - int close_offset = get_constant("close_offset"); - int close_h_offset = get_constant("close_h_offset"); - Color close_color = get_color("close_color"); - Color resizer_color = get_color("resizer_color"); - Ref<Font> title_font = get_font("title_font"); - int title_offset = get_constant("title_offset"); - int title_h_offset = get_constant("title_h_offset"); - Color title_color = get_color("title_color"); + Ref<Texture2D> port = get_theme_icon("port"); + Ref<Texture2D> close = get_theme_icon("close"); + Ref<Texture2D> resizer = get_theme_icon("resizer"); + int close_offset = get_theme_constant("close_offset"); + int close_h_offset = get_theme_constant("close_h_offset"); + Color close_color = get_theme_color("close_color"); + Color resizer_color = get_theme_color("resizer_color"); + Ref<Font> title_font = get_theme_font("title_font"); + int title_offset = get_theme_constant("title_offset"); + int title_h_offset = get_theme_constant("title_h_offset"); + Color title_color = get_theme_color("title_color"); Point2i icofs = -port->get_size() * 0.5; - int edgeofs = get_constant("port_offset"); + int edgeofs = get_theme_constant("port_offset"); icofs.y += sb->get_margin(MARGIN_TOP); draw_style_box(sb, Rect2(Point2(), get_size())); @@ -227,10 +227,10 @@ void GraphNode::_notification(int p_what) { } break; case OVERLAY_BREAKPOINT: { - draw_style_box(get_stylebox("breakpoint"), Rect2(Point2(), get_size())); + draw_style_box(get_theme_stylebox("breakpoint"), Rect2(Point2(), get_size())); } break; case OVERLAY_POSITION: { - draw_style_box(get_stylebox("position"), Rect2(Point2(), get_size())); + draw_style_box(get_theme_stylebox("position"), Rect2(Point2(), get_size())); } break; } @@ -370,16 +370,16 @@ Color GraphNode::get_slot_color_right(int p_idx) const { Size2 GraphNode::get_minimum_size() const { - Ref<Font> title_font = get_font("title_font"); + Ref<Font> title_font = get_theme_font("title_font"); - int sep = get_constant("separation"); - Ref<StyleBox> sb = get_stylebox("frame"); + int sep = get_theme_constant("separation"); + Ref<StyleBox> sb = get_theme_stylebox("frame"); bool first = true; Size2 minsize; minsize.x = title_font->get_string_size(title).x; if (show_close) { - Ref<Texture2D> close = get_icon("close"); + Ref<Texture2D> close = get_theme_icon("close"); minsize.x += sep + close->get_width(); } @@ -464,10 +464,10 @@ bool GraphNode::is_close_button_visible() const { void GraphNode::_connpos_update() { - int edgeofs = get_constant("port_offset"); - int sep = get_constant("separation"); + int edgeofs = get_theme_constant("port_offset"); + int sep = get_theme_constant("separation"); - Ref<StyleBox> sb = get_stylebox("frame"); + Ref<StyleBox> sb = get_theme_stylebox("frame"); conn_input_cache.clear(); conn_output_cache.clear(); int vofs = 0; @@ -593,7 +593,7 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) { Ref<InputEventMouseButton> mb = p_ev; if (mb.is_valid()) { - ERR_FAIL_COND_MSG(get_parent_control() == NULL, "GraphNode must be the child of a GraphEdit node."); + ERR_FAIL_COND_MSG(get_parent_control() == nullptr, "GraphNode must be the child of a GraphEdit node."); if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { @@ -606,7 +606,7 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) { return; } - Ref<Texture2D> resizer = get_icon("resizer"); + Ref<Texture2D> resizer = get_theme_icon("resizer"); if (resizable && mpos.x > get_size().x - resizer->get_width() && mpos.y > get_size().y - resizer->get_height()) { |