From 156b0bc6146eb69a42189907593f4aa4e45775db Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 28 Feb 2011 11:19:59 +0000 Subject: Add the option of linking the %Tl (last touch) tag to a specific touchregion. Both tags now accept an optional label param as the first param. %Tl([label,][timeout]) %T([label,] x, y, width, height, action) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29459 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_tokens.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/gui/skin_engine/skin_tokens.c') diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 1fbe3d714e..cf71014a62 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -1413,8 +1413,12 @@ const char *get_token_value(struct gui_wps *gwps, { #ifdef HAVE_TOUCHSCREEN unsigned int last_touch = touchscreen_last_touch(); + struct touchregion_lastpress *data = token->value.data; + if (data->region) + last_touch = data->region->last_press; + if (last_touch != 0xffff && - TIME_BEFORE(current_tick, token->value.i + last_touch)) + TIME_BEFORE(current_tick, data->timeout + last_touch)) return "t"; #endif } -- cgit v1.2.3