Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  WPS code - If/else for button presses
« previous next »
  • Print
Pages: [1]

Author Topic: WPS code - If/else for button presses  (Read 1764 times)

Offline arrow224

  • Member
  • *
  • Posts: 24
  • Ahh well...such is life
    • The Weird and the Wonderful
WPS code - If/else for button presses
« on: October 29, 2006, 04:27:11 AM »
First time WPS coder, so if this has been covered, please tell me where.

I have a H320, Rockbox Experimental Kosh's version 2.9.25.
I am modifying my WPS's to show the real time clock. My issue is with the ipod H500 WPS. Well, not the WPS, but the code behind it.

I want to have an if/else going, where if I push a button to increase or decrease the volume, I want the WPS to show the volume for a few seconds, then go back to the clock. Otherwise, I want it to always show the time.

My code is below. I am currently playing around with some tags, so the comments down the bottom are mine, there for reference for what works, or what was there originally. As you can see, I have tried the alternating sublines, and while they work, they are not what I am looking for.

Code: [Select]
# preloading images
%P|pb.bmp|
# battary images
%xl|A|bat0.bmp|185|2|
%xl|B|bat1.bmp|185|2|
%xl|C|bat2.bmp|185|2|
%xl|D|bat3.bmp|185|2|
%xl|E|bat4.bmp|185|2|
# playback images
%xl|a|song_stop.bmp|5|121|
%xl|b|song_play.bmp|5|121|
%xl|c|song_pause.bmp|5|121|
# disable the status bar
%wd



%m|0|220|  %pp/%pe


%m|80|215|%?ia<%ia|%?d2<%d2|(Artist Unknown)>>
%m|80|215|%?id<%id|%?d1<%d1|(Album Unknown)>>
%s%m|80|215|%?it<%it|%fn>

%?mp<%xda|%xdb|%xdc|%xdb|%xdb>

# progress bar
%pb|17|18|



# current time, volume, time remaining
#%t10%m|0|220|%al%pc %ac%pvdb %ar-%pr; %t10%m|0|220|%al%pc %ac%c l:MPc %ar-%pr
#%m|0|220|%al%pc %ac%pvdb %ar-%pr
%?bl<%xdA|%xdB|%xdC|%xdD|%xdE>
%X|bg.bmp|
# cover art
%C|6|37|[75|75|]
Logged
H320 with v1.29k, Rockbox Experimental Kosh edition v2.9.25.

Offline Genre9mp3

  • Artist
  • Member
  • *
  • Posts: 146
Re: WPS code - If/else for button presses
« Reply #1 on: October 29, 2006, 07:17:43 AM »
Quote from: arrow224 on October 29, 2006, 04:27:11 AM
I want to have an if/else going, where if I push a button to increase or decrease the volume, I want the WPS to show the volume for a few seconds, then go back to the clock. Otherwise, I want it to always show the time.

This is not possible. You cannot detect button presses with the wps code.
Logged

Offline Job Van Dam

  • Member
  • *
  • Posts: 167
Re: WPS code - If/else for button presses
« Reply #2 on: October 30, 2006, 08:08:40 AM »
Acually it is possible after you apply this patch.

I was wondering something though I am currently awaiting for my DAP to be Rockbox compatible so I wanted to know when you have Rockbox on your DAP can you see the various .c files in folders?

Thank you.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  WPS code - If/else for button presses
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.073 seconds with 15 queries.