09. Theme Design guide - spruceUI/spruceOS GitHub Wiki
Making themes for SpruceOS is simplier than you think!
This guide will help you go through the theme making process in a step by step approach.
Spruce themes are simple folders located in /SDCARD/themes/.
To get started, you can either create your own folder or use the ready-made theme template as a starting point.
If you prefer to create one manually, navigate to /SDCARD/themes/ and make a new folder named however you want.
In 3.1.0 or above Spruce has a secret designer mode. In your SDCARD/spruce/flags folder create an extensionless file named designer_mode. Next time you boot Spruce will set it so all consoles are shown and you have access to our ThemePacker app to automatically pack themes compatible with our ThemeUnpacker system.
Inside your theme folder, create a config.json file or edit the template one.
This file will store some metadata and information to customize your theme.
The first part is the general theme information (metadata), name, author and description
{
"name": "Theme Name",
"author": "Your Name",
"description": "Theme Description",The next part is for the battery percentage text at the top right of the screen (next to the battery icon, you need to enable it in advanced settings). You can define color, size and font (we'll see this later):
"batteryPercentage": {
"color": "#HEXCOL",
"font": "your-font.ttf",
"size": 24
},This part is for the title text on top of the screen (like "apps", "settings", "games"). You can define color, font and size
"title": {
"font": "your-font.ttf",
"size": 31,
"color": "#HEXCOL"
},This part is for the hint text on bottom of the screen ("A open" and "B back", only some themes like the default one have it). You can define color, font and size
"hint": {
"font": "your-font.ttf",
"size": 21,
"color": "#HEXCOL"
},This part is for the text on the bottom-right of the screen (the text that counts which element you selected, like in apps). Eg. in a text like 7/10, the text 7/ is currentpage and 10 is total. You can define color, font and size
"currentpage": {
"font": "your-font.ttf",
"size": 33,
"color": "#HEXCOL"
},
"total": {
"font": "your-font.ttf",
"size": 32,
"color": "#HEXCOL"
},(TODO)
"grid": {
"font": "your-font.ttf",
"color": "#HEXCOL",
"selectedcolor": "#HEXCOL"
},
"list": {
"font": "your-font.ttf",
"size": 24,
"color": "#HEXCOL",
"selectedcolor": "#HEXCOL"
}
}In the root folder of your theme, you can have multiple fonts you link to in the previous json we've seen.
-> config.json
-> font1.ttf
-> font2.ttf
-> font3.ttf
-> skin
-> skin_640_480
-> icons
-> sound
Now it's time to change spruce's skin. The /skin/ folder is the one that has the most impact on how the UI looks. If you get creative you can really do a lot here. I'll do my best to explain what all the files do:
-
background.pngis the background you see everywhere. MainUI, GamesUI, SettingsUI and AppsUI. If you don't see this in apps/settings it's beacuse you have a background for unselected list elements! -
bg-list-l.pngis the background you see on selected list items with a bigger height, like in the apps list.bg-list-s.pngis the one you see on items with a smaller height, like in settings, pop-ups, or in the games list. - from
bg-pop-menu-1.pngtobg-pop-menu-4.pngare the background of the pop-up you get when you click the home button in the menu. The number in the file name represents the number of elements in the pop-up list. You can seebg-pop-menu-2.pngon the pop-up in main menu,bg-pop-menu-4.pngwhen you click the home button in a game list andbg-pop-menu-3.pngwhen you do it in the favorites list. Spruce does not use number 1 these files. -
div-line-h.pngis the line shown at the top of each list element. in apps, game lists, settings etc. -
Empty.pngthis icon is shown when a list is empty, like infavorites.
-
bg-title.pngis the background of the top bar -
headphone-icon.pngis the icon shown in the status bar when you connect headphones - from
ic-power-charge-0%.pngtoic-power-charge-100%.pngare the icons that get shown when you're charging the device. If you see duplicates with-backupat the end of the file name it's just something spruce does to add the percentage. - from
power-0%-icon.pngtopower-100%-icon.pngare the battery icons. duplicates with -backup are normal. -
icon-A-54.pngandicon-B-54.pngare the help icons shown in the bottom bar of the screen (A openandB back) - from
icon-volume-00.pngtoicon-volume-20.pngare the volume level icons - from
icon-wifi-signal-01.pngtoicon-wifi-signal-04.pngare the wifi signal -
miyoo-topbar.pnglogo in the top left -
tips-bar-bg.pngis the background of the bottom bar
-
dot-a.pnganddot-n.pngare the bullet icons that represent which main menu element is selected.dot-afor selected,dot-bfor unselected. -
ic-app-f.png,ic-favorite-f.png,ic-game-f.png,ic-setting-f.pngand ic-recent-f.pngare the 4/5 icons shown in main menu for a selected element. -
ic-app-n.png,ic-favorite-n.png,ic-game-n.png,ic-setting-n.pngand ic-recent-n.png, same as above but for unselected elements.
-
bg-game-item-f.pngis the background of a selected game,bg-game-item-n.pngis for unselected games -
ic-favorite-mark.pngis the icon you see next to a game added to your favorites -
num-bg.pngis the list number of the game when you change view -
list-num.pngis the text of the numbers you see when you change view -
preview-bg.pngis the background you see in boxarts -
thumb-default.pngis the default boxart you see when a game doesn't have one
These 6 files are for the loading animation when you run a game:
- files from
app_loading_01.pngtoapp_loading_05.pngare for the icon animation. - file
app_loading_bgis for the background beneath the icon. You need to update icons show changes in this! Just select another theme, go back to menu to change icons, then select your theme again. -
progress-dot.pngin progress loading, when indexing all the game files (clicking refresh roms in main menu), these 3 dots will show up.
-
bg-btn-01-fis for selected keyboard keys,bg-btn-01-nfor unselected ones -
bg-btn-02-fandbg-btn-02-nsame as above but for the 5 keys at the bottom row of the keyboard. Here,icon-delete.pngis the DEL icon,icon-space.pngis the TAB icon,icon-abc.pngandicon-character.pngare the symbols/letters icons,icon-OK.pngandicon-START.pngare in the OK/start button,icon-shift.pngandicon-shift-active.pngare for the SHIFT icon. -
icon-L2.pngfor the L2 icon andicon-R2.pngfor R2 -
icon-x.pngandicon-y.pngare the X and Y buttons -
input.pngis the space where you see the input
-
bg-io-testing.pngis the image of the a30 you see inhardware test -
bg-keysetting.pngimage of the a30 you see inButton Remap -
bg-keysetting-f.pngBG you get on a selected key inButton Remap -
ic-MENU.pngmenu button icon you see at the bottom inbutton remap -
ic-MENU+A.pnghelp icon you can see at the bottom inHardware test -
color.pngicon for thedisplayoption -
fixit.pngicon for thefixesoption -
icon-brightness-48.pngfor thebrightnessoption -
icon-device-info-48.pngfor thedevice infoandhardware testoptions -
icon-factory-reset-48.pngfor thefactory resetoption -
icon-joystick-calibrate.pngfor thecalibrate joystickoption -
icon-joystick-test.pngfor thejoystick testoption -
icon-key-setting-48.pngfor thebutton remapoption -
icon-language-48.pngfor thechange languageoption -
icon-left-arrow-24.pngandicon-right-arrow-24.pngare the arrows you see inbrightness,volumeetc. -
icon-setting-wifi.pngfor theWi-Fioption -
icon-Shutdown.pngfor theshutdownotpion -
icon-theme.pngfor thethemesoption -
icon-usb-storage.pngspruce disabled usb support but this could come back -
icon-wifi-locked.pngin the wifi options, next to wifis.icon-wifi-connected.pngdoesn't seem to work but maybe in the future? -
joystick-test-bg.pngandjoystick-test-dot.pngyou see these injoystick test - all files starting with
mask-are shown inhardware test(apart from mask-add.png, mask-LR.png and mask-minus.png which are not shown!) -
pop-bg.pngis the background of the pop-up you see when you clickshutdown -
sound-icon.pngis the icon forvolumeandbgm volume
The /skin_640_480/ folder is where you'll need to put the files that modify the in-game menu UI.
-
empty.pngis the icon or text that shows when a save slot is empty. -
icon-A-27.pngandicon-b-27.pngare the A and B icons that show at the bottom of the screen. -
icon-left-arrow-24.pngandicon-right-arrow-24.pngare the arrow icons. -
icon-menu-right-arrow-24.pngis the icon that shows on the menu list, on "save" and "load", when selected. -
list-item-select-bg-short.pngis the background of selected menu list items. -
menu-bg-7.pngandmenu-sub-bg.pngare the backgrounds of the menu. -
menu-sub-title-bg.pngis the background of the topbar you see on the save or load sub menu. -
statbg.pngis the bottom bar (where you see A and B buttons)
This is pretty easy, in this folder you have a list of all consoles supported by Spruce, these files represent unselected icons in the games menu. Here you can also find 2 additional folders:
- in
/icons/sel/you have the same list of consoles, but this time they represent selected icons. - in
/icons/app/you have a list of icons of all the apps in spruce (you can find them in the apps menu)
In this folder you only have 2 files:
-
change.wavis the short sound you hear when you move around the UI -
bgm.mp3is music that plays in the background, currently not working in spruce. Best practice at this point is to include a blank bgm file for when we fix it, or have it in already so you won't need to update in the future.
When it comes to releasing your themes to users you can release it as a contained zip/7z/rar as you would like and direct them to extract it into their themes folder.
Starting with Spruce v3.0.0 spruce now includes a theme unpacker/packer utility so users don't need to extract them themselves and gives better self contained packages with faster transfers to SDCards.
If you want to release your theme as a version that is compatible with Theme Unpacker, on your SDCard place the theme in the /Themes/ folder as you would if you were going to use it. Go to your /App/ folder on your SDCard and find the ThemePacker app. Open and edit the ThemePacker's config.json you should see "@label" within the config. Remove the @ symbol. This will allow the A30 to see the app. Place your SDcard back into your A30 and start up. Navigate to the ThemePacker app and run it. This will pack all the themes on your device except the SPRUCE theme into a ThemeUnpacker compatible 7z file. After it finishes check your /Theme/ directory for the 7z. Get that file off your A30 however you wish, and use this for your release.
Just direct users to put the 7z file in their /Themes/ directory and Spruce will handle the rest on next boot!