summaryrefslogtreecommitdiff
path: root/applications/goldman/source/window.hpp
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-07-29 23:03:57 -0400
committerBenji Dial <benji@benjidial.net>2024-07-29 23:03:57 -0400
commit6cf7cd267b50fa68d7531655911620f17dde4a63 (patch)
treee936ab19c3176d1c5eced6e17847550ed1f420e3 /applications/goldman/source/window.hpp
parentc34b9191f258ddc15c5b45c000cd0266aed9dead (diff)
downloadhilbert-os-6cf7cd267b50fa68d7531655911620f17dde4a63.tar.gz
window moving and focusing
Diffstat (limited to 'applications/goldman/source/window.hpp')
-rw-r--r--applications/goldman/source/window.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/applications/goldman/source/window.hpp b/applications/goldman/source/window.hpp
index 5c2d7a0..380e25b 100644
--- a/applications/goldman/source/window.hpp
+++ b/applications/goldman/source/window.hpp
@@ -6,6 +6,7 @@ struct window {
static constexpr int decorations_extra_width = 4;
static constexpr int decorations_extra_height = 18;
+ static constexpr int title_height = 16;
daguerre::image<daguerre::hilbert_color> contents_with_decorations;
daguerre::image<daguerre::hilbert_color> contents;
@@ -20,7 +21,10 @@ struct window {
void set_size(int width, int height);
void draw_decorations(bool top);
- inline window() : x(0), y(0), is_shown(false) {
+ inline window(int center_x, int center_y)
+ : x(center_x - decorations_extra_width / 2),
+ y(center_y - decorations_extra_height / 2),
+ is_shown(false) {
set_size(0, 0);
draw_decorations(false);
}