diff --git a/project/ui/scenes/create.c b/project/ui/scenes/create.c index 8f9ad36..150917b 100644 --- a/project/ui/scenes/create.c +++ b/project/ui/scenes/create.c @@ -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; diff --git a/project/ui/scenes/type.c b/project/ui/scenes/type.c index 473281b..4eda264 100644 --- a/project/ui/scenes/type.c +++ b/project/ui/scenes/type.c @@ -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); }