1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Popups are now windows also (broken!)

This commit is contained in:
Juan Linietsky
2020-03-12 09:37:40 -03:00
parent 543fb1c4da
commit 441f1a5fe9
159 changed files with 3311 additions and 3285 deletions

View File

@@ -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;
@@ -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()) {