diff options
Diffstat (limited to 'apps/menu.h')
-rw-r--r-- | apps/menu.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/menu.h b/apps/menu.h index f5bc2dd179..fa5d7e5b93 100644 --- a/apps/menu.h +++ b/apps/menu.h | |||
@@ -60,6 +60,9 @@ void menu_talk_selected(int m); | |||
60 | enum menu_item_type { | 60 | enum menu_item_type { |
61 | MT_MENU = 0, | 61 | MT_MENU = 0, |
62 | MT_SETTING, | 62 | MT_SETTING, |
63 | MT_SETTING_W_TEXT, /* same as setting, but uses different | ||
64 | text for the setting title, | ||
65 | ID2P() or "literal" for the str param */ | ||
63 | MT_FUNCTION_CALL, /* used when the standard code wont work */ | 66 | MT_FUNCTION_CALL, /* used when the standard code wont work */ |
64 | MT_FUNCTION_WITH_PARAM, | 67 | MT_FUNCTION_WITH_PARAM, |
65 | MT_RETURN_ID, /* returns the position of the selected item (starting at 0)*/ | 68 | MT_RETURN_ID, /* returns the position of the selected item (starting at 0)*/ |
@@ -134,6 +137,14 @@ bool do_setting_from_menu(const struct menu_item_ex *temp); | |||
134 | static const struct menu_item_ex name = \ | 137 | static const struct menu_item_ex name = \ |
135 | {MT_SETTING, {.variable = (void*)var},{callback}}; | 138 | {MT_SETTING, {.variable = (void*)var},{callback}}; |
136 | 139 | ||
140 | /* Use this for settings which have a differnt title in their | ||
141 | setting screen than in the menu (e.g scroll options */ | ||
142 | #define MENUITEM_SETTING_W_TEXT(name, var, str, callback ) \ | ||
143 | static const struct menu_callback_with_desc name##__ = {callback,str, Icon_NOICON};\ | ||
144 | static const struct menu_item_ex name = \ | ||
145 | {MT_SETTING_W_TEXT|MENU_HAS_DESC, {.variable = (void*)var }, \ | ||
146 | {.callback_and_desc = & name##__}}; | ||
147 | |||
137 | /* Use this To create a list of NON-XLATABLE (for the time being) Strings | 148 | /* Use this To create a list of NON-XLATABLE (for the time being) Strings |
138 | When the user enters this list and selects one, the menu will exits | 149 | When the user enters this list and selects one, the menu will exits |
139 | and its return value will be the index of the chosen item */ | 150 | and its return value will be the index of the chosen item */ |