From c34b9191f258ddc15c5b45c000cd0266aed9dead Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 29 Jul 2024 21:26:17 -0400 Subject: window borders --- libraries/pake/include/pake/widget.hpp | 8 ++++++++ libraries/pake/include/pake/widgets/fixed-text.hpp | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'libraries/pake/include') diff --git a/libraries/pake/include/pake/widget.hpp b/libraries/pake/include/pake/widget.hpp index dad5651..466fb80 100644 --- a/libraries/pake/include/pake/widget.hpp +++ b/libraries/pake/include/pake/widget.hpp @@ -4,6 +4,14 @@ namespace pake { + enum class halign { + left, center, right + }; + + enum class valign { + top, center, bottom + }; + class widget { public: diff --git a/libraries/pake/include/pake/widgets/fixed-text.hpp b/libraries/pake/include/pake/widgets/fixed-text.hpp index c6dafab..dc2e277 100644 --- a/libraries/pake/include/pake/widgets/fixed-text.hpp +++ b/libraries/pake/include/pake/widgets/fixed-text.hpp @@ -12,6 +12,8 @@ namespace pake::widgets { std::string text; int width, height; + halign ha; + valign va; public: //TODO: look up font in some kind of catalogue @@ -19,7 +21,8 @@ namespace pake::widgets { std::string &&text, const daguerre::fixed_font *font, daguerre::hilbert_color bg, - daguerre::hilbert_color fg); + daguerre::hilbert_color fg, + halign ha, valign va); virtual void render( dirtiable_image &onto, int x_off, int y_off, bool force) override; -- cgit v1.2.3