diff options
Diffstat (limited to 'scene/gui')
| -rw-r--r-- | scene/gui/base_button.h | 3 | ||||
| -rw-r--r-- | scene/gui/button.h | 3 | ||||
| -rw-r--r-- | scene/gui/control.h | 3 | ||||
| -rw-r--r-- | scene/gui/dialogs.h | 3 | ||||
| -rw-r--r-- | scene/gui/file_dialog.h | 4 | ||||
| -rw-r--r-- | scene/gui/label.h | 4 | ||||
| -rw-r--r-- | scene/gui/line_edit.h | 3 | ||||
| -rw-r--r-- | scene/gui/menu_button.h | 4 | ||||
| -rw-r--r-- | scene/gui/nine_patch_rect.h | 4 | ||||
| -rw-r--r-- | scene/gui/option_button.h | 4 | ||||
| -rw-r--r-- | scene/gui/panel.h | 4 | ||||
| -rw-r--r-- | scene/gui/popup.cpp | 3 | ||||
| -rw-r--r-- | scene/gui/popup.h | 3 | ||||
| -rw-r--r-- | scene/gui/popup_menu.h | 4 | ||||
| -rw-r--r-- | scene/gui/range.h | 4 | ||||
| -rw-r--r-- | scene/gui/scroll_bar.h | 4 | ||||
| -rw-r--r-- | scene/gui/separator.h | 4 | ||||
| -rw-r--r-- | scene/gui/text_edit.cpp | 4 | ||||
| -rw-r--r-- | scene/gui/texture_rect.h | 4 | ||||
| -rw-r--r-- | scene/gui/tree.h | 4 |
20 files changed, 12 insertions, 61 deletions
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index ffccdd69d6..2773f024df 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -32,9 +32,6 @@ #define BASE_BUTTON_H #include "scene/gui/control.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ class ButtonGroup; diff --git a/scene/gui/button.h b/scene/gui/button.h index 6ba3475e5a..370809060e 100644 --- a/scene/gui/button.h +++ b/scene/gui/button.h @@ -32,9 +32,6 @@ #define BUTTON_H #include "scene/gui/base_button.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ class Button : public BaseButton { diff --git a/scene/gui/control.h b/scene/gui/control.h index eae889a667..7305b3ce93 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -38,9 +38,6 @@ #include "scene/main/node.h" #include "scene/main/timer.h" #include "scene/resources/theme.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ class Viewport; class Label; diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index c1a7f26a85..1a0350ba18 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -37,9 +37,6 @@ #include "scene/gui/panel.h" #include "scene/gui/popup.h" #include "scene/gui/texture_button.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ class WindowDialog : public Popup { diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h index 191af5fef3..4fd6d0d13c 100644 --- a/scene/gui/file_dialog.h +++ b/scene/gui/file_dialog.h @@ -38,9 +38,7 @@ #include "scene/gui/option_button.h" #include "scene/gui/tool_button.h" #include "scene/gui/tree.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class FileDialog : public ConfirmationDialog { GDCLASS(FileDialog, ConfirmationDialog); diff --git a/scene/gui/label.h b/scene/gui/label.h index 561c42ef9e..2cc55a47ef 100644 --- a/scene/gui/label.h +++ b/scene/gui/label.h @@ -32,9 +32,7 @@ #define LABEL_H #include "scene/gui/control.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class Label : public Control { GDCLASS(Label, Control); diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index 3002f6f637..1d33f7d4ce 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -34,9 +34,6 @@ #include "scene/gui/control.h" #include "scene/gui/popup_menu.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ class LineEdit : public Control { GDCLASS(LineEdit, Control); diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h index 42e909d991..5448ff13f2 100644 --- a/scene/gui/menu_button.h +++ b/scene/gui/menu_button.h @@ -33,9 +33,7 @@ #include "scene/gui/button.h" #include "scene/gui/popup_menu.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class MenuButton : public Button { GDCLASS(MenuButton, Button); diff --git a/scene/gui/nine_patch_rect.h b/scene/gui/nine_patch_rect.h index ac17e52fc1..f31a09a482 100644 --- a/scene/gui/nine_patch_rect.h +++ b/scene/gui/nine_patch_rect.h @@ -32,9 +32,7 @@ #define NINE_PATCH_RECT_H #include "scene/gui/control.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class NinePatchRect : public Control { GDCLASS(NinePatchRect, Control); diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h index 51d5fd6947..7210708042 100644 --- a/scene/gui/option_button.h +++ b/scene/gui/option_button.h @@ -33,9 +33,7 @@ #include "scene/gui/button.h" #include "scene/gui/popup_menu.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class OptionButton : public Button { GDCLASS(OptionButton, Button); diff --git a/scene/gui/panel.h b/scene/gui/panel.h index f8d15e4261..84bf6e75f5 100644 --- a/scene/gui/panel.h +++ b/scene/gui/panel.h @@ -32,9 +32,7 @@ #define PANEL_H #include "scene/gui/control.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class Panel : public Control { GDCLASS(Panel, Control); diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 3e003af396..32380b6457 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -74,7 +74,7 @@ void Popup::_fix_size() { Point2 pos = get_global_position(); Size2 size = get_size() * get_scale(); - Point2 window_size = get_viewport_rect().size; + Point2 window_size = get_viewport_rect().size - get_viewport_transform().get_origin(); if (pos.x + size.width > window_size.width) pos.x = window_size.width - size.width; @@ -207,6 +207,7 @@ bool Popup::is_exclusive() const { void Popup::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_as_minsize"), &Popup::set_as_minsize); ClassDB::bind_method(D_METHOD("popup_centered", "size"), &Popup::popup_centered, DEFVAL(Size2())); ClassDB::bind_method(D_METHOD("popup_centered_ratio", "ratio"), &Popup::popup_centered_ratio, DEFVAL(0.75)); ClassDB::bind_method(D_METHOD("popup_centered_minsize", "minsize"), &Popup::popup_centered_minsize, DEFVAL(Size2())); diff --git a/scene/gui/popup.h b/scene/gui/popup.h index d6d96dfe64..925760984e 100644 --- a/scene/gui/popup.h +++ b/scene/gui/popup.h @@ -33,9 +33,6 @@ #include "scene/gui/control.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ class Popup : public Control { GDCLASS(Popup, Control); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index babdd21281..8bfe8fc607 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -33,10 +33,6 @@ #include "scene/gui/popup.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ - class PopupMenu : public Popup { GDCLASS(PopupMenu, Popup); diff --git a/scene/gui/range.h b/scene/gui/range.h index cf0add8c89..8ce450f8fc 100644 --- a/scene/gui/range.h +++ b/scene/gui/range.h @@ -32,9 +32,7 @@ #define RANGE_H #include "scene/gui/control.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class Range : public Control { GDCLASS(Range, Control); diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h index 5ceabfc06b..cbcee1dae3 100644 --- a/scene/gui/scroll_bar.h +++ b/scene/gui/scroll_bar.h @@ -33,10 +33,6 @@ #include "scene/gui/range.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ - class ScrollBar : public Range { GDCLASS(ScrollBar, Range); diff --git a/scene/gui/separator.h b/scene/gui/separator.h index 54ad9b5bb5..89039f3112 100644 --- a/scene/gui/separator.h +++ b/scene/gui/separator.h @@ -31,10 +31,6 @@ #ifndef SEPARATOR_H #define SEPARATOR_H -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ - #include "scene/gui/control.h" class Separator : public Control { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 6e5f8de3b5..c0eaf21215 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1403,7 +1403,7 @@ void TextEdit::_notification(int p_what) { } int line_from = CLAMP(completion_index - lines / 2, 0, completion_options.size() - lines); VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(completion_rect.position.x, completion_rect.position.y + (completion_index - line_from) * get_row_height()), Size2(completion_rect.size.width, get_row_height())), cache.completion_selected_color); - draw_rect(Rect2(completion_rect.position + Vector2(icon_area_size.x + icon_hsep, 0), Size2(nofs, completion_rect.size.height)), cache.completion_existing_color); + draw_rect(Rect2(completion_rect.position + Vector2(icon_area_size.x + icon_hsep, 0), Size2(MIN(nofs, completion_rect.size.width - (icon_area_size.x + icon_hsep)), completion_rect.size.height)), cache.completion_existing_color); for (int i = 0; i < lines; i++) { @@ -1430,7 +1430,7 @@ void TextEdit::_notification(int p_what) { } title_pos.x = icon_area.position.x + icon_area.size.width + icon_hsep; - draw_string(cache.font, title_pos, completion_options[l].display, text_color, completion_rect.size.width); + draw_string(cache.font, title_pos, completion_options[l].display, text_color, completion_rect.size.width - (icon_area_size.x + icon_hsep)); } if (scrollw) { diff --git a/scene/gui/texture_rect.h b/scene/gui/texture_rect.h index 3ab35324e5..1c5bd9d99c 100644 --- a/scene/gui/texture_rect.h +++ b/scene/gui/texture_rect.h @@ -32,9 +32,7 @@ #define TEXTURE_FRAME_H #include "scene/gui/control.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class TextureRect : public Control { GDCLASS(TextureRect, Control); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index b6cdab766f..b57923e24b 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -37,10 +37,6 @@ #include "scene/gui/scroll_bar.h" #include "scene/gui/slider.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ - class Tree; class TreeItem : public Object { |