summaryrefslogtreecommitdiffstats
path: root/apps/radio/radio_skin.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-09-06 13:33:49 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-09-06 13:33:49 +0000
commit4caa8326abd590eb01279dde3f4dc6611a9255c8 (patch)
treec7f0f858ecda565e688b945ab89cd000d8c4fe2c /apps/radio/radio_skin.c
parent1a92ff099499a657c55e1282dab00276100f99f7 (diff)
downloadrockbox-4caa8326abd590eb01279dde3f4dc6611a9255c8.tar.gz
rockbox-4caa8326abd590eb01279dde3f4dc6611a9255c8.tar.bz2
rockbox-4caa8326abd590eb01279dde3f4dc6611a9255c8.zip
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
Diffstat (limited to 'apps/radio/radio_skin.c')
-rw-r--r--apps/radio/radio_skin.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c
index 26e6daccbc..28bd784ad4 100644
--- a/apps/radio/radio_skin.c
+++ b/apps/radio/radio_skin.c
@@ -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;