Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Disable built-in status bar
- # /* This is practically useless to us on devices of this resolution, assume the
- # * host has alternative means of conveying this information to the user for
- # * now. */
- %wd
- # Draw a fullscreen viewport
- # /* This is necessary to facillitate drawing into the backdrop buffer at a
- # * later stage. */
- %V(0,0,-,-,-)
- # Preload our bitmap assets
- # /* Nothing particularly special here. */
- %xl(OVERFLOW_MENU_HANDLE_FOCUSED,40x60px-Overflow-Menu-Handle-Focused.bmp,0,0)
- %xl(OVERFLOW_MENU_HANDLE_UNFOCUSED,40x60px-Overflow-Menu-Handle-Unfocused.bmp,0,0)
- #%xl(SCRUBBER_FOCUSED,52x52px-Scrubber-Focused.bmp,0,0)
- #%xl(SCRUBBER_UNFOCUSED,52x52px-Scrubber-Unfocused.bmp,0,0)
- %xl(ROCKBOX_LOGO,60x60px-Rockbox-Logo.bmp,0,0)
- %xl(FASTFORWARD,96x96px-Fastforward.bmp,32,0)
- %xl(NEXT,96x96px-Next.bmp,32,0)
- %xl(PAUSE,96x96px-Pause.bmp,32,0)
- %xl(PLAY,96x96px-Play.bmp,32,0)
- %xl(PREVIOUS,96x96px-Previous.bmp,32,0)
- %xl(REWIND,96x96px-Rewind.bmp,32,0)
- %xl(STOP,96x96px-Stop.bmp,32,0)
- %xl(BUTTON_OFF,140x40px-Button-Off.bmp,0,0)
- %xl(BUTTON_ON,140x40px-Button-On.bmp,0,0)
- %xl(SCRUBBER_BAR,480x6px-Scrubber-Bar.bmp,0,0)
- %xl(SCRUBBER_BAR_BACKDROP,480x6px-Scrubber-Bar-Backdrop.bmp,0,0)
- %xl(MENU_DIVIDER,480x60px-Menu-Divider.bmp,0,0)
- # Preload additional fonts
- # /* Nothing particularly special here. */
- %Fl(2,30 Ubuntu [Bold].fnt)
- %Fl(3,40 Ubuntu [Bold].fnt)
- # Conditional elements
- # /* This could easily be a single conditional statement, but lets split it up
- # * instead to make it easier for the folks playing along at home.
- # *
- # * Overflow Menu. */
- %?vg(OVERFLOW_MENU_STATE)<%Vd(OVERFLOW_MENU_FALSE)|%Vd(OVERFLOW_MENU)%Vd(OVERFLOW_MENU_TRUE)|%Vd(OVERFLOW_MENU_TRUE)%Vd(REPEAT_SUBMENU)>
- # /* Album Art and Metadata. */
- %?vg(OVERFLOW_MENU_STATE)<%?C<%Vd(ALBUM_ART)%Vd(TRACK_METADATA)|%Vd(TRACK_METADATA_NO_ALBUM_ART)>|%Vd(TRACK_METADATA)>
- # Header
- # /* Header backdrop colour drawn directly into the backdrop buffer. */
- %V(0,0,480,60,-)%Vb(ffc000)%VB
- # /* Header title text. */
- %V(60,10,380,40,3)%Vf(000000)
- %alRockbox
- # Overflow Menu Handle
- # /* Here we define a pair of OVERFLOW_MENU_* sister viewports that we will use
- # * to toggle the OVERFLOW_MENU_STATE variable. While it is possible to achieve
- # * the same effect with a single viewport and a more complex switching
- # * statement experimentation has proven this method to be very reliable. */
- %Vl(OVERFLOW_MENU_TRUE,-40,0,40,60,-)
- %T(OVERFLOW_HANDLE_FOCUSED,0,0,40,60,none)
- %?Tl(OVERFLOW_HANDLE_FOCUSED,0.1)<%vs(OVERFLOW_MENU_STATE,set,1)>
- %xd(OVERFLOW_MENU_HANDLE_FOCUSED)
- %Vl(OVERFLOW_MENU_FALSE,-40,0,40,60,-)
- %T(OVERFLOW_HANDLE_UNFOCUSED,0,0,40,60,none)
- %?Tl(OVERFLOW_HANDLE_UNFOCUSED,0.1)<%vs(OVERFLOW_MENU_STATE,set,2)>
- %xd(OVERFLOW_MENU_HANDLE_UNFOCUSED)
- # Rockbox Logo
- # /* Use this as a means to jump back to the main menu from the .wps
- # *
- # * ...and, it looks pretty. */
- %V(0,0,60,60,-)
- %T(0,0,60,60,menu)
- %xd(ROCKBOX_LOGO)
- # Album Art
- # /* Nothing particularly special here. */
- %Vl(ALBUM_ART,0,62,480,480,-)
- %Cl(0,0,480,480,c,c)
- %Cd
- # Overflow Menu
- # /* Build a stacked set of viewports to form our overflow menu. Use a separate
- # * viewport for the menu divider/backdrop so that we can draw directly into
- # * the backdrop buffer.
- # *
- # * Shuffle. */
- %Vl(OVERFLOW_MENU,0,62,480,60,-)%VB
- %xd(MENU_DIVIDER)
- %Vl(OVERFLOW_MENU,0,72,320,40,3)
- %al %Sx(Shuffle)
- %Vl(OVERFLOW_MENU,-160,72,140,40,-)
- %T(0,0,140,40,shuffle)
- %?ps<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
- # /* Repeat. */
- %Vl(OVERFLOW_MENU,0,122,480,60,-)%VB
- %xd(MENU_DIVIDER)
- %Vl(OVERFLOW_MENU,0,132,320,40,3)
- %al %Sx(Repeat)
- %Vl(OVERFLOW_MENU,-160,132,140,40,-)
- %T(REPEAT,0,0,140,40,none)
- %?Tl(REPEAT,0.1)<%vs(OVERFLOW_MENU_STATE,set,3)>
- %?if(%mm,=,1)<%xd(BUTTON_OFF)|%xd(BUTTON_ON)>
- # /* Playlist Viewer. */
- %Vl(OVERFLOW_MENU,0,182,480,60,-)%VB
- %T(0,0,480,60,playlist)
- %xd(MENU_DIVIDER)
- %Vl(OVERFLOW_MENU,0,192,480,40,3)
- %al %Sx(Playlist)
- # /* Track Info. */
- %Vl(OVERFLOW_MENU,0,242,480,60,-)%VB
- %T(0,0,480,60,trackinfo)
- %xd(MENU_DIVIDER)
- %Vl(OVERFLOW_MENU,0,252,480,40,3)
- %al %Sx(Show Track Info)
- #%Vl(OVERFLOW_MENU,0,302,480,60,-)%VB
- #%xd(MENU_DIVIDER)
- #%Vl(OVERFLOW_MENU,0,312,320,40,3)
- # balls
- #%Vl(OVERFLOW_MENU,-160,312,140,40,-)
- #%xd(BUTTON_ON)
- #%Vl(OVERFLOW_MENU,0,362,480,60,-)%VB
- #%xd(MENU_DIVIDER)
- #%Vl(OVERFLOW_MENU,0,372,320,40,3)
- # fuck
- #%Vl(OVERFLOW_MENU,-160,372,140,40,-)
- #%xd(BUTTON_OFF)
- #%Vl(OVERFLOW_MENU,0,422,480,60,-)%VB
- #%xd(MENU_DIVIDER)
- #%Vl(OVERFLOW_MENU,0,432,320,40,3)
- # wank
- #%Vl(OVERFLOW_MENU,-160,432,140,40,-)
- #%xd(BUTTON_ON)
- #%Vl(OVERFLOW_MENU,0,482,480,60,-)%VB
- #%xd(MENU_DIVIDER)
- #%Vl(OVERFLOW_MENU,0,492,320,40,3)
- # vagina
- #%Vl(OVERFLOW_MENU,-160,492,140,40,-)
- #%xd(BUTTON_OFF)
- # Repeat Sub-Menu
- # /* Header. */
- %Vl(REPEAT_SUBMENU,0,62,480,60,-)%VB
- %T(REPEAT_SUBMENU_HEADER,0,0,480,60,none)
- %?Tl(REPEAT_SUBMENU_HEADER)<%vs(OVERFLOW_MENU_STATE,set,2)>
- %xd(MENU_DIVIDER)
- %Vl(REPEAT_SUBMENU,0,72,480,40,3)
- %al %Sx(Repeat)
- # /* Repeat Off. */
- %Vl(REPEAT_SUBMENU,0,122,480,60,-)%VB
- %xd(MENU_DIVIDER)
- %Vl(REPEAT_SUBMENU,0,132,320,40,3)
- %al %Sx(Off)
- %Vl(REPEAT_SUBMENU,-160,132,140,40,-)
- %T(0,0,140,40,setting_set,repeat,off)
- %?if(%mm,=,1)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
- # /* Repeat All. */
- %Vl(REPEAT_SUBMENU,0,182,480,60,-)%VB
- %xd(MENU_DIVIDER)
- %Vl(REPEAT_SUBMENU,0,192,320,40,3)
- %al %Sx(All)
- %Vl(REPEAT_SUBMENU,-160,192,140,40,-)
- %T(0,0,140,40,setting_set,repeat,all)
- %?if(%mm,=,2)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
- # /* Repeat One. */
- %Vl(REPEAT_SUBMENU,0,242,480,60,-)%VB
- %xd(MENU_DIVIDER)
- %Vl(REPEAT_SUBMENU,0,252,320,40,3)
- %al %Sx(One)
- %Vl(REPEAT_SUBMENU,-160,252,140,40,-)
- %T(0,0,140,40,setting_set,repeat,one)
- %?if(%mm,=,3)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
- # /* Repeat Shuffle. */
- %Vl(REPEAT_SUBMENU,0,302,480,60,-)%VB
- %xd(MENU_DIVIDER)
- %Vl(REPEAT_SUBMENU,0,312,320,40,3)
- %al %Sx(Shuffle)
- %Vl(REPEAT_SUBMENU,-160,312,140,40,-)
- %T(0,0,140,40,setting_set,repeat,shuffle)
- %?if(%mm,=,4)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
- # Scrubber
- # /* Separate viewport for scrubber touch element drawn into the backdrop buffer
- # * so we don't destroy part of the album art. Do this so we can draw our own
- # * much larger touch area for scrubbing and leave the option of conditional
- # * placement open. */
- %V(0,517,480,60,-)%VB
- %T(0,0,480,60,progressbar)
- %V(0,544,480,6,-)
- # /* We have to remember to disable the progress bar's own touch area with the
- # * 'notouch' parameter to avoid it conflicting with the one we set earlier. */
- %pb(0,0,480,6,SCRUBBER_BAR,backdrop,SCRUBBER_BAR_BACKDROP,notouch)
- # Time Elapsed/Remaining
- # /* Display the elapsed and remaining track times, as well as a translated,
- # * RTL locale aware 'N of N' playlist position counter. */
- %V(0,552,480,30,2)
- %al %pc%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>%ar%pr
- # Track Metadata
- # * We have space for 3 lines of text at 40pt font. */
- %Vl(TRACK_METADATA,0,582,480,120,3)
- %s%ac%?it<%it|%fn>
- %s%ac%?ia<%ia|%?d(2)<%d(2)|%(root%)>>
- %s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
- # Track Metadata without Album Art
- # /* Split current and next track metadata into separate viewports while we can
- # * to make use of the available screen real estate.
- # *
- # * Current track.
- # * We have space for 12 lines of text at 40pt font. */
- %Vl(TRACK_METADATA_NO_ALBUM_ART,0,62,480,480,3)
- %s%ac%?it<%it|%fn>
- %s%ac%?ia<%ia|%?d(2)<%d(2)|%(root%)>>
- %s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
- %ac%?iy<%iy>
- %ac%?ig<%ig>
- %al%fbkbps %fc%ar%fkKhz
- # */ Next track.
- # * We have space for 3 lines of text at 40pt font. */
- %Vl(TRACK_METADATA_NO_ALBUM_ART,0,582,480,120,3)
- %ac%Sx(Next Track:)
- %s%ac%?It<%It|%Fn>
- %s%ac%?Ia<%Ia|%?D(2)<%D(2)|%(root%)>>
- # Rewind/Previous
- # /* Nothing special here. Tap for the previous track, long press to rewind. */
- %V(0,-96,160,96,-)
- %T(0,0,160,96,wps_prev)
- %T(0,0,160,96,rwd,repeat_press)
- %?if(%mp,=,5)<%xd(REWIND)|%xd(PREVIOUS)>
- # Pause/Play
- # /* Set and check for a PLAY_STATE variable to allow us to always display the
- # * correct PAUSE/PLAY state icon when seeking. This is a touch driven
- # * interface so display the state the user will enter instead of the current
- # * playback state for the PLAY and PAUSE cases. */
- %V(160,-96,160,96,-)
- %T(0,0,160,96,play)
- %T(0,0,160,96,stop,repeat_press)
- %?mp<%xd(STOP)|%xd(PAUSE)%vs(PLAY_STATE,set,1)|%xd(PLAY)%vs(PLAY_STATE,set,2)|%?vg(PLAY_STATE)<%xd(PAUSE)|%xd(PLAY)>|%?vg(PLAY_STATE)<%xd(PAUSE)|%xd(PLAY)>>
- # Fastforward/Next
- # /* Nothing special here. Tap for the next track, long press to fastforward. */
- %V(320,-96,160,96,-)
- %T(0,0,160,96,wps_next)
- %T(0,0,160,96,ffwd,repeat_press)
- %?if(%mp,=,4)<%xd(FASTFORWARD)|%xd(NEXT)>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement