Nate Goebel. 1981-2013. My brother departed this world Sunday evening... he was with family, without pain, at peace, and had no doubt he was headed to a better place. I sincerely thank everyone who donated to help him and his family. Nate's Blog

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130  Index: apps/gui/skin_engine/skin_parser.c =================================================================== --- apps/gui/skin_engine/skin_parser.c (revision 28244) +++ apps/gui/skin_engine/skin_parser.c (working copy) @@ -600,6 +600,7 @@ pb->bm.data = NULL; /* no bitmap specified */ pb->follow_lang_direction = follow_lang_direction > 0; pb->nofill = false; + pb->nobar = false; pb->slider = NULL; pb->invert_fill_direction = false; pb->horizontal = true; @@ -672,6 +673,8 @@ pb->invert_fill_direction = true; else if (!strcmp(param->data.text, "nofill")) pb->nofill = true; + else if (!strcmp(param->data.text, "nobar")) + pb->nobar = true; else if (!strcmp(param->data.text, "slider")) { if (curr_param+1 < element->params_count) Index: apps/gui/skin_engine/skin_display.c =================================================================== --- apps/gui/skin_engine/skin_display.c (revision 28244) +++ apps/gui/skin_engine/skin_display.c (working copy) @@ -194,14 +194,36 @@ flags |= INNER_NOFILL; } - if (pb->have_bitmap_pb) - gui_bitmap_scrollbar_draw(display, &pb->bm, - pb->x, y, pb->width, height, - length, 0, end, flags); - else - gui_scrollbar_draw(display, pb->x, y, pb->width, height, - length, 0, end, flags); + if (pb->slider) + { + /* clear the slider */ + int xoff = 0, yoff = 0; + int w = pb->width, h = height; + struct gui_img *img = pb->slider; + if (flags&HORIZONTAL) + { + w += img->bm.width; + xoff = - img->bm.width / 2; + } + else + { + h += img->bm.height; + yoff = - img->bm.height / 2; + } + screen_clear_area(display, pb->x + xoff, y + yoff, w, h); + } + if (!pb->nobar) + { + if (pb->have_bitmap_pb) + gui_bitmap_scrollbar_draw(display, &pb->bm, + pb->x, y, pb->width, height, + length, 0, end, flags); + else + gui_scrollbar_draw(display, pb->x, y, pb->width, height, + length, 0, end, flags); + } + if (pb->slider) { int xoff = 0, yoff = 0; @@ -214,9 +236,7 @@ xoff = pb->width * end / length; if (flags&INVERTFILL) xoff = pb->width - xoff; -#if 0 /* maybe add this in later, make the slider bmp overlap abit */ xoff -= w / 2; -#endif } else { @@ -224,9 +244,7 @@ yoff = height * end / length; if (flags&INVERTFILL) yoff = height - yoff; -#if 0 /* maybe add this in later, make the slider bmp overlap abit */ yoff -= h / 2; -#endif } #if LCD_DEPTH > 1 if(img->bm.format == FORMAT_MONO) { Index: apps/gui/skin_engine/wps_internals.h =================================================================== --- apps/gui/skin_engine/wps_internals.h (revision 28244) +++ apps/gui/skin_engine/wps_internals.h (working copy) @@ -109,6 +109,7 @@ bool invert_fill_direction; bool nofill; + bool nobar; struct gui_img *slider; bool horizontal; }; Index: manual/appendix/wps_tags.tex =================================================================== --- manual/appendix/wps_tags.tex (revision 28244) +++ manual/appendix/wps_tags.tex (working copy) @@ -650,16 +650,23 @@ \item[vertical] -- force the bar to be drawn vertically. \item[invert] -- invert the draw direction (i.e. right to left, or top to bottom). - \item[slider] -- draw an preloaded image over the top of the bar. This must be + \item[slider] -- draw an preloaded image over the top of the bar so that + the centre of the image matches current position. This must be followed by the label of the desired image. \item[nofill] -- don't draw the fill bar, only the empty image (for the desired effect use with the slider'' option). + \item[nobar] -- don't draw the bar entirely including frame (for use + with the slider'' option). \end{description} Example: \config{\%pb(0,0,-,-,-,nofill, slider, slider\_image, invert)} -- draw a horizontal progressbar which doesn't fill and draws the image slider\_image'' which moves right to left. +Note: the slider image will exceed the bar left or right for a horizontal bar by half +width of the image, and top or bottom for a vertical bar by half height of the image. + + \section{Other Tags} \begin{tagmap} \config{\%(} & The character ('\\ `