mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-22 11:32:41 -05:00
FS#9477 - new WPS tag (%mo) which lets the WPS have different "modes" which are changed with the usual "back to browser" button (This button is ONLY stolen if the WPS you use uses this tag.
an example use: %?mo<one|two|three> meaning that when the WPS is first opened "one" will be displayed, pressing select will change it to showing two, pressing it again will show three, and once more will go back to showing one. The text there could be any wps tags (conditional viewports for example...) There is no real limit on the amount of modes, but remember that if you create a WPS which uses this tag more than once that every use HAS to have the same amount of choices or bad things will happen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19110 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
db5965ff9e
commit
76d2dd9c0e
5 changed files with 53 additions and 8 deletions
|
|
@ -136,7 +136,7 @@ long gui_wps_show(void)
|
|||
bool update_track = false;
|
||||
int i;
|
||||
long last_left = 0, last_right = 0;
|
||||
|
||||
bool isremote = false;
|
||||
wps_state_init();
|
||||
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
|
|
@ -234,7 +234,10 @@ long gui_wps_show(void)
|
|||
#else
|
||||
button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
|
||||
#endif
|
||||
|
||||
#if NB_SCREENS > 1
|
||||
isremote = get_action_statuscode(NULL)&ACTION_REMOTE;
|
||||
#endif
|
||||
|
||||
/* Exit if audio has stopped playing. This can happen if using the
|
||||
sleep timer with the charger plugged or if starting a recording
|
||||
from F1 */
|
||||
|
|
@ -292,13 +295,23 @@ long gui_wps_show(void)
|
|||
break;
|
||||
|
||||
case ACTION_WPS_BROWSE:
|
||||
if (gui_wps[isremote?1:0].data->current_mode > -1)
|
||||
{
|
||||
/* will get set to 0 eventually again in wps_parser.c */
|
||||
gui_wps[isremote?1:0].data->current_mode =
|
||||
gui_wps[isremote?1:0].data->current_mode+1;
|
||||
restore = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
status_set_record(false);
|
||||
status_set_audio(false);
|
||||
status_set_record(false);
|
||||
status_set_audio(false);
|
||||
#endif
|
||||
FOR_NB_SCREENS(i)
|
||||
gui_wps[i].display->stop_scroll();
|
||||
return GO_TO_PREVIOUS_BROWSER;
|
||||
FOR_NB_SCREENS(i)
|
||||
gui_wps[i].display->stop_scroll();
|
||||
return GO_TO_PREVIOUS_BROWSER;
|
||||
}
|
||||
break;
|
||||
|
||||
/* play/pause */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue