aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMarvin Borner2020-10-25 21:42:51 +0100
committerMarvin Borner2020-10-25 21:42:51 +0100
commit4ae48304b2290b6c835eb3d937bd5e905ce0e5d4 (patch)
treea1d6edb02667fb76c2ce03193ccc76ada08ea9f4 /apps
parent4ec7c19e1567f322b1622ad506290e8eb7a4956d (diff)
Added on-demand font loading
Diffstat (limited to 'apps')
-rw-r--r--apps/window.c2
-rw-r--r--apps/wm.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/window.c b/apps/window.c
index ffd860d..f8e2723 100644
--- a/apps/window.c
+++ b/apps/window.c
@@ -19,7 +19,7 @@ int main()
struct element *container = gui_init("test", 0, 0);
struct element_button *button =
- gui_add_button(container, 10, 10, 100, 20, "hallo", COLOR_RED);
+ gui_add_button(container, 10, 10, FONT_24, "Baum!", COLOR_WHITE, COLOR_BLACK);
button->on_click = on_click;
diff --git a/apps/wm.c b/apps/wm.c
index bbe2c1f..954ec4e 100644
--- a/apps/wm.c
+++ b/apps/wm.c
@@ -4,6 +4,7 @@
#include <cpu.h>
#include <def.h>
#include <gfx.h>
+#include <gui.h>
#include <input.h>
#include <keymap.h>
#include <list.h>
@@ -203,7 +204,6 @@ int main(int argc, char **argv)
printf("VBE: %dx%d\n", vbe.width, vbe.height);
keymap = keymap_parse("/res/keymaps/en.keymap");
- gfx_init("/font/spleen-16x32.psfu");
contexts = list_new();
new_context(&root, pid, 0, 0, vbe.width, vbe.height,
@@ -215,9 +215,9 @@ int main(int argc, char **argv)
direct.fb = vbe.fb;
list_add(contexts, &root);
- gfx_fill(&direct, COLOR_BG);
- gfx_write(&direct, 0, 0, COLOR_FG, "Welcome to Melvix!");
- gfx_write(&direct, 0, 32, COLOR_FG, "Loading resources...");
+ //gfx_fill(&direct, COLOR_BG);
+ //gfx_write(&direct, 0, 0, FONT_32, COLOR_FG, "Welcome to Melvix!");
+ //gfx_write(&direct, 0, 32, FONT_32, COLOR_FG, "Loading resources...");
gfx_fill(&root, COLOR_FG);
//gfx_border(&root, COLOR_FG, 2);