summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/bitmaps/native/SOURCES12
-rw-r--r--apps/plugins/bitmaps/native/pictureflow_emptyslide.100x100x16.bmp (renamed from apps/plugins/bitmaps/native/pictureflow_emptyslide.bmp)bin30054 -> 30054 bytes
-rw-r--r--apps/plugins/bitmaps/native/pictureflow_emptyslide.50x50x16.bmpbin0 -> 7654 bytes
-rw-r--r--apps/plugins/bitmaps/native/pictureflow_logo.100x18x16.bmpbin0 -> 5454 bytes
-rw-r--r--apps/plugins/bitmaps/native/pictureflow_logo.193x34x16.bmp (renamed from apps/plugins/bitmaps/native/pictureflow_logo.bmp)bin19776 -> 19776 bytes
-rw-r--r--apps/plugins/pictureflow.c50
6 files changed, 50 insertions, 12 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index 5a36ec04a0..1acc903387 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -512,8 +512,16 @@ matrix_normal.bmp
512 512
513/* pictureflow */ 513/* pictureflow */
514#if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE) 514#if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE)
515pictureflow_logo.bmp 515#if (LCD_WIDTH < 200)
516pictureflow_emptyslide.bmp 516 pictureflow_logo.100x18x16.bmp
517#else
518 pictureflow_logo.193x34x16.bmp
519#endif
520#if (LCD_HEIGHT < 200 )
521 pictureflow_emptyslide.50x50x16.bmp
522#else
523 pictureflow_emptyslide.100x100x16.bmp
524#endif
517#endif 525#endif
518 526
519#endif /* HAVE_LCD_BITMAP */ 527#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/bitmaps/native/pictureflow_emptyslide.bmp b/apps/plugins/bitmaps/native/pictureflow_emptyslide.100x100x16.bmp
index ff59a4f601..ff59a4f601 100644
--- a/apps/plugins/bitmaps/native/pictureflow_emptyslide.bmp
+++ b/apps/plugins/bitmaps/native/pictureflow_emptyslide.100x100x16.bmp
Binary files differ
diff --git a/apps/plugins/bitmaps/native/pictureflow_emptyslide.50x50x16.bmp b/apps/plugins/bitmaps/native/pictureflow_emptyslide.50x50x16.bmp
new file mode 100644
index 0000000000..dc7cd55c7b
--- /dev/null
+++ b/apps/plugins/bitmaps/native/pictureflow_emptyslide.50x50x16.bmp
Binary files differ
diff --git a/apps/plugins/bitmaps/native/pictureflow_logo.100x18x16.bmp b/apps/plugins/bitmaps/native/pictureflow_logo.100x18x16.bmp
new file mode 100644
index 0000000000..815c5d68ca
--- /dev/null
+++ b/apps/plugins/bitmaps/native/pictureflow_logo.100x18x16.bmp
Binary files differ
diff --git a/apps/plugins/bitmaps/native/pictureflow_logo.bmp b/apps/plugins/bitmaps/native/pictureflow_logo.193x34x16.bmp
index 174c5f1d13..174c5f1d13 100644
--- a/apps/plugins/bitmaps/native/pictureflow_logo.bmp
+++ b/apps/plugins/bitmaps/native/pictureflow_logo.193x34x16.bmp
Binary files differ
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c
index 9d4294ead1..49c56925ca 100644
--- a/apps/plugins/pictureflow.c
+++ b/apps/plugins/pictureflow.c
@@ -77,8 +77,13 @@ const struct button_mapping *plugin_contexts[]
77#define MAX_IMG_WIDTH LCD_WIDTH 77#define MAX_IMG_WIDTH LCD_WIDTH
78#define MAX_IMG_HEIGHT LCD_HEIGHT 78#define MAX_IMG_HEIGHT LCD_HEIGHT
79 79
80#if (LCD_WIDTH < 200)
81#define PREFERRED_IMG_WIDTH 50
82#define PREFERRED_IMG_HEIGHT 50
83#else
80#define PREFERRED_IMG_WIDTH 100 84#define PREFERRED_IMG_WIDTH 100
81#define PREFERRED_IMG_HEIGHT 100 85#define PREFERRED_IMG_HEIGHT 100
86#endif
82 87
83#define BUFFER_WIDTH LCD_WIDTH 88#define BUFFER_WIDTH LCD_WIDTH
84#define BUFFER_HEIGHT LCD_HEIGHT 89#define BUFFER_HEIGHT LCD_HEIGHT
@@ -477,7 +482,6 @@ bool get_albumart_for_index_from_db(int slide_index, char *buf, int buflen)
477 */ 482 */
478void draw_splashscreen(void) 483void draw_splashscreen(void)
479{ 484{
480 int txt_w, txt_h;
481 struct screen* display = rb->screens[0]; 485 struct screen* display = rb->screens[0];
482 486
483 rb->lcd_set_background(LCD_RGBPACK(0,0,0)); 487 rb->lcd_set_background(LCD_RGBPACK(0,0,0));
@@ -485,10 +489,7 @@ void draw_splashscreen(void)
485 rb->lcd_clear_display(); 489 rb->lcd_clear_display();
486 490
487 const struct picture* logo = &(logos[display->screen_type]); 491 const struct picture* logo = &(logos[display->screen_type]);
488 picture_draw(display, logo, (LCD_WIDTH - logo->width) / 2, 20); 492 picture_draw(display, logo, (LCD_WIDTH - logo->width) / 2, 10);
489
490 rb->lcd_getstringsize("Preparing album artwork", &txt_w, &txt_h);
491 rb->lcd_putsxy((LCD_WIDTH - txt_w)/2, 100, "Preparing album artwork");
492 493
493 rb->lcd_update(); 494 rb->lcd_update();
494} 495}
@@ -499,11 +500,18 @@ void draw_splashscreen(void)
499 */ 500 */
500void draw_progressbar(int step) 501void draw_progressbar(int step)
501{ 502{
503 int txt_w, txt_h;
502 const int bar_height = 22; 504 const int bar_height = 22;
503 const int w = LCD_WIDTH - 20; 505 const int w = LCD_WIDTH - 20;
504 const int y = 130;
505 const int x = 10; 506 const int x = 10;
506 507
508 rb->lcd_getstringsize("Preparing album artwork", &txt_w, &txt_h);
509
510 int y = (LCD_HEIGHT - txt_h)/2;
511
512 rb->lcd_putsxy((LCD_WIDTH - txt_w)/2, y, "Preparing album artwork");
513 y += (txt_h + 5);
514
507 rb->lcd_set_foreground(LCD_RGBPACK(100,100,100)); 515 rb->lcd_set_foreground(LCD_RGBPACK(100,100,100));
508 rb->lcd_drawrect(x, y, w+2, bar_height); 516 rb->lcd_drawrect(x, y, w+2, bar_height);
509 rb->lcd_set_foreground(LCD_RGBPACK(165, 231, 82)); 517 rb->lcd_set_foreground(LCD_RGBPACK(165, 231, 82));
@@ -1576,7 +1584,10 @@ int main(void)
1576 long update_interval = 100; 1584 long update_interval = 100;
1577 int fps = 0; 1585 int fps = 0;
1578 int albumtxt_w, albumtxt_h; 1586 int albumtxt_w, albumtxt_h;
1579 int ret; 1587 int albumtxt_x = 0, albumtxt_y = 0;
1588 int albumtxt_dir = -1;
1589 int ret, c;
1590 int prev_center_index = -1;
1580 1591
1581 while (true) { 1592 while (true) {
1582 current_update = *rb->current_tick; 1593 current_update = *rb->current_tick;
@@ -1597,14 +1608,33 @@ int main(void)
1597 } 1608 }
1598 1609
1599 albumtxt = get_album_name(center_index); 1610 albumtxt = get_album_name(center_index);
1600 rb->lcd_set_foreground(LCD_RGBPACK(255, 255, 255)); 1611 if ( animation_is_active ) {
1612 c = ((slide_frame & 0xffff )/ 256);
1613 if (step > 0) c = 255-c;
1614 }
1615 else c= 255;
1616 rb->lcd_set_foreground(LCD_RGBPACK(c,c,c));
1601 rb->lcd_getstringsize(albumtxt, &albumtxt_w, &albumtxt_h); 1617 rb->lcd_getstringsize(albumtxt, &albumtxt_w, &albumtxt_h);
1602 rb->lcd_putsxy((LCD_WIDTH - albumtxt_w) /2, LCD_HEIGHT-albumtxt_h-10, albumtxt); 1618 if (center_index != prev_center_index) {
1619 albumtxt_x = 0;
1620 albumtxt_dir = -1;
1621 albumtxt_y = LCD_HEIGHT-albumtxt_h-10;
1622 prev_center_index = center_index;
1623 }
1624 if (albumtxt_w > LCD_WIDTH && ! animation_is_active ) {
1625 rb->lcd_putsxy(albumtxt_x, albumtxt_y , albumtxt);
1626 if ( albumtxt_w + albumtxt_x <= LCD_WIDTH ) albumtxt_dir = 1;
1627 else if ( albumtxt_x >= 0 ) albumtxt_dir = -1;
1628 albumtxt_x += albumtxt_dir;
1629 }
1630 else {
1631 rb->lcd_putsxy((LCD_WIDTH - albumtxt_w) /2, albumtxt_y , albumtxt);
1632 }
1603 1633
1604 rb->lcd_update(); 1634 rb->lcd_update();
1605 rb->yield(); 1635 rb->yield();
1606 1636
1607 button = pluginlib_getaction(rb, animation_is_active ? 0 : HZ/10, 1637 button = pluginlib_getaction(rb, animation_is_active ? 0 : HZ/16,
1608 plugin_contexts, NB_ACTION_CONTEXTS); 1638 plugin_contexts, NB_ACTION_CONTEXTS);
1609 1639
1610 switch (button) { 1640 switch (button) {