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
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.
« previous next »
  • Print
Pages: [1]

Author Topic: Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.  (Read 1008 times)

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.
« on: October 09, 2011, 03:12:16 PM »
This %?cc<%?cf<|%cp)>> works (along with about 20 other ways I've worked out) but I can't get it to work properly with a bitmap.
Characters are fine along with %cp,  also %x() & %xd() work, but also display in the 24H format.

The attached bitmap show the look I'm wanting.

These are some of the many combo's I've tried. (Does it only work in 24H format? AM only? Yadda yadda.)
The comments may or may not be correct as I've tried some many combo's I can't remember what half of them did, just that they didn't work correctly:

The pm.bmp is a 2 x 4 bitmap.
 
%Vl(a,52,24,12,10,6)

%?cc<%?cf<|%cp>>

 Yes, but  also in 24H format %?cc<%?cf<|%x(,pm.bmp,0,0)>>
 
%?St(time format)<|%?if(%cH,>,12)<%x(,pm.bmp,0,0)>>
 
%?cf<|%?if(%cH,>=,13)<%x(,pm.bmp,0,0)>> - Yes, but also in 24h format
 
%?cc<%?cf<|%?if(%cH,>,12)<%xd(K)>>>
 
%?St(time format)<|%if(%cH,<,12)<%cp>
 
%?St(time format)<|%if(%cH,<,12)<%x(,pm.bmp,0,0)>>
 
#%?cc<%?St(time format)<|%if(%cH,>,12)<%x(,pm.bmp,0,0)>>>
 
%?cc<%?St(time format)<|%if(%cH,>,12)<%xd(K)>>>
 
%?if(%cH,>,12)<%x(,pm.bmp,0,0)>
 
%?if(%cP,=,PM)<%?if(%cH,>,12)<%x(,pm.bmp,0,0)>>
 
%?cc<%?if(%cP,=,PM)<%?if(%cH,>,12)<%xd(K)>>> - No.
 
%?if(%cp,=,pm)<%xd(K)> - No.
 
%?if(%cH,>=,13)<%x(,pm.bmp,0,0)>
 
%?if(%cH,<,13)<%?cf<|%x(,pm.bmp,0,0)>>
 
%?if(%cH,>,12)<%?cf<%xd(K)|>> - No
 
%?if(%cH,>=,13)<%x(,pm.bmp,0,0)>

* 111009_001.png (6.58 kB, 196x123 - viewed 128 times.)
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.
« Reply #1 on: October 09, 2011, 07:19:17 PM »
All your %x() lines are wrong.

use %xl(label, filename, x, y)
then
%?St(time format)<|%?if(%cH,>,12)<%xd(label)>>
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.
« Reply #2 on: October 09, 2011, 07:41:03 PM »
I must still be doing something wrong.  ???

Code: [Select]
%xl(K,pm.bmp,52,24)
%Vl(a,52,24,12,10,6)
%?St(time format)<|%?if(%cH,>,12)<%xd(K)>>

That won't work for me.

This does though  :-\, but it also works in 24H format, which is what I don't want.

Code: [Select]
%?St(time format)<|%?if(%cH,>,12)<%x(,pm.bmp,0,0)>>
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.
« Reply #3 on: October 09, 2011, 07:47:10 PM »
that doesnt work because 52,24 in the %xl line are relative to the viewport they are displayed in, change them to 0,0
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.
« Reply #4 on: October 09, 2011, 07:54:35 PM »
Quote from: JdGordon on October 09, 2011, 07:47:10 PM
that doesnt work because 52,24 in the %xl line are relative to the viewport they are displayed in, change them to 0,0

[FACEPALM] That's been the problem the whole darned time, I'm sure. I KNEW it was something so simple. I knew I had the principle right. [DOUBLEFACEPALM!!] I'll go and try it now...jeez Louise!

Post Merge: October 09, 2011, 08:01:06 PM
:-[ Err...I'm still not getting the result I'm wanting. No Bitmap being drawn. Code:

%xl(K,pm.bmp,0,0)

%Vl(a,52,24,12,10,6)
%?St(time format)<|%?if(%cH,>,12)<%xd(K)>>

I'm having a real brain fart here.


[EDIT] STRIKE THAT LAST COMMENT. It IS working now. I need a break from this addictive stuff...Thanks JdGordon for your help.
« Last Edit: October 09, 2011, 08:03:43 PM by KiwiCam »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Is the Clock in 12H Mode? If so, then if it's PM and not AM display this Bitmap.
 

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

Page created in 0.066 seconds with 15 queries.