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:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Additional functionality to %ss & display viewport for a duration of time
« previous next »
  • Print
Pages: [1]

Author Topic: Additional functionality to %ss & display viewport for a duration of time  (Read 1182 times)

Offline sockbox

  • Member
  • *
  • Posts: 111
Additional functionality to %ss & display viewport for a duration of time
« on: March 25, 2012, 02:37:24 PM »
I'd like to be able to grab a substring from right to left. Currently this is only possible to read a substring from left to right. A single dash, -, can specify the end of a string, or length of a string. A negative one, -1, can be used to specify the first character at the end of a string, and so forth. A negative string length could grab from right to left.

example.
%ss(-,-3,%it) # read the last 3 characters in the title tag

Also I'd like to be able to specify the amount of time to display a viewport after keypress. Similar to the %mv(t) option which does something for t amount of time when the volume is changed. Ultimately I'd like to display a viewport for a specified amount of time during and after playing, pausing, fast forwarding, rewinding, or placing the player on hold.

Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Additional functionality to %ss & display viewport for a duration of time
« Reply #1 on: March 27, 2012, 08:30:17 AM »
I know gevearts has been talking about negative values for %ss, but im bored so if its only a 5min fix i'll do that now. - EDIT: in
b2202a3

For the second part, you need to use %Tl(timeout) or %Tl(button label, timeout) to do what you want.

Have a look at https://github.com/saint-lascivious/RaaA-CabbieV2 how he does the popup viewports.
« Last Edit: March 27, 2012, 08:43:04 AM by JdGordon »
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline sockbox

  • Member
  • *
  • Posts: 111
Re: Additional functionality to %ss & display viewport for a duration of time
« Reply #2 on: April 01, 2012, 01:48:48 PM »
A few more ideas with %ss...

- interpret entire lines including strings and white space with %ss
Code: [Select]
%ss(0,-,%ia - %it)

-  interpret %ss as string length if used in a conditional
Code: [Select]
%if(%ss(0,-,%bl%pv),<,4)
# if battery level and volume string length is less than 4

Why not extend the %Tl tag for use on non-touch screens? The functionality is already there, just map the virtual buttons to actual buttons.
« Last Edit: April 01, 2012, 03:09:41 PM by sockbox »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Additional functionality to %ss & display viewport for a duration of time
 

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

Page created in 0.065 seconds with 15 queries.