Compare commits
No commits in common. "devel" and "main" have entirely different histories.
4 changed files with 4 additions and 83 deletions
|
@ -1,61 +0,0 @@
|
||||||
// Header
|
|
||||||
#include "about.h"
|
|
||||||
|
|
||||||
// Functions
|
|
||||||
void FP_Scene_Callback_About(void* context, uint32_t index){
|
|
||||||
// Setting context
|
|
||||||
FP_App* app = context;
|
|
||||||
|
|
||||||
// Sending it to the scene manager
|
|
||||||
scene_manager_handle_custom_event(app->scene_manager, index);
|
|
||||||
}
|
|
||||||
void FP_Scene_Enter_About(void* context){
|
|
||||||
// Setting context
|
|
||||||
FP_App* app = context;
|
|
||||||
|
|
||||||
// Reset view
|
|
||||||
text_box_reset(app->textbox);
|
|
||||||
|
|
||||||
// Setting some content
|
|
||||||
text_box_set_text(
|
|
||||||
app->textbox,
|
|
||||||
"FlippyPass - A Password Manager for the Flipper-Zero\nA robust password manager for the Flipper Zero designed in C"
|
|
||||||
);
|
|
||||||
|
|
||||||
// Sending view to Flipper
|
|
||||||
view_dispatcher_switch_to_view(app->view_dispatcher, FP_View_TextBox);
|
|
||||||
}
|
|
||||||
void FP_Scene_Exit_About(void* context){
|
|
||||||
// Setting context
|
|
||||||
FP_App* app = context;
|
|
||||||
|
|
||||||
// Reset menu
|
|
||||||
text_box_reset(app->textbox);
|
|
||||||
}
|
|
||||||
bool FP_Scene_Event_About(void* context, SceneManagerEvent event){
|
|
||||||
// Setting context
|
|
||||||
FP_App* app = context;
|
|
||||||
bool consumed = false;
|
|
||||||
|
|
||||||
// Switching based on event
|
|
||||||
if (event.type == SceneManagerEventTypeCustom) {
|
|
||||||
// We consumed it
|
|
||||||
consumed = true;
|
|
||||||
|
|
||||||
// Debug log about what we pressed
|
|
||||||
FURI_LOG_D(TAG, "Pressed %li", event.event);
|
|
||||||
|
|
||||||
UNUSED(app);
|
|
||||||
|
|
||||||
// What to do?
|
|
||||||
switch (event.event) {
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
consumed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return result
|
|
||||||
return consumed;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Define once
|
|
||||||
#ifndef H_S_ABOUT
|
|
||||||
#define H_S_ABOUT
|
|
||||||
|
|
||||||
// Libraries
|
|
||||||
#include "../app.h"
|
|
||||||
|
|
||||||
// Functions
|
|
||||||
void FP_Scene_Callback_About(void* context, uint32_t index);
|
|
||||||
void FP_Scene_Enter_About(void* context);
|
|
||||||
void FP_Scene_Exit_About(void* context);
|
|
||||||
bool FP_Scene_Event_About(void* context, SceneManagerEvent event);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -40,7 +40,7 @@ void FP_Scene_Exit_Cred(void* context) {
|
||||||
FP_App* app = context;
|
FP_App* app = context;
|
||||||
|
|
||||||
// Reset menu
|
// Reset menu
|
||||||
text_box_reset(app->dialog);
|
dialog_ex_reset(app->dialog);
|
||||||
}
|
}
|
||||||
bool FP_Scene_Event_Cred(void* context, SceneManagerEvent event) {
|
bool FP_Scene_Event_Cred(void* context, SceneManagerEvent event) {
|
||||||
// Setting context
|
// Setting context
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "scenes/send.h"
|
#include "scenes/send.h"
|
||||||
#include "scenes/create.h"
|
#include "scenes/create.h"
|
||||||
#include "scenes/type.h"
|
#include "scenes/type.h"
|
||||||
#include "scenes/about.h"
|
|
||||||
|
|
||||||
// Handlers
|
// Handlers
|
||||||
void (*const FP_Scene_Enter_Handlers[])(void*) = {
|
void (*const FP_Scene_Enter_Handlers[])(void*) = {
|
||||||
|
@ -21,8 +20,7 @@ void (*const FP_Scene_Enter_Handlers[])(void*) = {
|
||||||
FP_Scene_Enter_Cred,
|
FP_Scene_Enter_Cred,
|
||||||
FP_Scene_Enter_Send,
|
FP_Scene_Enter_Send,
|
||||||
FP_Scene_Enter_Create,
|
FP_Scene_Enter_Create,
|
||||||
FP_Scene_Enter_Type,
|
FP_Scene_Enter_Type
|
||||||
FP_Scene_Enter_About
|
|
||||||
};
|
};
|
||||||
bool (*const FP_Scene_Event_Handlers[])(void*, SceneManagerEvent) = {
|
bool (*const FP_Scene_Event_Handlers[])(void*, SceneManagerEvent) = {
|
||||||
FP_Scene_Event_Auth,
|
FP_Scene_Event_Auth,
|
||||||
|
@ -32,8 +30,7 @@ bool (*const FP_Scene_Event_Handlers[])(void*, SceneManagerEvent) = {
|
||||||
FP_Scene_Event_Cred,
|
FP_Scene_Event_Cred,
|
||||||
FP_Scene_Event_Send,
|
FP_Scene_Event_Send,
|
||||||
FP_Scene_Event_Create,
|
FP_Scene_Event_Create,
|
||||||
FP_Scene_Event_Type,
|
FP_Scene_Event_Type
|
||||||
FP_Scene_Event_About
|
|
||||||
};
|
};
|
||||||
void (*const FP_Scene_Exit_Handlers[])(void*) = {
|
void (*const FP_Scene_Exit_Handlers[])(void*) = {
|
||||||
FP_Scene_Exit_Auth,
|
FP_Scene_Exit_Auth,
|
||||||
|
@ -43,8 +40,7 @@ void (*const FP_Scene_Exit_Handlers[])(void*) = {
|
||||||
FP_Scene_Exit_Cred,
|
FP_Scene_Exit_Cred,
|
||||||
FP_Scene_Exit_Send,
|
FP_Scene_Exit_Send,
|
||||||
FP_Scene_Exit_Create,
|
FP_Scene_Exit_Create,
|
||||||
FP_Scene_Exit_Type,
|
FP_Scene_Exit_Type
|
||||||
FP_Scene_Exit_About
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Main Handler
|
// Main Handler
|
||||||
|
|
Loading…
Reference in a new issue