This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7013 - loadable icons
Attached to Project:
Rockbox
Opened by Jonathan Gordon (jdgordon) - Wednesday, 11 April 2007, 14:51 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 11 April 2007, 15:07 GMT+2
Opened by Jonathan Gordon (jdgordon) - Wednesday, 11 April 2007, 14:51 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 11 April 2007, 15:07 GMT+2
|
DetailsThis patch allows the user to load a bmp with a new iconset to use in the lists.
Its not 100% finished but I wanted to get it out so people can start drawing so we can have some nice ones for the commit. attached is the patch as well as the default icons which are needed. put remote_default_icons into apps/bitmaps/remote_native and the other two in apps/bitmaps/native. The format for the iconset is exactly the same as the attached bmps. A single horizontal strip with all icons in the order they appear in apps/gui/icon.h with no space between icons (and all are the same width). charcell has not been handled yet, not has the viewers.config icons. edit: forgot to mention that you need to add the line "iconset: /.rockbox/icons/<your iconset>.bmp" to config.cfg to get it to load an iconset |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Monday, 16 April 2007, 11:09 GMT+2
Reason for closing: Accepted
Additional comments about closing: Anyone feel like making a nice wiki page for these sets?
Monday, 16 April 2007, 11:09 GMT+2
Reason for closing: Accepted
Additional comments about closing: Anyone feel like making a nice wiki page for these sets?
I thing to note, because the number of icons in the bmp isnt know, there is a setting under "[remote] lcd settings" "icon height" which needs to be set to the correct value or the icons wont be shown correctly (themers should handle this so it wont be a problem for regular users).
now, to set an icon in the viewers.config file, you index it from the end of the icon.h enum (icon 0 is the folder icon, 1 is chip8, etc). to use one of the builtin icons do "b6" (without the quotes) to get the font icon. use "-" for no icon.
The bmp format has changed to vertical, so grab new ones...
charcell isnt done yet, all other targets should work correctly.
to do that have a file named /.rockbox/icons/<your theme>.icons where <your theme> is the same name as the .bmp file for the theme (e.g gant.bmp and gant.icons).
The .icons file is in the format
<extension>: <icon> (<icon> being the same format as used by viewers.config)
e.g "mp3: b5" or "wav: -" or "mpg: 2"
This is now at a state where I believe its commitable. The only thing missing is customizable icons for charcell...
I explained it better in the forum thread.
you can load any size icons up to 24x24 in full 16bit colour!
next step maybe enlarging the statusbar for 24bit bmps there...
The only problem is that the bmp's use the wps icon (which isnt your fault, and easy to get around).
There was a bug in the code which stopped almost all icons being displayed (and the list code needs a bit of tweaking to display right), so hopefully ill update the patch a bit later..
but untill then
http://jdgordon.mine.nu:8080/jonno/rockbox/ has screenshots of the h300 using Eli's icons.
In that folder also has two files (elisherer.bmp and .icons) put them both in /.rockbox/icons/ and run the theme.cfg file and it will load his themes with the correct icon for the bmps.
I get a failure to build if I just apply this patch:
make[2]: *** No rule to make target `default_icons.6x8x16.bmp', needed by `/home/Steve/rockbox/build/apps/bitmaps/native/default_icons.6x8x16.c'. Stop.
...
gui/icon.c:35:27: default_icons.h: No such file or directory
gui/icon.c:37:34: remote_default_icons.h: No such file or directory
gui/icon.c:55: error: `default_icons' undeclared here (not in a function)
gui/icon.c:55: error: initializer element is not constant
gui/icon.c:55: error: (near initialization for `inbuilt_icons[0]')
...
Also I'm fairly sure that default_icons.h and remote_default_icons.h should have been included.
I didn't make an icon for wavview but will icons for files with inbuilt icons be needed anyway (ie mp3 is inbuilt to display the audio icon, but is also assigned the vbrfix icon as well, but only the inbuilt icon is shown).
I made it 20x16 because I like a little gap between the icon and the menu item text.
TruJournals: data aborts are useless in custom builds without your rockbox.map file in the <build dir>/apps/ folder, please attach that so we can actually figure out the problem.
Those icons look great :)
hopefully ill attach a new version tonight which will hopefully be the final one :p
This one goes back to seperate buffers for the viewers and inbuilt icons, so, you need to remove the viewer icons before loading the above iconsets or they wont display correctly. (attached is new bmps for the inbuilt icons)
player needs to be checked, i think its possible this version breaks it, but not sure
deltas:
player - down by less than 100bytes
ondioSP - +1kb
h300 - +4700b ! (16bit colour bmps being built in...)
To use this iconset for the viewers you must be using the attached viewers.config file
jdgordon edit: This bmp is compatable with the .patch in the next comment. (in the future please dont supply a viewers.config, but a <your filename>.icons
it seems i didnt explain the viewers.config (and .icons and viewers.bmp) files very well..
The viewers bmp can have up to the same amount of icons as the main iconset file (and they must be the same dimensions).
the 3rd field in viewers.config is either "b<num>", "<num>, or "-", where <num> is the index of the icon you want to use (starts at 0). the "b" means to use the builtin icons (well, the iconset for the main icons.. got a better idea for this letter?), and the - means no icon.
now, if your viewers bmp is called my_viewers.bmp (in /.rockbox/icons) then the file my_viewers.icons is read which has the format "<extension>: <icon>" where <extension> is the file extensions icon you want to change, and <icon> is the same format as viewers.config ("b<num>", "<num>, or "-")
and lastly, if you are going to upload bmps, please attach the .cfg for it as well, (and the .icons if you want also).
edit: Aliask beat me to the comment, please dont edit viewers.config... always supply a .icons file