WIDGET_RANGE cursor position #325
Unanswered
QuirkyTurtle94
asked this question in
Q&A
Replies: 1 comment
-
|
Do you call the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have 2 ITEM_WIDGETs, each displaying a series of WIDGET_RANGEs (1st line is the time, 2nd line is the date) and I'm having a weird UX issue where if I'm editing the top widget (ie the time), the cursor flashes the exact cell BELOW on the LCD (so for example if my time hour value is 10 and I'm changing it, it will be the date day value that flashes (but the hour value will be the one changing).
I suspect this is some issue with the cursor offset but I can't seem to get it to work - any tips?
`MENU_SCREEN(setDTScreen, DTitems,
ITEM_WIDGET(
"Time",
[](int DTHour, int DTMinute, int DTSecond) {setDTHour = DTHour; setDTMinute = DTMinute; setDTSecond = DTSecond;},
WIDGET_RANGE(int(now.hour()), 1, 0, 23, "%02d", 0, true),
WIDGET_RANGE(int(now.minute()), 1, 0, 59, ":%02d", 0, true),
WIDGET_RANGE(int(now.second()), 1, 0, 59, ":%02d", 0, true)),
ITEM_WIDGET(
"Date",
[](int DTDay, int DTMonth, int DTYear) {setDTYear = DTYear+2000; setDTMonth = DTMonth; setDTDay = DTDay;},
WIDGET_RANGE(int(now.day()), 1, 0, 31, "%02d", 0, true),
WIDGET_RANGE(int(now.month()), 1, 0, 12, ":%02d", 0, true),
WIDGET_RANGE(int(now.year()-2000), 1, 0, 99, ":%02d", 0, false)),
ITEM_COMMAND("SAVE", {
rtc.adjust(DateTime(setDTYear, setDTMonth, setDTDay, setDTHour,setDTMinute,setDTSecond));
}),
ITEM_SUBMENU("EXIT", mainScreen)
);`
Beta Was this translation helpful? Give feedback.
All reactions