🍻 TUILib
Fun ui "framework" on C for C
🚀 How to start
- 📦 Download this project and launch in Clion(I use it)
- 🔧 Create your own init function like in TUILib/samples/sample1.c->int sample();
- 📱 Work with updaters, observers of your widgets and create own widgets for your beautiful Text User Interface!
💄 Result
🔨 Code
Button button;
char changingChars[] = { '<', '>' };
bool isContinue = true;
int sample1() {
init(onIteration, onFinish);
button = newRectButton(
point(2, 2), // position
point(5, 3), // size
changingChars[0], // filling symbol
getColorId(COLOR_RED, COLOR_WHITE), // color pair
buttonOnClick, // func for onClick event
&button); // data for onClick event
newTextBlock(
point(4, 4), // position
point(6, 3), // size
"123456789101112131415", // text
getColorId(COLOR_WHITE, COLOR_CYAN)); // color pair
notify();
start();
return 0;
}
int onIteration(double deltaTime) {...}
void onFinish() {...}
void buttonOnClick(Button *iAmHasClicked) {...}
Samples
https://github.com/yoloroy/TUILib/tree/master/samples
✅ TODO
- Complete widget for text input
- Add scaling and snapping