aboutsummaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-26 16:52:48 -0400
committeriamcheeseman <[email protected]>2026-05-26 16:52:48 -0400
commit9d18177b5cf6488d9591b069e441b0a6b2b9592a (patch)
tree338f395a4ff906443bec68ce873e515be3ce2dc5 /editor
parent9de6584a9327c7cb1c64f9064d21ef9c1012590e (diff)
add window flag functionality
Diffstat (limited to 'editor')
-rw-r--r--editor/tile.c32
-rw-r--r--editor/tile.h1
2 files changed, 29 insertions, 4 deletions
diff --git a/editor/tile.c b/editor/tile.c
index b40a6a4..7a9a169 100644
--- a/editor/tile.c
+++ b/editor/tile.c
@@ -3,14 +3,16 @@
#include "editor.h"
static
-void tile_ui(void)
+void tile_editor_win(void)
{
Tile_Editor *t = &editor.tile;
if (
!tyui_begin_window(
"Tile Editor",
- ty_recti(0, 0, 100, 100),
- &t->tile_editor_win
+ ty_recti(0, 0, 100, SCREEN_HEIGHT),
+ &t->tile_editor_win,
+ .flags = TYUI_WIN_NORESIZEY | TYUI_WIN_NOMOVE | TYUI_WIN_NOTITLE | TYUI_WIN_ALWAYS_BELOW,
+ .min_size = ty_vec2i(100, SCREEN_HEIGHT),
)
) {
return;
@@ -21,9 +23,31 @@ void tile_ui(void)
tyui_end_window();
}
+static
+void test_win(void)
+{
+ Tile_Editor *t = &editor.tile;
+ if (
+ !tyui_begin_window(
+ "Test",
+ ty_recti(100, 100, 100, 100),
+ &t->test_win,
+ .flags = TYUI_WIN_INVISIBLE
+ )
+ ) {
+ return;
+ }
+
+ for (int i = 0; i < 10; i++)
+ tyui_text("test");
+
+ tyui_end_window();
+}
+
void tile_proc(void)
{
- tile_ui();
+ tile_editor_win();
+ test_win();
}
void tile_draw(void)
diff --git a/editor/tile.h b/editor/tile.h
index 9ede5bd..0886d4c 100644
--- a/editor/tile.h
+++ b/editor/tile.h
@@ -13,6 +13,7 @@ typedef struct {
typedef struct {
Map *open_map;
tyui_Id tile_editor_win;
+ tyui_Id test_win;
} Tile_Editor;
void tile_proc(void);