Sid Meier's Civilization: Beyond Earth

Sid Meier's Civilization: Beyond Earth

Simple Clock
Kmac 30 Nov, 2014 @ 2:49pm
Dynamic Clock Position
For those, like myself, who like to add in these small UI tweaks manually, for reasons such as maintaining the ability to earn achievements, here are a couple diff's of changes I made to add the current time onto the top panel stack, next to the resources list.

Here's a look at the final product: https://i.imgur.com/PW0fLC3.png

The two files to edit (after creating backups of course) are TopPanel.lua and TopPanel.xml which are under \assets\UI\InGame\.

➤ diff TopPanel.lua.orig TopPanel.lua --- TopPanel.lua.orig +++ TopPanel.lua @@ -264,7 +264,10 @@ -- Update date local date = Game.GetTurnString(); - --Controls.CurrentDate:SetText(date); + -- Update time KM + local kmTime = os.date("%H:%M"); + Controls.CurrentTime:SetText(kmTime); + Controls.TopPanelInfoStack:CalculateSize(); Controls.TopPanelInfoStack:ReprocessAnchoring();

➤ diff TopPanel.xml.orig TopPanel.xml --- TopPanel.xml.orig +++ TopPanel.xml @@ -40,6 +40,12 @@ <GridButton ID="ResourceString" Style="TopBarSeparator" TextOffset="0,2" Size="115,30" TextAnchor="C,C" Color0="175,194,219,255" Color1="175,194,219,100" FontStyle="Glow"/> <GridButton ID="FaithString" Style="TopBarSeparator" TextOffset="0,2" Size="45,30" TextAnchor="R,C" Color0="175,194,219,255" Color1="175,194,219,100" FontStyle="Glow"/> <Image ID="UnitSupplyString" Anchor="C,T" Offset="0,3" Texture="assets\UI\Art\WorldView\OverSupplyLimit.dds" Size="20,20" /> + + <Box Size="5,30" Color="0,0,0,0"/> + <Label ID="CurrentTime" Style="FontNormal20" Offset="0,2" Anchor="C,C" String="XX:XX" Color="175,194,219,255" FontStyle="Shadow"/> + <Box Size="5,30" Color="0,0,0,0"/> + <Box Size="1,30" Color="0,0,0,80"/> + </Stack> <ToolTipType Name="TooltipTypeTopPanel" >

GL,HF;
Last edited by Kmac; 30 Nov, 2014 @ 2:57pm
< >
Showing 1-3 of 3 comments
Voudo 19 Oct, 2015 @ 6:25pm 
how do i do this? I followed your instros, i think, correctly, yet, the clock is non functional :(
Sarion 21 Jan, 2016 @ 7:03am 
Thank you - works perfectly. It's always important to keep track of time when playing any Civ-game...
Just add the lines with the "+" in front.
Voudo 31 Jan, 2016 @ 1:05pm 
Thank you Sarion for the reply, I did that but not sure if I also need to remove the (-) sign one as well.
< >
Showing 1-3 of 3 comments
Per page: 1530 50