This commit is contained in:
Chu'vok
2024-09-13 13:45:43 +02:00
commit 4dfcf8fe85
9 changed files with 2039 additions and 0 deletions

14
example/hello.c Normal file
View File

@@ -0,0 +1,14 @@
#include "../tim.h" // one header, no lib
int main(void) { //
while (tim_run(0)) { // event loop
scope (A, A, 24, 8) { // centered scope
uint64_t c = 0x0a060f; // three colors
frame(0, 0, ~0, ~0, c); // draw frame for scope
label("Greetings!", A, 2, A, A, c); // label in top center
if (button("OK", A, ~1, 8, A, c)) // button in bottom center
return 0; // exit on button click
if (is_key_press('q')) //
return 0; // exit on 'q' press
} //
} //
} // automatic cleanup