diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/base_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/button.cpp | 3 | ||||
-rw-r--r-- | scene/gui/control.cpp | 3 | ||||
-rw-r--r-- | scene/gui/link_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 1 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 4 | ||||
-rw-r--r-- | scene/gui/texture_progress.cpp | 2 |
7 files changed, 4 insertions, 13 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index acdbd9de08..d17ae1d84c 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -31,7 +31,6 @@ #include "base_button.h" #include "os/keyboard.h" -#include "print_string.h" #include "scene/main/viewport.h" #include "scene/scene_string_names.h" @@ -361,7 +360,6 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const { return DRAW_DISABLED; }; - //print_line("press attempt: "+itos(status.press_attempt)+" hover: "+itos(status.hovering)+" pressed: "+itos(status.pressed)); if (status.press_attempt == false && status.hovering && !status.pressed) { return DRAW_HOVER; diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 03b25a138f..a34f2f1ad5 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -29,7 +29,6 @@ /*************************************************************************/ #include "button.h" -#include "print_string.h" #include "servers/visual_server.h" #include "translation.h" @@ -76,8 +75,6 @@ void Button::_notification(int p_what) { Color color; Color color_icon(1, 1, 1, 1); - //print_line(get_text()+": "+itos(is_flat())+" hover "+itos(get_draw_mode())); - Ref<StyleBox> style = get_stylebox("normal"); switch (get_draw_mode()) { diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 18f06eca31..e094a063be 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -357,7 +357,7 @@ void Control::_get_property_list(List<PropertyInfo> *p_list) const { if (data.shader_override.has(E->get())) hint |= PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_CHECKED; - p_list->push_back(PropertyInfo(Variant::OBJECT, "custom_shaders/" + E->get(), PROPERTY_HINT_RESOURCE_TYPE, "CanvasItemShader,CanvasItemShaderGraph", hint)); + p_list->push_back(PropertyInfo(Variant::OBJECT, "custom_shaders/" + E->get(), PROPERTY_HINT_RESOURCE_TYPE, "Shader,VisualShader", hint)); } } { @@ -769,6 +769,7 @@ void Control::force_drag(const Variant &p_data, Control *p_control) { void Control::set_drag_preview(Control *p_control) { ERR_FAIL_COND(!is_inside_tree()); + ERR_FAIL_COND(get_viewport()->gui_is_dragging()); get_viewport()->_gui_set_drag_preview(this, p_control); } diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index d862e8669c..8560efdde5 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -68,8 +68,6 @@ void LinkButton::_notification(int p_what) { Color color; bool do_underline = false; - //print_line(get_text()+": "+itos(is_flat())+" hover "+itos(get_draw_mode())); - switch (get_draw_mode()) { case DRAW_NORMAL: { diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index a3748bf14c..a5f9bea1b1 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2034,7 +2034,6 @@ void RichTextLabel::selection_copy() { if (text != "") { OS::get_singleton()->set_clipboard(text); - //print_line("COPY: "+text); } } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 9a8dc62e4e..9616caa811 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -5692,15 +5692,12 @@ void TextEdit::_update_completion_candidates() { bool pre_keyword = false; bool cancel = false; - //print_line("inquote: "+itos(inquote)+"first quote "+itos(first_quote)+" cofs-1 "+itos(cofs-1)); if (!inquote && first_quote == cofs - 1) { //no completion here - //print_line("cancel!"); cancel = true; } else if (inquote && first_quote != -1) { s = l.substr(first_quote, cofs - first_quote); - //print_line("s: 1"+s); } else if (cofs > 0 && l[cofs - 1] == ' ') { int kofs = cofs - 1; String kw; @@ -5713,7 +5710,6 @@ void TextEdit::_update_completion_candidates() { } pre_keyword = keywords.has(kw); - //print_line("KW "+kw+"? "+itos(pre_keyword)); } else { diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp index 6e4fe88dbf..ff90576c1b 100644 --- a/scene/gui/texture_progress.cpp +++ b/scene/gui/texture_progress.cpp @@ -266,6 +266,8 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F } } + p_texture->get_rect_region(dst_rect, src_rect, dst_rect, src_rect); + RID ci = get_canvas_item(); VS::get_singleton()->canvas_item_add_nine_patch(ci, dst_rect, src_rect, p_texture->get_rid(), topleft, bottomright, VS::NINE_PATCH_STRETCH, VS::NINE_PATCH_STRETCH, true, p_modulate); } |