| | 157 | |
| | 158 | 4. Search for all menu and inputs forms such as search for "FORM_INIT" make appropriate changes to use new style FORM_ADD_INPUT2 instead of FORM_ADD_INPUT and FORM_ADD_BUTTON2 instead of FORM_ADD_BUTTON such as: |
| | 159 | |
| | 160 | {{{ |
| | 161 | void MenuConfig(void) |
| | 162 | { |
| | 163 | #if ARM64 |
| | 164 | CFormRect rect; |
| | 165 | CFormButton btnExit; |
| | 166 | |
| | 167 | FORM_INIT(Menu, EventMenuCfgShow, NULL, NULL, NULL, nFormFlgNone); |
| | 168 | |
| | 169 | formMenu.SetFontSet(&formFontSet); |
| | 170 | |
| | 171 | rect.SetLeftAndWidthBasedOnDspArea(formMenu.GetDspArea(), MENU_BTN_LEFT_OFFSET_PERCENT, MENU_BTN_TWO_COLUMN_WIDTH_PERCENT); |
| | 172 | rect.SetTopAndHeightBasedOnFont(formFontSet.GetFont(fontIndexPrompt), |
| | 173 | MENU_BTN_TOP_FONT_HEIGHT_MULTIPLIER, MENU_BTN_HEIGHT_FONT_HEIGHT_MULTIPLIER); |
| | 174 | |
| | 175 | FORM_ADD_BUTTON2(Menu, Tickets, rect, LANG(STR_CONFIG_TICKETS_BTN), 'T', EventMenuTickets, FORM_BUTTON_SHADOW); |
| | 176 | rect += buttonAdvanceY; |
| | 177 | FORM_ADD_BUTTON2(Menu, CfgIDs, rect, LANG(STR_CONFIG_IDS_BTN), 'I', EventMenuCfgIDs, FORM_BUTTON_SHADOW); |
| | 178 | rect += buttonAdvanceY; |
| | 179 | FORM_ADD_BUTTON2(Menu, Scoreboard, rect, LANG(STR_CONFIG_SCOREBOARD_BTN), 'S', EventMenuScoreboard, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 180 | rect += buttonAdvanceY; |
| | 181 | FORM_ADD_BUTTON2(Menu, RFID, rect, LANG(STR_CONFIG_BADGE_BTN), 'F', EventMenuBadge, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 182 | rect += buttonAdvanceY; |
| | 183 | |
| | 184 | rect.SetLeftAndWidthBasedOnDspArea(formMenu.GetDspArea(), MENU_BTN_LEFT_OFFSET_PERCENT, 0.68); |
| | 185 | |
| | 186 | FORM_ADD_BUTTON2(Menu, LocalRemote, rect, LANG(STR_CONFIG_LOCAL_REMOTE_BTN), 'R', EventMenuLocalRemote, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 187 | rect += buttonAdvanceY; |
| | 188 | FORM_ADD_BUTTON2(Menu, Mobile, rect, LANG(STR_CONFIG_MOBILE_BTN), 'R', EventMenuMobile, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 189 | |
| | 190 | rect.SetLeftAndWidthBasedOnDspArea(formMenu.GetDspArea(), MENU_BTN_MID_LEFT, MENU_BTN_TWO_COLUMN_WIDTH_PERCENT); |
| | 191 | rect.SetTopAndHeightBasedOnFont(formFontSet.GetFont(fontIndexPrompt), |
| | 192 | MENU_BTN_TOP_FONT_HEIGHT_MULTIPLIER, MENU_BTN_HEIGHT_FONT_HEIGHT_MULTIPLIER); |
| | 193 | |
| | 194 | FORM_ADD_BUTTON2(Menu, Language, rect, LANG(STR_CONFIG_LANGUAGE_BTN), 'L', EventMenuLanguage, FORM_BUTTON_SHADOW); |
| | 195 | rect += buttonAdvanceY; |
| | 196 | FORM_ADD_BUTTON2(Menu, WeightAlarm, rect, LANG(STR_CONFIG_WEIGHT_ALARM_BTN), 'A', EventMenuWeightAlarm, FORM_BUTTON_SHADOW| FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 197 | #if IP_CAMERA_CAPTURE |
| | 198 | rect += buttonAdvanceY; |
| | 199 | FORM_ADD_BUTTON2(Menu, Cameras, rect, LANG(STR_CONFIG_CAMERAS_BTN), 'A', EventMenuCameras, FORM_BUTTON_SHADOW); |
| | 200 | #endif |
| | 201 | |
| | 202 | AddFormExitButton(formMenu, btnExit); |
| | 203 | |
| | 204 | #else |
| | 205 | |
| | 206 | FORM_INIT(Menu, EventMenuCfgShow, NULL, NULL, NULL, nFormFlgNone); |
| | 207 | FORM_ADD_BUTTON(Menu, Tickets, MENU_COL1_X, MENU_ROW1_Y, LANG(STR_CONFIG_TICKETS_BTN), 'T', EventMenuTickets, FORM_BUTTON_INVERT); |
| | 208 | FORM_ADD_BUTTON(Menu, CfgIDs, MENU_COL1_X, MENU_ROW2_Y, LANG(STR_CONFIG_IDS_BTN), 'I', EventMenuCfgIDs, FORM_BUTTON_INVERT); |
| | 209 | FORM_ADD_BUTTON(Menu, Scoreboard, MENU_COL1_X, MENU_ROW3_Y, LANG(STR_CONFIG_SCOREBOARD_BTN), 'S', EventMenuScoreboard, FORM_BUTTON_INVERT | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 210 | FORM_ADD_BUTTON(Menu, RFID, MENU_COL1_X, MENU_ROW4_Y, LANG(STR_CONFIG_BADGE_BTN), 'F', EventMenuBadge, FORM_BUTTON_INVERT | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 211 | FORM_ADD_BUTTON(Menu, LocalRemote, MENU_COL1_X, MENU_ROW5_Y, LANG(STR_CONFIG_LOCAL_REMOTE_BTN), 'R', EventMenuLocalRemote, FORM_BUTTON_INVERT | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 212 | FORM_ADD_BUTTON(Menu, Mobile, MENU_COL1_X, MENU_ROW6_Y, LANG(STR_CONFIG_MOBILE_BTN), 'R', EventMenuMobile, FORM_BUTTON_INVERT | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 213 | |
| | 214 | FORM_ADD_BUTTON(Menu, Language, MENU_COL2_X, MENU_ROW1_Y, LANG(STR_CONFIG_LANGUAGE_BTN), 'L', EventMenuLanguage, FORM_BUTTON_INVERT); |
| | 215 | FORM_ADD_BUTTON(Menu, WeightAlarm, MENU_COL2_X, MENU_ROW2_Y, LANG(STR_CONFIG_WEIGHT_ALARM_BTN), 'A', EventMenuWeightAlarm, FORM_BUTTON_INVERT| FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
| | 216 | FORM_ADD_BUTTON(Menu, Exit, EXIT_BTN_X, EXIT_BTN_Y, LANG(STR_EXIT_BTN), 'X', EventExit, FORM_BUTTON_INVERT); |
| | 217 | #endif |
| | 218 | FORM_SHOW(Menu); |
| | 219 | FORM_RUN(Menu); |
| | 220 | FORM_HIDE(Menu); |
| | 221 | |
| | 222 | } |
| | 223 | |
| | 224 | }}} |