by 3saster » Fri Nov 22, 2019 1:27 pm
Any word on this? It, uh, seems to have gone dormant...
I simply ask because it seems that since you are okay with UI-scope only, all that would need to be done is make this
method public. I'll say that it does make the location in althud a little odd though.
Since Nightfright and I largely just want this for our own mod, I'd be willing to do the work myself, but I need to be clear on the specifications. This is what I am thinking:
- Make a Clock class that is UI-scope in ZScript.
- Add the static native public methods GetTime(), which returns the Unix timestamp, and GetRealTime(), which returns the Unix timestamp taking timezone into account.
- Add a static public method SetTime() that lets you set the current time (i.e. a debug override).
- Make a global variable of this type that can be accessed directly.
Does this seem okay, or totally off? Are there any other things to consider?
Any word on this? It, uh, seems to have gone dormant...
I simply ask because it seems that since you are okay with UI-scope only, all that would need to be done is make this [url=https://github.com/coelckers/gzdoom/blob/ef7a35664456f5982b2b99850341f7eb1eb5ad1b/wadsrc/static/zscript/ui/statusbar/alt_hud.zs#L773]method[/url] public. I'll say that it does make the location in althud a little odd though.
Since Nightfright and I largely just want this for our own mod, I'd be willing to do the work myself, but I need to be clear on the specifications. This is what I am thinking:
[list]
[*] Make a [i]Clock[/i] class that is UI-scope in ZScript.
[*] Add the static native public methods [i]GetTime()[/i], which returns the Unix timestamp, and [i]GetRealTime()[/i], which returns the Unix timestamp taking timezone into account.
[*] Add a static public method [i]SetTime()[/i] that lets you set the current time (i.e. a debug override).
[*] Make a global variable of this type that can be accessed directly.[/list]
Does this seem okay, or totally off? Are there any other things to consider?