220 | | void MenuConfig(void) |
221 | | { |
222 | | #if ARM64 |
223 | | CFormRect rect; |
224 | | CFormButton btnExit; |
225 | | |
226 | | FORM_INIT(Menu, EventMenuCfgShow, NULL, NULL, NULL, nFormFlgNone); |
227 | | |
228 | | formMenu.SetFontSet(&formFontSet); |
229 | | |
230 | | rect.SetLeftAndWidthBasedOnDspArea(formMenu.GetDspArea(), MENU_BTN_LEFT_OFFSET_PERCENT, MENU_BTN_TWO_COLUMN_WIDTH_PERCENT); |
231 | | rect.SetTopAndHeightBasedOnFont(formFontSet.GetFont(fontIndexPrompt), |
232 | | MENU_BTN_TOP_FONT_HEIGHT_MULTIPLIER, MENU_BTN_HEIGHT_FONT_HEIGHT_MULTIPLIER); |
233 | | |
234 | | FORM_ADD_BUTTON2(Menu, Tickets, rect, LANG(STR_CONFIG_TICKETS_BTN), 'T', EventMenuTickets, FORM_BUTTON_SHADOW); |
235 | | rect += buttonAdvanceY; |
236 | | FORM_ADD_BUTTON2(Menu, CfgIDs, rect, LANG(STR_CONFIG_IDS_BTN), 'I', EventMenuCfgIDs, FORM_BUTTON_SHADOW); |
237 | | rect += buttonAdvanceY; |
238 | | FORM_ADD_BUTTON2(Menu, Scoreboard, rect, LANG(STR_CONFIG_SCOREBOARD_BTN), 'S', EventMenuScoreboard, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
239 | | rect += buttonAdvanceY; |
240 | | FORM_ADD_BUTTON2(Menu, RFID, rect, LANG(STR_CONFIG_BADGE_BTN), 'F', EventMenuBadge, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
241 | | rect += buttonAdvanceY; |
242 | | |
243 | | rect.SetLeftAndWidthBasedOnDspArea(formMenu.GetDspArea(), MENU_BTN_LEFT_OFFSET_PERCENT, 0.68); |
244 | | |
245 | | FORM_ADD_BUTTON2(Menu, LocalRemote, rect, LANG(STR_CONFIG_LOCAL_REMOTE_BTN), 'R', EventMenuLocalRemote, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
246 | | rect += buttonAdvanceY; |
247 | | FORM_ADD_BUTTON2(Menu, Mobile, rect, LANG(STR_CONFIG_MOBILE_BTN), 'R', EventMenuMobile, FORM_BUTTON_SHADOW | FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
248 | | |
249 | | rect.SetLeftAndWidthBasedOnDspArea(formMenu.GetDspArea(), MENU_BTN_MID_LEFT, MENU_BTN_TWO_COLUMN_WIDTH_PERCENT); |
250 | | rect.SetTopAndHeightBasedOnFont(formFontSet.GetFont(fontIndexPrompt), |
251 | | MENU_BTN_TOP_FONT_HEIGHT_MULTIPLIER, MENU_BTN_HEIGHT_FONT_HEIGHT_MULTIPLIER); |
252 | | |
253 | | FORM_ADD_BUTTON2(Menu, Language, rect, LANG(STR_CONFIG_LANGUAGE_BTN), 'L', EventMenuLanguage, FORM_BUTTON_SHADOW); |
254 | | rect += buttonAdvanceY; |
255 | | FORM_ADD_BUTTON2(Menu, WeightAlarm, rect, LANG(STR_CONFIG_WEIGHT_ALARM_BTN), 'A', EventMenuWeightAlarm, FORM_BUTTON_SHADOW| FORM_OUTLINE_1LINE_WND | FORM_SHOW_EVENT); |
256 | | #if IP_CAMERA_CAPTURE |
257 | | rect += buttonAdvanceY; |
258 | | FORM_ADD_BUTTON2(Menu, Cameras, rect, LANG(STR_CONFIG_CAMERAS_BTN), 'A', EventMenuCameras, FORM_BUTTON_SHADOW); |
259 | | #endif |
260 | | |
261 | | AddFormExitButton(formMenu, btnExit); |
262 | | |
263 | | #else |
264 | | |
265 | | FORM_INIT(Menu, EventMenuCfgShow, NULL, NULL, NULL, nFormFlgNone); |
266 | | FORM_ADD_BUTTON(Menu, Tickets, MENU_COL1_X, MENU_ROW1_Y, LANG(STR_CONFIG_TICKETS_BTN), 'T', EventMenuTickets, FORM_BUTTON_INVERT); |
267 | | FORM_ADD_BUTTON(Menu, CfgIDs, MENU_COL1_X, MENU_ROW2_Y, LANG(STR_CONFIG_IDS_BTN), 'I', EventMenuCfgIDs, FORM_BUTTON_INVERT); |
268 | | 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); |
269 | | 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); |
270 | | 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); |
271 | | 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); |
272 | | |
273 | | FORM_ADD_BUTTON(Menu, Language, MENU_COL2_X, MENU_ROW1_Y, LANG(STR_CONFIG_LANGUAGE_BTN), 'L', EventMenuLanguage, FORM_BUTTON_INVERT); |
274 | | 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); |
275 | | FORM_ADD_BUTTON(Menu, Exit, EXIT_BTN_X, EXIT_BTN_Y, LANG(STR_EXIT_BTN), 'X', EventExit, FORM_BUTTON_INVERT); |
276 | | #endif |
277 | | FORM_SHOW(Menu); |
278 | | FORM_RUN(Menu); |
279 | | FORM_HIDE(Menu); |
280 | | |
281 | | } |
282 | | |
283 | | }}} |
284 | | |
285 | | |
| 220 | #if ARM64 |
| 221 | FORM_INIT(Update, EventDownloadedFileShow, NULL, NULL, NULL, 0); |
| 222 | |
| 223 | SetupMenuFormToUseFontSet(formUpdate, rect, 0.8 ); |
| 224 | |
| 225 | FORM_ADD_BUTTON2(Update, Export, rect, "Export", 'X', EventExport, FORM_BUTTON_SHADOW, NULL); |
| 226 | rect += invertBtnAdvanceY; |
| 227 | FORM_ADD_BUTTON2(Update, Import, rect, "Import", 'I', EventImport, FORM_BUTTON_SHADOW, NULL); |
| 228 | #else |
| 229 | FORM_INIT(Update, EventDownloadedFileShow, NULL, NULL, NULL, 0); |
| 230 | |
| 231 | FORM_ADD_BUTTON(Update, Export, MENU_COL1_X, MENU_ROW1_Y, " Export ", 'X', EventExport, FORM_BUTTON_INVERT); |
| 232 | FORM_ADD_BUTTON(Update, Import, MENU_COL1_X, MENU_ROW2_Y, " Import ", 'I', EventImport, FORM_BUTTON_INVERT); |
| 233 | #endif |
| 234 | |
| 235 | FORM_SHOW(Update); |
| 236 | FORM_RUN(Update); |
| 237 | FORM_HIDE(Update); |
| 238 | |
| 239 | }}} |
| 240 | |