Added headers

This commit is contained in:
Maddox Werts 2024-09-08 21:58:47 -04:00
parent 9e3db286c4
commit 23b41d7ac7
2 changed files with 21 additions and 0 deletions

View file

@ -128,6 +128,20 @@ bool FP_Scene_Event_Create(void* context, SceneManagerEvent event) {
// Set selection
app->selection = event.event;
// Setting the title
app->keyboard = malloc(sizeof(char*));
switch(app->selection){
case 0:
app->keyboard = "Name";
break;
case 1:
app->keyboard = "Username";
break;
case 2:
app->keyboard = "Password";
break;
}
// Switch to keyboard scene
scene_manager_next_scene(app->scene_manager, FP_Scene_Type);
break;

View file

@ -24,6 +24,13 @@ void FP_Scene_Enter_Type(void* context) {
// Does the keyboard variable still have something in it?
if (app->keyboard) {
// It's a title!
text_input_set_header_text(
app->textinput,
app->keyboard
);
// Freeing it in memory
free(app->keyboard);
}