Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.61 KB | None | 0 0
  1. # Disable built-in status bar
  2. # /* This is practically useless to us on devices of this resolution, assume the
  3. # * host has alternative means of conveying this information to the user for
  4. # * now. */
  5. %wd
  6.  
  7. # Draw a fullscreen viewport
  8. # /* This is necessary to facillitate drawing into the backdrop buffer at a
  9. # * later stage. */
  10. %V(0,0,-,-,-)
  11.  
  12. # Preload our bitmap assets
  13. # /* Nothing particularly special here. */
  14. %xl(OVERFLOW_MENU_HANDLE_FOCUSED,40x60px-Overflow-Menu-Handle-Focused.bmp,0,0)
  15. %xl(OVERFLOW_MENU_HANDLE_UNFOCUSED,40x60px-Overflow-Menu-Handle-Unfocused.bmp,0,0)
  16. #%xl(SCRUBBER_FOCUSED,52x52px-Scrubber-Focused.bmp,0,0)
  17. #%xl(SCRUBBER_UNFOCUSED,52x52px-Scrubber-Unfocused.bmp,0,0)
  18. %xl(ROCKBOX_LOGO,60x60px-Rockbox-Logo.bmp,0,0)
  19. %xl(FASTFORWARD,96x96px-Fastforward.bmp,32,0)
  20. %xl(NEXT,96x96px-Next.bmp,32,0)
  21. %xl(PAUSE,96x96px-Pause.bmp,32,0)
  22. %xl(PLAY,96x96px-Play.bmp,32,0)
  23. %xl(PREVIOUS,96x96px-Previous.bmp,32,0)
  24. %xl(REWIND,96x96px-Rewind.bmp,32,0)
  25. %xl(STOP,96x96px-Stop.bmp,32,0)
  26. %xl(BUTTON_OFF,140x40px-Button-Off.bmp,0,0)
  27. %xl(BUTTON_ON,140x40px-Button-On.bmp,0,0)
  28. %xl(SCRUBBER_BAR,480x6px-Scrubber-Bar.bmp,0,0)
  29. %xl(SCRUBBER_BAR_BACKDROP,480x6px-Scrubber-Bar-Backdrop.bmp,0,0)
  30. %xl(MENU_DIVIDER,480x60px-Menu-Divider.bmp,0,0)
  31.  
  32. # Preload additional fonts
  33. # /* Nothing particularly special here. */
  34. %Fl(2,30 Ubuntu [Bold].fnt)
  35. %Fl(3,40 Ubuntu [Bold].fnt)
  36.  
  37. # Conditional elements
  38. # /* This could easily be a single conditional statement, but lets split it up
  39. # * instead to make it easier for the folks playing along at home.
  40. # *
  41. # * Overflow Menu. */
  42. %?vg(OVERFLOW_MENU_STATE)<%Vd(OVERFLOW_MENU_FALSE)|%Vd(OVERFLOW_MENU)%Vd(OVERFLOW_MENU_TRUE)|%Vd(OVERFLOW_MENU_TRUE)%Vd(REPEAT_SUBMENU)>
  43. # /* Album Art and Metadata. */
  44. %?vg(OVERFLOW_MENU_STATE)<%?C<%Vd(ALBUM_ART)%Vd(TRACK_METADATA)|%Vd(TRACK_METADATA_NO_ALBUM_ART)>|%Vd(TRACK_METADATA)>
  45.  
  46.  
  47. # Header
  48. # /* Header backdrop colour drawn directly into the backdrop buffer. */
  49. %V(0,0,480,60,-)%Vb(ffc000)%VB
  50. # /* Header title text. */
  51. %V(60,10,380,40,3)%Vf(000000)
  52. %alRockbox
  53.  
  54. # Overflow Menu Handle
  55. # /* Here we define a pair of OVERFLOW_MENU_* sister viewports that we will use
  56. # * to toggle the OVERFLOW_MENU_STATE variable. While it is possible to achieve
  57. # * the same effect with a single viewport and a more complex switching
  58. # * statement experimentation has proven this method to be very reliable. */
  59. %Vl(OVERFLOW_MENU_TRUE,-40,0,40,60,-)
  60. %T(OVERFLOW_HANDLE_FOCUSED,0,0,40,60,none)
  61. %?Tl(OVERFLOW_HANDLE_FOCUSED,0.1)<%vs(OVERFLOW_MENU_STATE,set,1)>
  62. %xd(OVERFLOW_MENU_HANDLE_FOCUSED)
  63.  
  64. %Vl(OVERFLOW_MENU_FALSE,-40,0,40,60,-)
  65. %T(OVERFLOW_HANDLE_UNFOCUSED,0,0,40,60,none)
  66. %?Tl(OVERFLOW_HANDLE_UNFOCUSED,0.1)<%vs(OVERFLOW_MENU_STATE,set,2)>
  67. %xd(OVERFLOW_MENU_HANDLE_UNFOCUSED)
  68.  
  69. # Rockbox Logo
  70. # /* Use this as a means to jump back to the main menu from the .wps
  71. # *
  72. # * ...and, it looks pretty. */
  73. %V(0,0,60,60,-)
  74. %T(0,0,60,60,menu)
  75. %xd(ROCKBOX_LOGO)
  76.  
  77. # Album Art
  78. # /* Nothing particularly special here. */
  79. %Vl(ALBUM_ART,0,62,480,480,-)
  80. %Cl(0,0,480,480,c,c)
  81. %Cd
  82.  
  83. # Overflow Menu
  84. # /* Build a stacked set of viewports to form our overflow menu. Use a separate
  85. # * viewport for the menu divider/backdrop so that we can draw directly into
  86. # * the backdrop buffer.
  87. # *
  88. # * Shuffle. */
  89. %Vl(OVERFLOW_MENU,0,62,480,60,-)%VB
  90. %xd(MENU_DIVIDER)
  91. %Vl(OVERFLOW_MENU,0,72,320,40,3)
  92. %al %Sx(Shuffle)
  93. %Vl(OVERFLOW_MENU,-160,72,140,40,-)
  94. %T(0,0,140,40,shuffle)
  95. %?ps<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
  96.  
  97. # /* Repeat. */
  98. %Vl(OVERFLOW_MENU,0,122,480,60,-)%VB
  99. %xd(MENU_DIVIDER)
  100. %Vl(OVERFLOW_MENU,0,132,320,40,3)
  101. %al %Sx(Repeat)
  102. %Vl(OVERFLOW_MENU,-160,132,140,40,-)
  103. %T(REPEAT,0,0,140,40,none)
  104. %?Tl(REPEAT,0.1)<%vs(OVERFLOW_MENU_STATE,set,3)>
  105. %?if(%mm,=,1)<%xd(BUTTON_OFF)|%xd(BUTTON_ON)>
  106.  
  107. # /* Playlist Viewer. */
  108. %Vl(OVERFLOW_MENU,0,182,480,60,-)%VB
  109. %T(0,0,480,60,playlist)
  110. %xd(MENU_DIVIDER)
  111. %Vl(OVERFLOW_MENU,0,192,480,40,3)
  112. %al %Sx(Playlist)
  113.  
  114. # /* Track Info. */
  115. %Vl(OVERFLOW_MENU,0,242,480,60,-)%VB
  116. %T(0,0,480,60,trackinfo)
  117. %xd(MENU_DIVIDER)
  118. %Vl(OVERFLOW_MENU,0,252,480,40,3)
  119. %al %Sx(Show Track Info)
  120.  
  121. #%Vl(OVERFLOW_MENU,0,302,480,60,-)%VB
  122. #%xd(MENU_DIVIDER)
  123. #%Vl(OVERFLOW_MENU,0,312,320,40,3)
  124. # balls
  125. #%Vl(OVERFLOW_MENU,-160,312,140,40,-)
  126. #%xd(BUTTON_ON)
  127.  
  128. #%Vl(OVERFLOW_MENU,0,362,480,60,-)%VB
  129. #%xd(MENU_DIVIDER)
  130. #%Vl(OVERFLOW_MENU,0,372,320,40,3)
  131. # fuck
  132. #%Vl(OVERFLOW_MENU,-160,372,140,40,-)
  133. #%xd(BUTTON_OFF)
  134.  
  135. #%Vl(OVERFLOW_MENU,0,422,480,60,-)%VB
  136. #%xd(MENU_DIVIDER)
  137. #%Vl(OVERFLOW_MENU,0,432,320,40,3)
  138. # wank
  139. #%Vl(OVERFLOW_MENU,-160,432,140,40,-)
  140. #%xd(BUTTON_ON)
  141.  
  142. #%Vl(OVERFLOW_MENU,0,482,480,60,-)%VB
  143. #%xd(MENU_DIVIDER)
  144. #%Vl(OVERFLOW_MENU,0,492,320,40,3)
  145. # vagina
  146. #%Vl(OVERFLOW_MENU,-160,492,140,40,-)
  147. #%xd(BUTTON_OFF)
  148.  
  149. # Repeat Sub-Menu
  150. # /* Header. */
  151. %Vl(REPEAT_SUBMENU,0,62,480,60,-)%VB
  152. %T(REPEAT_SUBMENU_HEADER,0,0,480,60,none)
  153. %?Tl(REPEAT_SUBMENU_HEADER)<%vs(OVERFLOW_MENU_STATE,set,2)>
  154. %xd(MENU_DIVIDER)
  155. %Vl(REPEAT_SUBMENU,0,72,480,40,3)
  156. %al %Sx(Repeat)
  157.  
  158. # /* Repeat Off. */
  159. %Vl(REPEAT_SUBMENU,0,122,480,60,-)%VB
  160. %xd(MENU_DIVIDER)
  161. %Vl(REPEAT_SUBMENU,0,132,320,40,3)
  162. %al %Sx(Off)
  163. %Vl(REPEAT_SUBMENU,-160,132,140,40,-)
  164. %T(0,0,140,40,setting_set,repeat,off)
  165. %?if(%mm,=,1)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
  166.  
  167. # /* Repeat All. */
  168. %Vl(REPEAT_SUBMENU,0,182,480,60,-)%VB
  169. %xd(MENU_DIVIDER)
  170. %Vl(REPEAT_SUBMENU,0,192,320,40,3)
  171. %al %Sx(All)
  172. %Vl(REPEAT_SUBMENU,-160,192,140,40,-)
  173. %T(0,0,140,40,setting_set,repeat,all)
  174. %?if(%mm,=,2)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
  175.  
  176. # /* Repeat One. */
  177. %Vl(REPEAT_SUBMENU,0,242,480,60,-)%VB
  178. %xd(MENU_DIVIDER)
  179. %Vl(REPEAT_SUBMENU,0,252,320,40,3)
  180. %al %Sx(One)
  181. %Vl(REPEAT_SUBMENU,-160,252,140,40,-)
  182. %T(0,0,140,40,setting_set,repeat,one)
  183. %?if(%mm,=,3)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
  184.  
  185. # /* Repeat Shuffle. */
  186. %Vl(REPEAT_SUBMENU,0,302,480,60,-)%VB
  187. %xd(MENU_DIVIDER)
  188. %Vl(REPEAT_SUBMENU,0,312,320,40,3)
  189. %al %Sx(Shuffle)
  190. %Vl(REPEAT_SUBMENU,-160,312,140,40,-)
  191. %T(0,0,140,40,setting_set,repeat,shuffle)
  192. %?if(%mm,=,4)<%xd(BUTTON_ON)|%xd(BUTTON_OFF)>
  193.  
  194. # Scrubber
  195. # /* Separate viewport for scrubber touch element drawn into the backdrop buffer
  196. # * so we don't destroy part of the album art. Do this so we can draw our own
  197. # * much larger touch area for scrubbing and leave the option of conditional
  198. # * placement open. */
  199. %V(0,517,480,60,-)%VB
  200. %T(0,0,480,60,progressbar)
  201. %V(0,544,480,6,-)
  202. # /* We have to remember to disable the progress bar's own touch area with the
  203. # * 'notouch' parameter to avoid it conflicting with the one we set earlier. */
  204. %pb(0,0,480,6,SCRUBBER_BAR,backdrop,SCRUBBER_BAR_BACKDROP,notouch)
  205.  
  206. # Time Elapsed/Remaining
  207. # /* Display the elapsed and remaining track times, as well as a translated,
  208. # * RTL locale aware 'N of N' playlist position counter. */
  209. %V(0,552,480,30,2)
  210. %al %pc%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>%ar%pr
  211.  
  212. # Track Metadata
  213. # * We have space for 3 lines of text at 40pt font. */
  214. %Vl(TRACK_METADATA,0,582,480,120,3)
  215. %s%ac%?it<%it|%fn>
  216. %s%ac%?ia<%ia|%?d(2)<%d(2)|%(root%)>>
  217. %s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
  218.  
  219. # Track Metadata without Album Art
  220. # /* Split current and next track metadata into separate viewports while we can
  221. # * to make use of the available screen real estate.
  222. # *
  223. # * Current track.
  224. # * We have space for 12 lines of text at 40pt font. */
  225. %Vl(TRACK_METADATA_NO_ALBUM_ART,0,62,480,480,3)
  226.  
  227.  
  228. %s%ac%?it<%it|%fn>
  229. %s%ac%?ia<%ia|%?d(2)<%d(2)|%(root%)>>
  230. %s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
  231. %ac%?iy<%iy>
  232. %ac%?ig<%ig>
  233.  
  234. %al%fbkbps %fc%ar%fkKhz
  235.  
  236.  
  237. # */ Next track.
  238. # * We have space for 3 lines of text at 40pt font. */
  239. %Vl(TRACK_METADATA_NO_ALBUM_ART,0,582,480,120,3)
  240. %ac%Sx(Next Track:)
  241. %s%ac%?It<%It|%Fn>
  242. %s%ac%?Ia<%Ia|%?D(2)<%D(2)|%(root%)>>
  243.  
  244. # Rewind/Previous
  245. # /* Nothing special here. Tap for the previous track, long press to rewind. */
  246. %V(0,-96,160,96,-)
  247. %T(0,0,160,96,wps_prev)
  248. %T(0,0,160,96,rwd,repeat_press)
  249. %?if(%mp,=,5)<%xd(REWIND)|%xd(PREVIOUS)>
  250.  
  251. # Pause/Play
  252. # /* Set and check for a PLAY_STATE variable to allow us to always display the
  253. # * correct PAUSE/PLAY state icon when seeking. This is a touch driven
  254. # * interface so display the state the user will enter instead of the current
  255. # * playback state for the PLAY and PAUSE cases. */
  256. %V(160,-96,160,96,-)
  257. %T(0,0,160,96,play)
  258. %T(0,0,160,96,stop,repeat_press)
  259. %?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)>>
  260.  
  261. # Fastforward/Next
  262. # /* Nothing special here. Tap for the next track, long press to fastforward. */
  263. %V(320,-96,160,96,-)
  264. %T(0,0,160,96,wps_next)
  265. %T(0,0,160,96,ffwd,repeat_press)
  266. %?if(%mp,=,4)<%xd(FASTFORWARD)|%xd(NEXT)>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement