Commit Graph

130 Commits

Author SHA1 Message Date
William Wilgus 40e98a2e49 Whitespace cleanup on fb_viewport Rewrite
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
2020-10-26 12:38:22 -04:00
Solomon Peachy 658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy 8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy 0c4f89370d [2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant.

lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change

Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2020-07-24 21:20:13 +00:00
Szymon Dziok 4c6939fc3d Correct some file permissions.
Change-Id: I4a092a19d6a9c66dfeb2777c9655aa4b19d11e16
2014-09-08 16:04:39 +02:00
Thomas Martitz 532b8141ab skin_engine: Make %Vs affect the whole line.
Previously %Vs styles only took effect upon the first character of text, i.e.
on the right if the line is %arXXX. Now the style is applied for the whole
line width.

Fixes FS#12973.

Change-Id: I95f2cc76a90bfc0779e5a667d5bfa54c33896c89
2014-04-18 13:27:25 +02:00
Thomas Martitz 50f0dd80d6 ab_repeat: Move GUI bits to the skin engine. This allows ab_repeat to be compiled headless.
Change-Id: I4fa3b8ef7139313891ca70df11f7f17c5df38cb7
2014-03-10 22:55:26 +01:00
Thomas Martitz 3ae73433ab skin_engine: New param "noborder" for the bar tags.
By specifying this param the bar will not have a border/box. Instead
the inner part that fills up is maximized on the bar area.

Note that this only affects bars using foreground and background colors,
not those constructed with images.

Change-Id: Ib8dd49ecbaf9e16b96de840f5f365871b73d4fa4
2014-01-12 15:22:29 +01:00
Thomas Martitz 99f3f77ee8 skin_engine: Pass string to put_line() via $t because they can be very large.
Change-Id: I02d6bf492bb42e173a7b436427e3cc3560d80183
2014-01-09 23:28:33 +01:00
Thomas Martitz 91ef65306b skin_engine: Adapt put_line().
This allows for code unification and removal of a workaround (STYLE_XY_PIXELS).

Change-Id: Ie92d377414cad943cdb06976af10b4f315f32710
2014-01-07 14:13:40 +01:00
Alex Mayer ee758c5a97 Theme Engine: Fix progress bar slider (FS#12823)
Fix the need to resize progress bar when using a slider.
Slider stays in bounds. Progress bar is not resized.
Works well with square sliders that should not overlap
edge of progress bar. also works with rounded sliders.

You can also make progress bar the full width of screen
while using a slider. Before if you would make the
progress bar the full width of the screen and add a slider
the progress bar would look like it was padded on both ends.

This fixes FS#12823

Change-Id: I60345efc5cd0f46286f2591ed032f0d9320d1c3e
Reviewed-on: http://gerrit.rockbox.org/402
Reviewed-by: Hayden Pearce <saint.lascivious@gmail.com>
Tested-by: Hayden Pearce <saint.lascivious@gmail.com>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-02-19 07:27:54 +01:00
Jonathan Gordon 685cf59008 9 segment bitmap drawing:
Use %x9(id) to draw an image in the whole current viewport using the
9 segment drawer (which draws the corners as normal and *tiles*
the middle segments to the needed width/height).

Future work is to make it scale instead of tile

Change-Id: Ic3ed1cad93f96091694801eb442e0da5a2401203
2012-12-09 17:11:19 +11:00
Jonathan Gordon 65f9df3083 skin_engine: Allow the %St() (setting) skin tag be used as a bar
%St(<setting name>) or %St(<bar tags>, setting, <setting name>)

Change-Id: I71396d683634d4d1ad2357018c4029ecb4229677
2012-07-05 23:30:06 +10:00
Jonathan Gordon d96a32d01a fix warning
Change-Id: Iccadc7558b9ffb2d87e5bc7697080dd567f4775f
2012-02-29 00:18:56 +11:00
Jonathan Gordon 34031cba5b skin_engine: Clean up %x() handling - beware theme issues
Internally remove some hacks around how %x() is handled.
%x() inside the default viewport will no longer work if
other viewports are used, so if you are using viewports and
%x() make sure it is in a viewport!

Change-Id: I8ecab805d55fc0f8476ff0516cba38e23400aa20
2012-02-28 23:51:01 +11:00
Boris Gjenero 8e6030c822 FS#12378 : Remove various unused code, and comment out some unused code and data for reference or future use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-12-14 21:45:25 +00:00
Jonathan Gordon b3caa01062 Fix FS#12237 (caused by r30302) where centered skin text isnt eqactly centered
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31246 a1c6a512-1295-4272-9138-f99709370657
2011-12-14 09:48:52 +00:00
Jonathan Gordon 9e07ef2b0a Use buflib for all skin engine allocations.
Massive thanks to Michael Chicoine and other testers for finding the early bugs.

This removes all skin memory limitations

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
2011-11-15 14:11:08 +00:00
Thomas Martitz 13209604c1 Add new lcd_bmp and lcd_bmp_part APIs.
This new APIs wrap around lcd_[mono|transparent]_bitmap/_part calls and
handle all kinds bitmaps. The intended use is to draw bitmaps that
come from read_bmp_fd/_file.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30936 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 21:34:46 +00:00
Björn Stenberg 0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Jonathan Gordon a483c9c6f1 Use buflib for skin images. Allows much more images to be loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30478 a1c6a512-1295-4272-9138-f99709370657
2011-09-08 12:38:21 +00:00
Jonathan Gordon 9b6ac01c7b 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
2011-09-06 13:49:41 +00:00
Frank Gevaerts 9b9bd73dfb Fix last charcell warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30307 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 14:13:16 +00:00
Jonathan Gordon c3fe7b0f88 need... sleep... try again to fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30306 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 14:12:21 +00:00
Jonathan Gordon 810e9c4dcb fix charcell again.... wouldnt it be nice to remove charcell support all together? :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30305 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 14:04:46 +00:00
Jonathan Gordon 281f1a1ed6 New skin tags: %Vs() to set the text style and %Vg() to get the viewports gradient colours
%Vs(mode[, param]) : mode can be "invert", "color" (where param is the colour to use", "clear" to disable the current style, "gradient" where param is the number of lines the gradient should draw over.
%Vg(start colour, end colour, [text colour]), if this tag isnt used the list selection colours from the settings will set the gradient colours

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30302 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 13:50:07 +00:00
Bertrik Sikken ab99e941db More tab fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29840 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 20:35:29 +00:00
Jonathan Gordon 343001b5f8 Merge a bunch of code which is 99% identical so it makes it easier to add more of these later
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29535 a1c6a512-1295-4272-9138-f99709370657
2011-03-07 12:45:45 +00:00
Jonathan Gordon f06f685273 New option for the bar tags: 'backdrop, <label>' will draw another image under the progressbar (only works with image and slider bars)
example:
%V(22,253,198,14,-)
%xl(a,PLAY_BAR_BACKDROP-240x320x16.bmp,0,0)
%pb(0,0,198,14,PLAY_BAR-240x320x16.bmp, backdrop, a)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29127 a1c6a512-1295-4272-9138-f99709370657
2011-01-24 09:04:28 +00:00
Jonathan Gordon 519d65f9d6 remove unecessary (duplicated even) header
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29044 a1c6a512-1295-4272-9138-f99709370657
2011-01-13 06:54:35 +00:00
Jonathan Gordon 261c56ba59 FS#11867 - Add 2 new tags to allow skins to display themed peakmeters
%pL for the left channel, %pR for the right channel... usable as a value, conditional or bar (exactly the same as %pv/%bl/etc)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29043 a1c6a512-1295-4272-9138-f99709370657
2011-01-13 06:48:39 +00:00
Jonathan Gordon 1ce7ba4931 Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.
As a conditional it scales its value to the number of options you give it (like volume)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28613 a1c6a512-1295-4272-9138-f99709370657
2010-11-18 11:47:42 +00:00
Jonathan Gordon 9acd242839 skin bar tag: Load an image from a label or filename. i.e %xl(bar_image, pb.bmp,0,0) %pb(0,0,10,10,bar_image) or %pb(0,0,10,10, pb.bmp) both are acceptable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28249 a1c6a512-1295-4272-9138-f99709370657
2010-10-12 12:46:57 +00:00
Teruaki Kawashima 3eb5826c8a improvement for bar tag with slider.
-fix bug the slider is drawn outside of the bounds (FS#11658).
-offset the slider position so that the center of the slider indicates current position.
-add nobar option. if this option is set, the bar isn't drawn at all.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28248 a1c6a512-1295-4272-9138-f99709370657
2010-10-12 12:17:39 +00:00
Frank Gevaerts 1f0ab7c9e6 Fix charcell %pb and %pf tags, FS#11592
This also moves draw_player_fullbar() and draw_player_progress() from skin_display.c to skin_tokens.c. Charcell is a bit different from bitmap here because drawing a progress bar is a combination of setting up the LCD controller (custom characters) and providing a format string. The custom character definition might fit in skin_display.c, but the format strings are needed in skin_tokens.c. Putting these functions in skin_tokens.c seemed to fit better.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28241 a1c6a512-1295-4272-9138-f99709370657
2010-10-10 23:46:15 +00:00
Teruaki Kawashima cc8918e909 fix displaying of the slider when default is used for pb->y and pb->height.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28220 a1c6a512-1295-4272-9138-f99709370657
2010-10-08 14:26:36 +00:00
Jonathan Gordon dd6b1dc5d2 Fix FS#11651 - slider wasnt being drawn correctly with inverted (and vertical) bars
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28207 a1c6a512-1295-4272-9138-f99709370657
2010-10-04 13:20:37 +00:00
Teruaki Kawashima 0f8fe94f46 correct drawing of the bar type tags when nofill is set.
draw the slider bitmap before drawing A-B repeat markers so that they are visible.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28204 a1c6a512-1295-4272-9138-f99709370657
2010-10-03 14:19:30 +00:00
Jonathan Gordon 71379cafb1 fix errors, warnings, tabs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28075 a1c6a512-1295-4272-9138-f99709370657
2010-09-14 12:21:56 +00:00
Jonathan Gordon 9928e3418f Another major skin backend update/hopefully bugfix:
Skins are now more self contained in the skin manager which in the future might allow on demand skin loading (i.e smaller skin buffers)
Skin backdrops are also managed more intelegently (fixes a bug where you can get a crazy backdrop loaded if a .sbs fails to load)

the rockbox_default rescue theme is now called rockbox_failsafe to better express what it actually is.

This commit hopefully/maybe fixes the heavily reported data aborts, so please check if you are getting them

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28073 a1c6a512-1295-4272-9138-f99709370657
2010-09-14 11:56:50 +00:00
Jonathan Gordon 216ed29e4d fix FS#11588 - %t(0) inside conditionals wasnt making that subline skip
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27983 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 11:43:33 +00:00
Jonathan Gordon eda80390d5 A bunch of new features for the bar type tags (%pb, %pv, %bl, etc):
* the bar orientation (horiz/vert) is now chosen based on the width and heigt values (or can be forced).
* the fill direction can now be inverted (fill right to left, or top to bottom is considered inverted)
* It can now draw a slider type bar instead of a fill type (or indeed a slider with a fill type)

To configure the new bar, any (or all) of the following params can be used after the bmp filename (order makes no difference either):
invert - cause the bar to fill in the inverted direction
vertical - draw a vertical bar (not needed if the height > width)
horizontal - draw a horizontal bar (this is obviously the default)
nofill - dont draw the filling bar (this still draws the outline, obviously pointless without the slider param)
slider - draw an image for the slider. The next param MUST be the label of the image to draw. No option to use a subimage here, so the whole image needs to be the image you want on the slider. 

example: %pb(0,0,-,-,-,nofill, slider, slider_image, invert) - draw a boring horizontal progressbar which doesnt fill and only draws the image "slider_image" which moves right to left.

the slider type might need some tweaking. let us know how it goes


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27821 a1c6a512-1295-4272-9138-f99709370657
2010-08-15 14:13:36 +00:00
Jonathan Gordon dc3778a685 Rework the skin playlist viewer so it uses the same drawing code as everything else. This should mean that all text tags now work as expected. The 2nd code param is no longer needed so drop it (you can use conditionals and sublines and stuff in the one code param.
example: %Vp(1, %?it<%in -%it|%fn>) <- show the next tracks strating from the first next track and show info if it is avilable or the filename.
Basic cuesheet support here, and will load upcoming track tags from the database if you have load to ram enabled.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27814 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 15:17:59 +00:00
Jonathan Gordon 70ebe46d74 New feature for the %xl (image load) tag. If you give it the filename __list_icons__ it will use the list icon strip instead of loading a different bmp.
example:
%xl(I, __list_icons__, 0, 0)
%xd(I, %Li)

^ display the list icon at position 0,0 in that viewport. (you can of course %xd(Ia) if you really wanted also.)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27787 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:27:10 +00:00
Magnus Holmgren 113764d9c0 Fix FS#11175. playlist_peek() wasn't thread safe (due to a static filename buffer), so frequent calls from the main thread would cause the audio thread to buffer the wrong track.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27773 a1c6a512-1295-4272-9138-f99709370657
2010-08-11 19:01:50 +00:00
Jonathan Gordon ee4f8a9a6b Allow viewport labels to be mostly free text instead of only one character. If this is useful the same will be done for images
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27665 a1c6a512-1295-4272-9138-f99709370657
2010-08-02 12:50:23 +00:00
Bertrik Sikken 57933f2bc6 Make some global function/variables local (by making them static)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27631 a1c6a512-1295-4272-9138-f99709370657
2010-07-30 23:47:49 +00:00
Jonathan Gordon 2d31d77a8b FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 12:37:48 +00:00
Jonathan Gordon fa99c614b9 hopefully fix the problem with lines in viewports being pushed down one line.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26682 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 07:24:42 +00:00
Jonathan Gordon 5b0521c9aa Changeover to the new skin format. SkinBreakingChange in the wiki has the runown of the changes.
Major changes are paramerterised tags now use %tag(param,param), colours are removed from the %V() tag, %Vi gets a required (but can be -) label as its first param).

utils/skinupdater/ has a program to update individual skins, and a perl script to update a whole zip.
Themesite will be unusable for the time being (you should be able to upload new themes once it updates checkwps though).

I obviously havnt tested every updated wps in this change so let me know if one doesnt load


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26641 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 03:44:11 +00:00