diff options
| author | Frank Gevaerts <frank@gevaerts.be> | 2012-02-25 02:34:23 +0100 |
|---|---|---|
| committer | Frank Gevaerts <frank@gevaerts.be> | 2012-02-25 16:43:27 +0100 |
| commit | b5cd5ce8a136e49b6c8b9d541a5b4928709a8956 (patch) | |
| tree | e4fae006e0f11dbeb74881adbb79e379125abffa /apps/gui/skin_engine | |
| parent | 7d599b43117dc82eae0e7dbf18290bcf4b73bc28 (diff) | |
| download | rockbox-b5cd5ce8a136e49b6c8b9d541a5b4928709a8956.zip rockbox-b5cd5ce8a136e49b6c8b9d541a5b4928709a8956.tar.gz rockbox-b5cd5ce8a136e49b6c8b9d541a5b4928709a8956.tar.bz2 rockbox-b5cd5ce8a136e49b6c8b9d541a5b4928709a8956.tar.xz | |
Add %LR and %LC to get at the current row and columm in skinned lists.
This allows list items to be rendered differently depending on their
on-screen position, allowing things like gradients or nonlinear alignment
Change-Id: I1d9c080f97e83707f0e80f57abc762cb2b94f6ed
Diffstat (limited to 'apps/gui/skin_engine')
| -rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 7651025..29ddad4 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -981,6 +981,16 @@ const char *get_token_value(struct gui_wps *gwps, struct listitem *li = (struct listitem *)SKINOFFSETTOPTR(get_skin_buffer(data), token->value.data); return skinlist_get_item_text(li->offset, li->wrap, buf, buf_size); } + case SKIN_TOKEN_LIST_ITEM_ROW: + if (intval) + *intval = skinlist_get_item_row() + 1; + snprintf(buf, buf_size, "%d",skinlist_get_item_row() + 1); + return buf; + case SKIN_TOKEN_LIST_ITEM_COLUMN: + if (intval) + *intval = skinlist_get_item_column() + 1; + snprintf(buf, buf_size, "%d",skinlist_get_item_column() + 1); + return buf; case SKIN_TOKEN_LIST_ITEM_NUMBER: if (intval) *intval = skinlist_get_item_number() + 1; |