diff options
author | Benji Dial <benji@benjidial.net> | 2024-07-29 21:26:17 -0400 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2024-07-29 21:26:17 -0400 |
commit | c34b9191f258ddc15c5b45c000cd0266aed9dead (patch) | |
tree | 88e66004d1514d6f22b4366fc415b467784fee63 /applications/hello | |
parent | e6c3a80b01ffb52079783cddd9be6d392d0f7039 (diff) | |
download | hilbert-os-c34b9191f258ddc15c5b45c000cd0266aed9dead.tar.gz |
window borders
Diffstat (limited to 'applications/hello')
-rw-r--r-- | applications/hello/source/main.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/applications/hello/source/main.cpp b/applications/hello/source/main.cpp index 1f45407..b297721 100644 --- a/applications/hello/source/main.cpp +++ b/applications/hello/source/main.cpp @@ -7,18 +7,30 @@ daguerre::fixed_font<bool> *font; int main(int, char **) { font = new daguerre::fixed_font<bool>( - daguerre::try_load_psf("/assets/terminus-bold-18x10.psf").value()); + daguerre::try_load_psf("/assets/terminus/10x18-bold.psf").value()); pake::widgets::fixed_text *text = new pake::widgets::fixed_text("Hello, world!", font, euler::syscall::encode_color(0xaa, 0xaa, 0xaa), - euler::syscall::encode_color(0x00, 0x00, 0x00)); + euler::syscall::encode_color(0x00, 0x00, 0x00), + pake::halign::center, pake::valign::center); pake::window w(300, 200, "Hello"); w.set_root(std::unique_ptr<pake::widget>(text)); w.render_and_send_to_compositor(); w.show(); + pake::widgets::fixed_text *text2 = + new pake::widgets::fixed_text("H!", font, + euler::syscall::encode_color(0xaa, 0xaa, 0xaa), + euler::syscall::encode_color(0x00, 0x00, 0x00), + pake::halign::center, pake::valign::center); + + pake::window w2(100, 50, "Hello 2"); + w2.set_root(std::unique_ptr<pake::widget>(text2)); + w2.render_and_send_to_compositor(); + w2.show(); + //TODO: call event loop euler::syscall::stream_handle h1, h2; |