summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2020-12-25 23:45:28 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2021-02-14 14:11:44 +0200
commitd78336c65e3dda2081fe4f3c1e4c269452514086 (patch)
treee229db2993aabd62977e532ed1b49456f2ada1bc /scene/main/viewport.cpp
parentb21f854b7f573bcbc963d5346ed37231c29446b6 (diff)
[CTL] Add missing font outline drawing routines and theme constants.
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index a0750b2590..54b670df6c 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -278,6 +278,11 @@ void Viewport::_sub_window_update(Window *p_window) {
int x = (r.size.width - title_text.get_size().x) / 2;
int y = (-title_height - title_text.get_size().y) / 2;
+ Color font_outline_color = p_window->get_theme_color("title_outline_modulate");
+ int outline_size = p_window->get_theme_constant("title_outline_size");
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ title_text.draw_outline(sw.canvas_item, r.position + Point2(x, y), outline_size, font_outline_color);
+ }
title_text.draw(sw.canvas_item, r.position + Point2(x, y), title_color);
bool hl = gui.subwindow_focused == sw.window && gui.subwindow_drag == SUB_WINDOW_DRAG_CLOSE && gui.subwindow_drag_close_inside;