Commit d4d8145e authored by ewen.madec's avatar ewen.madec

animation option menu

parent c913cde8
......@@ -130,6 +130,7 @@ int main(int nbArg, char ** arg)
//Check key inputs for active input fields (only accepts numerical characters)
for(int index = 0; index < optionsMenu->inputCount; index++){
if(optionsMenu->inputs[index]->inputActive){
DrawRectangleLinesEx((Rectangle){optionsMenu->inputBox[index].x-3,optionsMenu->inputBox[index].y-3,optionsMenu->inputBox[index].width+5,optionsMenu->inputBox[index].height+5}, 5, BLACK);
if ((key >= 48) && (key <= 57) && (optionsMenu->inputCount < 3)){
Int_Input_add_char(optionsMenu->inputs[index], &key);
}
......
......@@ -17,6 +17,8 @@ Options_Menu * Options_Menu_init(int * playerCount, int * nodeCount, const int s
self->inputs = malloc(sizeof(Int_Input) * self->inputCount);
self->inputs[0] = playerCountInput;
self->inputs[1] = nodeCountInput;
self->inputBox[0] = playerCountInputBox;
self->inputBox[1] = nodeCountInputBox;
//Save and exit btn
Rectangle saveBtn = {0, (screenHeight*95)/100, (screenWidth*20)/100, (screenHeight*10)/100};
......
......@@ -12,6 +12,7 @@ struct Str_Options_Menu{
//Return btn
Rectangle saveReturnBtn;
Rectangle smallerSaveReturnBtn;
Rectangle inputBox[2];
};
typedef struct Str_Options_Menu Options_Menu;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment