Author Topic: Using pawsScrollBar to display time  (Read 209 times)

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
Using pawsScrollBar to display time
« on: May 12, 2014, 07:50:53 am »
I'm trying to make analog time indicator in the Info window using pawsScrollBar by subscribing it to "TimeOfDay" value. Thing is, that then UI is loaded, scrollbar thumb is always set to min value before time of day (hour) will change - in most bad case it's about one game hour.

infowindow.xml:
Code: [Select]
<widget name="TimeScroll" factory="pawsScrollBar" direction="horizontal" tooltip="Time" minValue="1" maxValue="24" tick="1" style="Standard Scrollbar Horizontal" ignore="true">
<up gray="Clear" pressed="Clear" unpressed="Clear" />
        <down gray="Clear" pressed="Clear" unpressed="Clear" />
<thumb stopped="MiniUp" moving="MiniUp" />
        <frame x="0" y="57" width="180" height="16" border="no" />
            <attachpoints>
                <attach point="PROPORTIONAL_RIGHT" />
                <attach point="PROPORTIONAL_BOTTOM" />
                <attach point="ATTACH_TOP" />
                <attach point="ATTACH_LEFT" />
            </attachpoints>
    <subscriptions>
        <subscribe data="TimeOfDay" />
    </subscriptions>
</widget>

imagelist.xml:
Code: [Select]
<image file="/paws/real_skin/components01.png" resource="Clear">
    <texturerect x="511" y="255" width="1" height="1" />
</image>

Does the scrollbar is reacting only to change of TimeOfDay value?.. But then I subscribe it to HP with "fVitalValue0:Self", thumb position updated properly...

So anyone know something about it?



LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Using pawsScrollBar to display time
« Reply #1 on: May 12, 2014, 08:32:58 am »
After logging in, the client clock is not immediately synchronized with the server clock, only when a full "in-game hour" changes, so you may erroneously see "12 a.m." (midnight) or no time at all for up to 10 minutes after logging in.

Furthermore, a long time ago, time updates and weather effects used to be closely related; but that should have been changed since, because many people disabled weather effects and then never saw daylight cycles either (PS#4897). Here I already requested an implementation of a time sync on-login or on-demand, but I don't think it has been implemented ever.
« Last Edit: May 12, 2014, 08:39:31 am by LigH »

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
Re: Using pawsScrollBar to display time
« Reply #2 on: May 12, 2014, 11:56:36 am »
Binding "TimeOfDay" or "TimeOfDayStr" to pawsTextBox shows right time.
Turning on weather effects - also no effect.
So I'm stuck...