summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_parser.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2012-02-28 22:26:32 +1100
committerJonathan Gordon <rockbox@jdgordon.info>2012-02-28 23:03:04 +1100
commit2c71aa9feb0268da7d993feddbbe4db591fcd3ba (patch)
tree29b3c1480abca46813ef2dc3bb8f0862b596fe34 /apps/gui/skin_engine/skin_parser.c
parent13f98df5ed6b8183d972f85a1bfe55cf02194941 (diff)
downloadrockbox-2c71aa9feb0268da7d993feddbbe4db591fcd3ba.tar.gz
rockbox-2c71aa9feb0268da7d993feddbbe4db591fcd3ba.zip
lcd/skin_engine: Add the ability to draw onto the backdrop layer
The framebuffer the lcd driver uses can now be changed on the fly which means that regular lcd_* drawing functions can draw onto the "backdrop" buffer. The skin engine can use this to create layered effects. Add the tag %VB to a viewport to draw that viewport onto the backdrop layer. If you want to draw an image onto the backdrop framebuffer use %x(backdrop filename) instead of %X() inside a viewport with %VB. Change-Id: I741498e2af6d4f2d78932cabe8942317893e7cfc
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r--apps/gui/skin_engine/skin_parser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 340cbbdb01..0fe8789bcb 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1832,6 +1832,7 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element)
1832 viewport_set_defaults(&skin_vp->vp, curr_screen); 1832 viewport_set_defaults(&skin_vp->vp, curr_screen);
1833 1833
1834#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) 1834#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1835 skin_vp->output_to_backdrop_buffer = false;
1835 skin_vp->start_fgcolour = skin_vp->vp.fg_pattern; 1836 skin_vp->start_fgcolour = skin_vp->vp.fg_pattern;
1836 skin_vp->start_bgcolour = skin_vp->vp.bg_pattern; 1837 skin_vp->start_bgcolour = skin_vp->vp.bg_pattern;
1837#endif 1838#endif
@@ -2023,6 +2024,11 @@ static int skin_element_callback(struct skin_element* element, void* data)
2023 case SKIN_TOKEN_VIEWPORT_TEXTSTYLE: 2024 case SKIN_TOKEN_VIEWPORT_TEXTSTYLE:
2024 function = parse_viewporttextstyle; 2025 function = parse_viewporttextstyle;
2025 break; 2026 break;
2027 case SKIN_TOKEN_VIEWPORT_DRAWONBG:
2028 curr_vp->output_to_backdrop_buffer = true;
2029 backdrop_filename = BACKDROP_BUFFERNAME;
2030 wps_data->use_extra_framebuffer = true;
2031 break;
2026#endif 2032#endif
2027#ifdef HAVE_LCD_COLOR 2033#ifdef HAVE_LCD_COLOR
2028 case SKIN_TOKEN_VIEWPORT_GRADIENT_SETUP: 2034 case SKIN_TOKEN_VIEWPORT_GRADIENT_SETUP: