summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-09-06 13:49:41 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-09-06 13:49:41 +0000
commit9b6ac01c7b55691b62aab15c3302a46f61972197 (patch)
tree8868026c013cddc6c6722597724006eef911c554 /apps/misc.c
parent77a82ad56ab8aa923f47c908ac10b167c8051cf3 (diff)
downloadrockbox-9b6ac01c7b55691b62aab15c3302a46f61972197.tar.gz
rockbox-9b6ac01c7b55691b62aab15c3302a46f61972197.zip
Lists can now be completly draw using the skin engine!
due to lack of user feedback the actual tags may change, hopefully not though. The way it works is the skin specifies a rectangle and a viewport label. For each item in the list that is being displayed all viewports with the specified label are drawn. However, instead of the viewport x/y position being offset from the top left corner like normal they are offset from the rectangle position in the list (so think of them as child-viewports of the rectangle which moves). Normally the rectangle will move down the screen to show a normal list, this can be changed to move across the screen in a grid pattern. The UI viewport is used to bound the items (i.e %Vi() ) Scrolling is completly disabled in all items except the currently selected item. This works well in combination with the %cs tag to show differently styled lists based on the current screen :) New tags: %LT - Get the current items text %LI - Get the current items icon number %Lc - Use as a conditional to determine if the current item is the selected item %LB - BAR TAG to show the scroll bar, params/options like other bar types. It still needs a bit of work though. Use as a conditional to find out if the bar is actually needed %Lb(viewport, width, height [,tile]) - specify the viewport label to draw for each item and the size of each item. if the last param is 'tile' it will form a grid instead of a list example.sbs: %?cs<%Lb(a,100,20)|> %V(0,0,10,-,1)%Vf(aabbcc) %?LB<%LB(0,0,10,185, invert)> %Vi(-,10,0,-,-35,1) %Vl(a,5,5,160,12,1) %s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz %LT zzzzz%s%?Lc<%ar%<%<%<> %V(0,185,-,-,1) %s%LT git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30461 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 69c62da238..6e2bf32770 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -56,6 +56,7 @@
56#include "playlist.h" 56#include "playlist.h"
57#include "yesno.h" 57#include "yesno.h"
58#include "viewport.h" 58#include "viewport.h"
59#include "list.h"
59 60
60#include "debug.h" 61#include "debug.h"
61 62
@@ -1078,11 +1079,25 @@ static enum current_activity
1078static int current_activity_top = 0; 1079static int current_activity_top = 0;
1079void push_current_activity(enum current_activity screen) 1080void push_current_activity(enum current_activity screen)
1080{ 1081{
1082#if HAVE_LCD_BITMAP
1083 int i;
1084#endif
1081 current_activity[current_activity_top++] = screen; 1085 current_activity[current_activity_top++] = screen;
1086#if HAVE_LCD_BITMAP
1087 FOR_NB_SCREENS(i)
1088 skinlist_set_cfg(i, NULL);
1089#endif
1082} 1090}
1083void pop_current_activity(void) 1091void pop_current_activity(void)
1084{ 1092{
1093#if HAVE_LCD_BITMAP
1094 int i;
1095#endif
1085 current_activity_top--; 1096 current_activity_top--;
1097#if HAVE_LCD_BITMAP
1098 FOR_NB_SCREENS(i)
1099 skinlist_set_cfg(i, NULL);
1100#endif
1086} 1101}
1087enum current_activity get_current_activity(void) 1102enum current_activity get_current_activity(void)
1088{ 1103{