diff options
Diffstat (limited to 'applications/goldman/source/window.cpp')
-rw-r--r-- | applications/goldman/source/window.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/applications/goldman/source/window.cpp b/applications/goldman/source/window.cpp index fe5212a..3f122ca 100644 --- a/applications/goldman/source/window.cpp +++ b/applications/goldman/source/window.cpp @@ -11,12 +11,16 @@ daguerre::hilbert_color border_color_not_top; daguerre::hilbert_color title_color; void window::set_size(int width, int height) { + int center_x = x + contents_with_decorations. width / 2; + int center_y = y + contents_with_decorations.height / 2; contents_with_decorations = daguerre::image<daguerre::hilbert_color>(width + 4, height + 18); contents = daguerre::image<daguerre::hilbert_color>( width, height, &contents_with_decorations.at(2, 16), contents_with_decorations.buffer_pitch, false); + x = center_x - contents_with_decorations. width / 2; + y = center_y - contents_with_decorations.height / 2; } void title_converter( @@ -40,6 +44,7 @@ void window::draw_decorations(bool top) { static_assert( decorations_extra_width == 4); static_assert(decorations_extra_height == 18); + static_assert( title_height == 16); auto border_color = top ? border_color_top : border_color_not_top; |