mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
get the quickscreen working on the mr500. hold "mode" on the remote to get to it, then you can use the 4 directions on the remote, or the touchscreen to change the values. "mode" will exit, as will pressing in the top or middle of the main screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20935 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6df03c6d53
commit
d48f1a0a45
2 changed files with 32 additions and 2 deletions
|
|
@ -275,7 +275,28 @@ static bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button)
|
|||
talk_qs_option((struct settings_list *)qs->items[item], false);
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
/* figure out which button was pressed...
|
||||
* top is exit, left/right/botton are the respective actions
|
||||
*/
|
||||
static int quickscreen_touchscreen_button(void)
|
||||
{
|
||||
short x,y;
|
||||
if (action_get_touchscreen_press(&x, &y) != BUTTON_REL)
|
||||
return ACTION_NONE;
|
||||
if (y < vps[SCREEN_MAIN][QUICKSCREEN_LEFT].y)
|
||||
return ACTION_STD_CANCEL;
|
||||
else if (y > vps[SCREEN_MAIN][QUICKSCREEN_LEFT].y +
|
||||
vps[SCREEN_MAIN][QUICKSCREEN_LEFT].height)
|
||||
return ACTION_QS_DOWN;
|
||||
else if (x < vps[SCREEN_MAIN][QUICKSCREEN_LEFT].x +
|
||||
vps[SCREEN_MAIN][QUICKSCREEN_LEFT].width)
|
||||
return ACTION_QS_LEFT;
|
||||
else if (x >= vps[SCREEN_MAIN][QUICKSCREEN_RIGHT].x)
|
||||
return ACTION_QS_RIGHT;
|
||||
return ACTION_STD_CANCEL;
|
||||
}
|
||||
#endif
|
||||
bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter)
|
||||
{
|
||||
int button, i;
|
||||
|
|
@ -303,6 +324,10 @@ bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter)
|
|||
talk_qs_option((struct settings_list *)qs->items[QUICKSCREEN_RIGHT], true);
|
||||
while (true) {
|
||||
button = get_action(CONTEXT_QUICKSCREEN,HZ/5);
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
if (button == ACTION_TOUCHSCREEN)
|
||||
button = quickscreen_touchscreen_button();
|
||||
#endif
|
||||
if(default_event_handler(button) == SYS_USB_CONNECTED)
|
||||
return(true);
|
||||
if(gui_quickscreen_do_button(qs, button))
|
||||
|
|
|
|||
|
|
@ -166,8 +166,13 @@ static const struct button_mapping button_context_time[] = {
|
|||
}; /* button_context_time */
|
||||
|
||||
static const struct button_mapping button_context_quickscreen[] = {
|
||||
{ ACTION_STD_CANCEL, BUTTON_RC_MODE, BUTTON_NONE },
|
||||
{ ACTION_QS_DOWNINV, BUTTON_RC_UP, BUTTON_NONE },
|
||||
{ ACTION_QS_DOWN, BUTTON_RC_DOWN, BUTTON_NONE },
|
||||
{ ACTION_QS_LEFT, BUTTON_RC_LEFT, BUTTON_NONE },
|
||||
{ ACTION_QS_RIGHT, BUTTON_RC_RIGHT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_quickscreen */
|
||||
|
||||
static const struct button_mapping button_context_pitchscreen[] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue