Author Topic: Clock-Help  (Read 5544 times)

Michel Weder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Clock-Help
« on: September 19, 2023, 01:16:55 PM »
Hello, is it possible to expand the display to four digits? See image.



Best regards.


Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Clock-Help
« Reply #1 on: September 19, 2023, 03:08:53 PM »
Sure.  The <clock> layout token as several variations.  I would recommend:

<clock format="hMMSS:">

This will only display the hours if the number of hours is greater than zero, and will display the hours with no leading zeros when the number of hours is less than 10.  It will display the minutes and seconds using two digits, so values less than 10 will have leading zeros.  Some examples:

2:05:00

05:00

00:10

If you want the hours to have leading zeros, add an extra lowercase h: <clock format="hhMMSS:">

If you want the hours to always be displayed, use uppercase H letters: <clock format="HMMSS:"> or <clock format="HHMMSS:">

Michel Weder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Clock-Help
« Reply #2 on: September 20, 2023, 07:58:36 AM »
That worked brilliantly. Thank you for that.
Another question, can you leave out the commas in the price? We only play low BUYIN'S.



Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Clock-Help
« Reply #3 on: September 20, 2023, 03:14:14 PM »
Yes.  But that's a custom layout, so I'm not sure how the prizes are being displayed.  I assume using the <prizes> layout token, but maybe it's using the <prize> token for each individual prize.  Either way, you can add the roundOff="true" attribute to truncate the decimal part.  For example:

<prizes orient="horizontal" roundOff="true">

Jaxen

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Clock-Help
« Reply #4 on: November 26, 2023, 01:44:01 AM »
Sure.  The <clock> layout token as several variations.  I would recommend:

<clock format="hMMSS:">

This will only display the hours if the number of hours is greater than zero, and will display the hours with no leading zeros when the number of hours is less than 10.  It will display the minutes and seconds using two digits, so values less than 10 will have leading zeros.  Some examples:

2:05:00

05:00

00:10

If you want the hours to have leading zeros, add an extra lowercase h: <clock format="hhMMSS:">

If you want the hours to always be displayed, use uppercase H letters: <clock format="HMMSS:"> or <clock format="HHMMSS:">

Hey Corey, found this looking for something else, but is there a way to display the time WITHOUT the leading zeroes? I don't need hours as our longest levels are 40 minutes.
I've looked through the Preferences Tab, but I haven't found it. Maybe I'm looking with my mouth.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Clock-Help
« Reply #5 on: November 29, 2023, 05:32:58 PM »
Hey Corey, found this looking for something else, but is there a way to display the time WITHOUT the leading zeroes? I don't need hours as our longest levels are 40 minutes.
I've looked through the Preferences Tab, but I haven't found it. Maybe I'm looking with my mouth.

Looking back at this, it's odd to me that the default clock display will have a leading zero for hours but not for minutes.   ???  So a round that is an hour long will display as 01:00:00.  When it gets to less than an hour it will display as 59:59 and then when it gets to less than 10 minutes it will display as 9:59.  Not sure why that wasn't consistent.  At less than 1 minute it displays as 0:59, but that makes sense to me because :59 seems odd without the leading zero.

You can also specify the format, but I have to admit after messing around with it for 10 minutes and trying a bunch of combinations, I'm convinced it was not designed very well and needs to be revisited in the next version.  I would recommend:

<clock format="hMMSS:">

The upside is the hours won't have a leading zero.  The downside is the minutes will have a leading zero.

Michel Weder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Clock-Help
« Reply #6 on: March 03, 2024, 02:09:17 AM »


Hello,
Is it possible to only display the ante from a certain level/round?

Best regards

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Clock-Help
« Reply #7 on: March 03, 2024, 10:14:40 PM »
Yes, take a look at the default layout.  It's basically done by having two property sets for the cell that displays the ante.  One property set displays the ante (usually the Default property set), the other property set is identical but doesn't display the ante.  The property set that doesn't display the ante has conditions: "Ante is non-zero": "No".  Double-negative, but basically it means use this property set when ante is zero.  When the ante is non-zero, it will skip that property set and use the Default property set.

Michel Weder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Clock-Help
« Reply #8 on: March 10, 2024, 01:59:40 PM »
That worked wonderfully. I have still one question. Is it possible to show the blinds shortened to 1k/2k and the chip count in full, see photo.


Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Clock-Help
« Reply #9 on: March 10, 2024, 03:32:42 PM »
Preferences tab -> Currency / Numbers category:


Michel Weder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Clock-Help
« Reply #10 on: March 11, 2024, 01:04:32 AM »
Hi Corey,
thank you for your answer.
 I had already found the entry. I wanted to give the blinds short from round 5 (2k-4k) but leave the chip stack long (220 000).
So exactly like in the picture.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Clock-Help
« Reply #11 on: March 11, 2024, 01:40:52 PM »
I see.  So, leave the preference "off" and you'll need to modify the Blinds cell.  Your Blinds cell is different from the default, but it will still be something like this.  You just need to add the abbreviateChips attribute:

Blinds<br><smallBlind abbreviateChips="true"> / <bigBlind abbreviateChips="true">

Michel Weder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Clock-Help
« Reply #12 on: March 13, 2024, 02:03:08 AM »
Absolutely brilliant, that worked really well too.
During the tournament I noticed that the cell to the right of the clock "jumps" because I don't use a monospace font. Is there a way to fix the cell or its contents?


Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Clock-Help
« Reply #13 on: March 13, 2024, 06:05:09 AM »
Not really "fix" it, but work around it.  You'll need to set a size (width) on either the clock cell itself, or put the clock in a container with a fixed size.  For example, it looks like the clock "half" of the image is about 370 pixels.  You could set the width of the clock cell to 370, or change the contents of the clock cell to something like this:

<div style="width: 370px; overflow: hidden"><clock></div>

That should keep it a fixed size no matter its contents.

Michel Weder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Clock-Help
« Reply #14 on: March 13, 2024, 06:37:00 AM »
You are a genius. Thank you.