|
@@ -308,33 +308,34 @@ class MenuItem_bool {
|
308
|
308
|
* MenuItem_int3::action_edit(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
|
309
|
309
|
*
|
310
|
310
|
*/
|
311
|
|
-#define _MENU_ITEM_VARIANT_P(TYPE, VARIANT, USE_MULTIPLIER, PLABEL, V...) do { \
|
312
|
|
- _skipStatic = false; \
|
313
|
|
- if (_menuLineNr == _thisItemNr) { \
|
314
|
|
- PGM_P const plabel = PLABEL; \
|
315
|
|
- if (encoderLine == _thisItemNr && ui.use_click()) { \
|
316
|
|
- _MENU_ITEM_MULTIPLIER_CHECK(USE_MULTIPLIER); \
|
317
|
|
- MenuItem_##TYPE ::action ## VARIANT(plabel, ##V); \
|
318
|
|
- if (screen_changed) return; \
|
319
|
|
- } \
|
320
|
|
- if (ui.should_draw()) \
|
321
|
|
- draw_menu_item ## VARIANT ## _ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, plabel, ##V); \
|
322
|
|
- } \
|
323
|
|
- ++_thisItemNr; \
|
|
311
|
+#define _MENU_ITEM_VARIANT_P(TYPE, VARIANT, USE_MULTIPLIER, PLABEL, V...) do { \
|
|
312
|
+ _skipStatic = false; \
|
|
313
|
+ if (_menuLineNr == _thisItemNr) { \
|
|
314
|
+ PGM_P const plabel = PLABEL; \
|
|
315
|
+ if (encoderLine == _thisItemNr && ui.use_click()) { \
|
|
316
|
+ _MENU_ITEM_MULTIPLIER_CHECK(USE_MULTIPLIER); \
|
|
317
|
+ MenuItem_##TYPE ::action ## VARIANT(plabel, ##V); \
|
|
318
|
+ if (screen_changed) return; \
|
|
319
|
+ } \
|
|
320
|
+ if (ui.should_draw()) \
|
|
321
|
+ draw_menu_item ## VARIANT ## _ ## TYPE \
|
|
322
|
+ (encoderLine == _thisItemNr, _lcdLineNr, plabel, ##V); \
|
|
323
|
+ } \
|
|
324
|
+ ++_thisItemNr; \
|
324
|
325
|
}while(0)
|
325
|
326
|
|
326
|
327
|
// Used to print static text with no visible cursor.
|
327
|
328
|
// Parameters: label [, bool center [, bool invert [, char *value] ] ]
|
328
|
|
-#define STATIC_ITEM_P(PLABEL, V...) do{ \
|
329
|
|
- if (_menuLineNr == _thisItemNr) { \
|
330
|
|
- if (_skipStatic && encoderLine <= _thisItemNr) { \
|
331
|
|
- ui.encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
|
332
|
|
- ++encoderLine; \
|
333
|
|
- } \
|
334
|
|
- if (ui.should_draw()) \
|
335
|
|
- draw_menu_item_static(_lcdLineNr, PLABEL, ##V); \
|
336
|
|
- } \
|
337
|
|
- ++_thisItemNr; \
|
|
329
|
+#define STATIC_ITEM_P(PLABEL, V...) do{ \
|
|
330
|
+ if (_menuLineNr == _thisItemNr) { \
|
|
331
|
+ if (_skipStatic && encoderLine <= _thisItemNr) { \
|
|
332
|
+ ui.encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
|
|
333
|
+ ++encoderLine; \
|
|
334
|
+ } \
|
|
335
|
+ if (ui.should_draw()) \
|
|
336
|
+ draw_menu_item_static(_lcdLineNr, PLABEL, ##V); \
|
|
337
|
+ } \
|
|
338
|
+ ++_thisItemNr; \
|
338
|
339
|
} while(0)
|
339
|
340
|
|
340
|
341
|
#define MENU_ITEM_ADDON_START(X) do{ \
|