aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/line_edit.cpp
diff options
context:
space:
mode:
authorDaniel J. Ramirez2017-07-18 14:35:37 -0500
committerDaniel J. Ramirez2017-07-19 13:23:16 -0500
commit95f55c8f0d0e56fd039333b611d12f88b74cde78 (patch)
tree60f4e8a231d9b2c8d1cb84a69b418eac04adabda /scene/gui/line_edit.cpp
parent9cf72d0ae174badab07b1461f576955725375046 (diff)
downloadgodot-95f55c8f0d0e56fd039333b611d12f88b74cde78.tar.gz
godot-95f55c8f0d0e56fd039333b611d12f88b74cde78.tar.zst
godot-95f55c8f0d0e56fd039333b611d12f88b74cde78.zip
Icons can now be added inside line edits (Search icon).
Fixed window title bar margins. fixed compilation error
Diffstat (limited to '')
-rw-r--r--scene/gui/line_edit.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index adcf86357..f4dd3e92c 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -628,6 +628,12 @@ void LineEdit::_notification(int p_what) {
font_color.a *= placeholder_alpha;
font_color.a *= disabled_alpha;
+ if (has_icon("right_icon")) {
+ Ref<Texture> r_icon = Control::get_icon("right_icon");
+ ofs_max -= r_icon->get_width();
+ r_icon->draw(ci, Point2(width - r_icon->get_width() - x_ofs, y_ofs), Color(1, 1, 1, disabled_alpha * .9));
+ }
+
int caret_height = font->get_height() > y_area ? y_area : font->get_height();
while (true) {