From 4caa8326abd590eb01279dde3f4dc6611a9255c8 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 6 Sep 2010 13:33:49 +0000 Subject: 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 --- apps/radio/radio_skin.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps/radio') 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, ®ion); 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; -- cgit v1.2.3