tim updated

This commit is contained in:
2026-01-09 11:13:55 +05:00
parent 151ad13853
commit bfcb2f931f
3 changed files with 7 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ static const str farewell_art = STR(
"\\(_,J J L l`,)/\n" "\\(_,J J L l`,)/\n"
); );
#define FPS 30
#define is_alias(LITERAL) str_equals(command, STR(LITERAL)) #define is_alias(LITERAL) str_equals(command, STR(LITERAL))
@@ -47,13 +48,13 @@ void ClientCLI_construct(ClientCLI* self){
} }
Result(void) ClientCLI_run(ClientCLI* self) { Result(void) ClientCLI_run(ClientCLI* self) {
Deferral(16); Deferral(FPS);
TimEditState e; TimEditState e;
TimEditState_init(&e, 32, "Greetings!"); TimEditState_init(&e, 32, "Greetings!");
bool edit_enabled = false; bool edit_enabled = false;
while(tim_run(0)){ while(tim_run(30)){
uint64_t c = 0x0f040f; TimStyle c = { .brd = TimColor16_White, .bg = TimColor16_DarkBlue, .fg = TimColor16_White };
tim_frame(0, 0, ~0, ~0, c); tim_frame(0, 0, ~0, ~0, c);
tim_label(e.s, A, 2, A, A, c); tim_label(e.s, A, 2, A, A, c);
@@ -73,7 +74,7 @@ Result(void) ClientCLI_run(ClientCLI* self) {
} }
if(tim_button("[Q] Quit", A, ~1, 10, A, c) || tim_is_key_press('q')) if(tim_button("[Q] Quit", A, ~1, 10, A, c) || tim_is_key_press('q'))
break; exit(0);
} }
term_clear(); term_clear();