2 new touch region options... "settings_inc" and "settings_dec" which will increase or decrease most of the available settings. To use it put the config name of the setting as the next param after settings_inc... i.e %T(0, 0, 32, 32, settings_inc, repeat)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28009 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-09-06 13:33:49 +00:00
parent 1a92ff0994
commit 4caa8326ab
10 changed files with 66 additions and 8 deletions

View file

@ -30,6 +30,7 @@
#include "action.h"
#include "appevents.h"
#include "statusbar-skinned.h"
#include "option_select.h"
extern struct wps_state wps_state; /* from wps.c */
@ -116,9 +117,10 @@ int fms_do_button_loop(bool update_screen)
int button = skin_wait_for_action(fms_skin, CONTEXT_FM,
update_screen ? TIMEOUT_NOBLOCK : HZ/5);
#ifdef HAVE_TOUCHSCREEN
struct touchregion *region;
int offset;
if (button == ACTION_TOUCHSCREEN)
button = skin_get_touchaction(&fms_skin_data[SCREEN_MAIN], &offset);
button = skin_get_touchaction(&fms_skin_data[SCREEN_MAIN], &offset, &region);
switch (button)
{
case ACTION_WPS_STOP:
@ -136,6 +138,13 @@ int fms_do_button_loop(bool update_screen)
case WPS_TOUCHREGION_SCROLLBAR:
/* TODO */
break;
case ACTION_SETTINGS_INC:
case ACTION_SETTINGS_DEC:
{
const struct settings_list *setting = region->extradata;
option_select_next_val(setting, button == ACTION_SETTINGS_DEC, true);
}
return ACTION_REDRAW;
}
#endif
return button;