diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-02-28 11:19:59 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-02-28 11:19:59 +0000 |
commit | 156b0bc6146eb69a42189907593f4aa4e45775db (patch) | |
tree | 5280bb9f9116cd0b5b547bf83d6334b6415d7c14 /apps/gui/skin_engine/skin_tokens.c | |
parent | a7fb7366b58e30a876d5754086c8b8f8c99e0654 (diff) | |
download | rockbox-156b0bc6146eb69a42189907593f4aa4e45775db.tar.gz rockbox-156b0bc6146eb69a42189907593f4aa4e45775db.zip |
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
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 6 |
1 files changed, 5 insertions, 1 deletions
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, | |||
1413 | { | 1413 | { |
1414 | #ifdef HAVE_TOUCHSCREEN | 1414 | #ifdef HAVE_TOUCHSCREEN |
1415 | unsigned int last_touch = touchscreen_last_touch(); | 1415 | unsigned int last_touch = touchscreen_last_touch(); |
1416 | struct touchregion_lastpress *data = token->value.data; | ||
1417 | if (data->region) | ||
1418 | last_touch = data->region->last_press; | ||
1419 | |||
1416 | if (last_touch != 0xffff && | 1420 | if (last_touch != 0xffff && |
1417 | TIME_BEFORE(current_tick, token->value.i + last_touch)) | 1421 | TIME_BEFORE(current_tick, data->timeout + last_touch)) |
1418 | return "t"; | 1422 | return "t"; |
1419 | #endif | 1423 | #endif |
1420 | } | 1424 | } |