summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/skin_engine/skin_parser.c7
-rw-r--r--apps/gui/skin_engine/skin_touchsupport.c2
-rw-r--r--apps/gui/skin_engine/wps_internals.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index bbcb3fe..b9254d9 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1578,12 +1578,19 @@ static int parse_touchregion(const char *wps_bufptr,
region->height = h;
region->wvp = curr_vp;
region->armed = false;
+ region->reverse_bar = false;
end = strchr(action, ')');
if (!end || (size_t)(end-action+1) > sizeof temp)
return WPS_ERROR_INVALID_PARAM;
strlcpy(temp, action, end-action+1);
action = temp;
+
+ if (*action == '!')
+ {
+ region->reverse_bar = true;
+ action++;
+ }
if(!strcmp(pb_string, action))
region->type = WPS_TOUCHREGION_SCROLLBAR;
diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c
index 9c0cda7..09fbd86 100644
--- a/apps/gui/skin_engine/skin_touchsupport.c
+++ b/apps/gui/skin_engine/skin_touchsupport.c
@@ -95,6 +95,8 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset)
*edge_offset = vx*100/r->width;
else
*edge_offset = vy*100/r->height;
+ if (r->reverse_bar)
+ *edge_offset = 100 - *edge_offset;
}
returncode = r->type;
break;
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index 5501dd5..4ef860a 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -228,6 +228,7 @@ struct touchregion {
WPS_TOUCHREGION_SCROLLBAR,
WPS_TOUCHREGION_VOLUME
} type; /* type of touch region */
+ bool reverse_bar; /* if true 0% is the left or top */
bool repeat; /* requires the area be held for the action */
int action; /* action this button will return */
bool armed; /* A region is armed on press. Only armed regions are triggered