worked on adding more stuff to the nomi project
This commit is contained in:
@@ -113,13 +113,17 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
signal(SIGINT, programClose);
|
||||
|
||||
float animStep = 0;
|
||||
|
||||
char str[255] = "This is a test";
|
||||
char commandPromt[16] = "Enter Command: ";
|
||||
char commandInput[255] = "";
|
||||
unsigned char keyPressed = 0;
|
||||
|
||||
branch b = create_branch(NULL, (nomi_vec2){0,1});
|
||||
branch b1 = create_branch(&b,(nomi_vec2){1,1});
|
||||
|
||||
branch b = create_branch(NULL, (nomi_vec2){0,1}, 0, TART_COLOR_BLUE_BACKGROUND);
|
||||
branch b1 = create_branch(&b,(nomi_vec2){1,1}, 50, TART_COLOR_BLUE_BACKGROUND);
|
||||
branch b2 = create_branch(&b1,(nomi_vec2){1,1}, 20, TART_COLOR_BRIGHT_GREEN_BACKGROUND);
|
||||
|
||||
// Window Createion
|
||||
struct tart_window window = tart_create_window();
|
||||
@@ -143,6 +147,9 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
tart_restore_window(&window);
|
||||
tart_restore_buffer(tart_get_buffer(&window, 0));
|
||||
unsigned char branch1Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
unsigned char branch2Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
unsigned char branch3Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
|
||||
for (;!__Close__;) {
|
||||
// LOOP START
|
||||
@@ -150,14 +157,30 @@ int main (int argc, char *argv[]) {
|
||||
tart_restore_window(&window);
|
||||
tart_restore_buffer(tart_get_buffer(&window, 0));
|
||||
|
||||
b = create_branch(NULL, (nomi_vec2){0,1});
|
||||
b1 = create_branch(&b,(nomi_vec2){1,4*2});
|
||||
b = create_branch(NULL, (nomi_vec2){0,1}, 0, branch1Color);
|
||||
b1 = create_branch(&b,(nomi_vec2){1,4*2}, 20, branch2Color);
|
||||
b2 = create_branch(&b1,(nomi_vec2){1,0}, 10, branch3Color);
|
||||
|
||||
if(keyPressed) {
|
||||
tart_draw_window(&window, 0);
|
||||
|
||||
char c = term_tinput();
|
||||
|
||||
if( c == '1') {
|
||||
branch1Color = TART_COLOR_WHITE_BACKGROUND;
|
||||
branch2Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
branch3Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
}
|
||||
if( c == '2') {
|
||||
branch2Color = TART_COLOR_WHITE_BACKGROUND;
|
||||
branch1Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
branch3Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
}
|
||||
if( c == '3') {
|
||||
branch3Color = TART_COLOR_WHITE_BACKGROUND;
|
||||
branch1Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
branch2Color = TART_COLOR_GREEN_FOREGROUND;
|
||||
}
|
||||
|
||||
//Speual
|
||||
SetRichTextBox(&inputRtb, str, strlen(str), NULL_CELL);
|
||||
|
||||
@@ -259,8 +282,10 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
|
||||
|
||||
DrawBranch(&b, &window, 0);
|
||||
DrawBranch(&b1, &window, 0);
|
||||
// Drawing Branches
|
||||
DrawBranch(&b,100, &window, 0);
|
||||
DrawBranch(&b1,100, &window, 0);
|
||||
DrawBranch(&b2,100, &window, 0);
|
||||
|
||||
tart_draw_window(&window, 0);
|
||||
if(mode == COMMAND_MODE) {
|
||||
|
||||
Reference in New Issue
Block a user