[FL-1217] Menu refactoring (#726)
* menu: remove dead code * loader: change views from modules instead of menu service * dolphin: start main menu with loader API * applications: don't start menu service * loader: add debug tools menu * gui modules: introduce menu model * loader: remove calls to menu service API * gui modules: implement menu module * loader: add menu view * gui menu: add animation * applications: remove menu service * gui modules: rename icon_menu -> menu * loader: clean up code * menu module: add documentation, format code * menu: remove unused parameter * desktop: use loader to launch primary menu * Applications: cleaner makefile app declaration. Loader: application autostart * Gui: cleanup menu and submenu API. Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -16,12 +16,12 @@ void SubmenuVM::clean() {
|
||||
submenu_clean(submenu);
|
||||
}
|
||||
|
||||
SubmenuItem* SubmenuVM::add_item(
|
||||
void SubmenuVM::add_item(
|
||||
const char* label,
|
||||
uint32_t index,
|
||||
SubmenuItemCallback callback,
|
||||
void* callback_context) {
|
||||
return submenu_add_item(submenu, label, index, callback, callback_context);
|
||||
submenu_add_item(submenu, label, index, callback, callback_context);
|
||||
}
|
||||
|
||||
void SubmenuVM::set_selected_item(uint32_t index) {
|
||||
|
@@ -16,9 +16,8 @@ public:
|
||||
* @param index - menu item index, used for callback, may be the same with other items
|
||||
* @param callback - menu item callback
|
||||
* @param callback_context - menu item callback context
|
||||
* @return SubmenuItem instance that can be used to modify or delete that item
|
||||
*/
|
||||
SubmenuItem* add_item(
|
||||
void add_item(
|
||||
const char* label,
|
||||
uint32_t index,
|
||||
SubmenuItemCallback callback,
|
||||
|
Reference in New Issue
Block a user