Skip to content

Show game time#2307

Merged
Coronia merged 7 commits into
Phobos-developers:developfrom
Coronia:show-game-time
Jul 25, 2026
Merged

Show game time#2307
Coronia merged 7 commits into
Phobos-developers:developfrom
Coronia:show-game-time

Conversation

@Coronia

@Coronia Coronia commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

ported from CnCNet/yrpp-spawner#64 since this is more of a standalone function than a part of disabling save, and is less relevant to Spawner

  • A timer can be displayed to show how many time has passed since game starts.
    • The timer will be shown in the format of TXT_GAMETIME hh:mm:ss. For localization add TXT_GAMETIME into your .csf file.
    • This will show the ingame time by default. It can also be set to show real time by real time timers
    • ShowGameTime.BoardOpacity can be used to set the opacitiy of background for game time display.
    • Observer can't see this timer since they've already gotten one on the top of sidebar.

In RA2MD.INI:

[Phobos]
ShowGameTime=false             ; boolean
ShowGameTime.BoardOpacity=40   ; integer

by Trsdy

@Coronia Coronia added Needs testing Minor Minor feature and/or fix, not a lot of changes or they are not significant ⚙️T1 T1 maintainer review is sufficient labels Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@chaserli

Copy link
Copy Markdown
Contributor

If we are doing this on Phobos, it should be implemented differently. The hook was copied from https://github.com/Phobos-developers/Phobos/blob/develop/src/Phobos.cpp#L305

Personally I think we can fake this as a SW timer and show it along with all other SW timers/mission timer/ (in TacticalClass::Draw iirc)

@Coronia

Coronia commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

If we are doing this on Phobos, it should be implemented differently. The hook was copied from https://github.com/Phobos-developers/Phobos/blob/develop/src/Phobos.cpp#L305

Personally I think we can fake this as a SW timer and show it along with all other SW timers/mission timer/ (in TacticalClass::Draw iirc)

It'll indeed overwrite Phobos version text for Debug and DevBuild if enabled since the hook will be skipped. But I'm not sure making it a SW timer is a good idea either since it'll be too clustered

I personally think it's fair to overwrite it since they also take the same place in screen. If we keep them both them there'll be an overlap. But maybe this should be decided by @Metadorius

@Metadorius

Copy link
Copy Markdown
Member

can't we write some of this in the bottom left?

@Coronia

Coronia commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

can't we write some of this in the bottom left?

bottom left is also occupied by release note and FPS counter. Besides, if we want to make an UI for details of selected objects, that's also the reserved place
image

@Metadorius

Copy link
Copy Markdown
Member

then how about using top right, but making stacking of "messages"

@Coronia

Coronia commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

then how about using top right, but making stacking of "messages"

done
image

@Coronia
Coronia merged commit bdaaee9 into Phobos-developers:develop Jul 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Minor Minor feature and/or fix, not a lot of changes or they are not significant ⚙️T1 T1 maintainer review is sufficient Tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants