- Added initial version of Hierarchical Menu
- Beautified the Message Box a bit
This commit is contained in:
@@ -80,11 +80,14 @@ static Configuration_Menu_Ring _Ring_Menu_Config = {
|
||||
.Enable_Appear_Animation = false
|
||||
};
|
||||
|
||||
static bool _Do_Menu_Animation;
|
||||
|
||||
|
||||
// ============================================================================================
|
||||
// Function Declarations
|
||||
void Screen_Setup_Menu_Main(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, bool do_menu_animation, uint32_t selected_entry);
|
||||
|
||||
static void Screen_Init (Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
|
||||
static void Screen_Tick (void);
|
||||
static void Screen_Click (uint button_return_value);
|
||||
static void Screen_Touch_Event (int16_t x, int16_t y);
|
||||
@@ -102,7 +105,21 @@ static void Screen_On_Object_Deselect (Object_ID object_id);
|
||||
*******************************************************************/
|
||||
void Screen_Setup_Menu_Main(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, bool do_menu_animation, uint32_t selected_entry)
|
||||
{
|
||||
_Screen_Tick = Screen_Tick;
|
||||
_Do_Menu_Animation = do_menu_animation;
|
||||
|
||||
Screen_Init(direction_out, direction_in, type, frame_duration);
|
||||
|
||||
// Initialize values
|
||||
_Ring_Menu_Selected = 0;
|
||||
if(selected_entry < ENTRY_COUNT) {
|
||||
_Ring_Menu_Selected = selected_entry;
|
||||
}
|
||||
}
|
||||
|
||||
void Screen_Init(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration)
|
||||
{
|
||||
_Screen_Last = Screen_Init;
|
||||
_Screen_Tick = Screen_Tick;
|
||||
_Screen_Click = Screen_Click;
|
||||
_Screen_Touch_Event = Screen_Touch_Event;
|
||||
_Screen_Action_CW = Screen_Action_CW;
|
||||
@@ -116,26 +133,20 @@ void Screen_Setup_Menu_Main(Screen_Transition_Direction direction_out, Screen_Tr
|
||||
|
||||
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
|
||||
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
//////////////////////////////
|
||||
// Add Display Objects here //
|
||||
//////////////////////////////
|
||||
|
||||
_Object_Ring_Menu = Display_Objects_Add_Menu_Ring(_Ring_Menu_Items, ENTRY_COUNT, &_Ring_Menu_Selected, &_Ring_Menu_Config);
|
||||
_Object_Ring_Menu = Display_Objects_Add_Menu_Ring(_Ring_Menu_Items, ENTRY_COUNT, &_Ring_Menu_Selected, &_Ring_Menu_Config);
|
||||
|
||||
if(do_menu_animation) {
|
||||
if(_Do_Menu_Animation) {
|
||||
Display_Objects_Menu_Ring_Start_Appear_Animation(_Object_Ring_Menu);
|
||||
}
|
||||
|
||||
Display_Select_First_Object();
|
||||
Display_Select_Object();
|
||||
_Do_Menu_Animation = false;
|
||||
|
||||
// Initialize values
|
||||
_Ring_Menu_Selected = 0;
|
||||
if(selected_entry < ENTRY_COUNT) {
|
||||
_Ring_Menu_Selected = selected_entry;
|
||||
}
|
||||
Display_Select_First_Object();
|
||||
Display_Select_Object();
|
||||
}
|
||||
|
||||
void Screen_Tick(void)
|
||||
|
||||
Reference in New Issue
Block a user