@@ -29,15 +29,14 @@ const GameTimeDisplay: React.FC<GameTimeDisplayProps> = (
29
29
return (
30
30
< div
31
31
style = { {
32
- display : 'inline-block ' ,
32
+ position : 'relative ' ,
33
33
width : '30px' ,
34
34
height : '25px' ,
35
- position : 'relative' ,
36
35
margin : 0 ,
37
36
padding : 0 ,
38
37
border : '1px solid' ,
39
38
borderRadius : '5px' ,
40
- borderColor : fillColor ,
39
+ borderColor : euiTheme . border . color ,
41
40
} }
42
41
>
43
42
< div
@@ -86,10 +85,14 @@ export const GameRoundTime: React.FC<GameRoundTimeProps> = (
86
85
// Example: '1737941270'.
87
86
const serverTimeRef = useRef < number > ( 0 ) ; // current time on game server
88
87
const roundTimeRef = useRef < number > ( 0 ) ; // future time when can take action
89
- const castTimeRef = useRef < number > ( 0 ) ; // future time when spell prepared
88
+ const castTimeRef = useRef < number > ( 0 ) ; // future time when spell is prepared
90
89
91
90
// User-friendly remaining durations (in seconds).
92
91
// Example: '6' (for 6 seconds remaining).
92
+ // The 'current' values are decremented every second.
93
+ // It's how many seconds are left until the action can be taken.
94
+ // The 'initial' values are how many seconds to wait in total.
95
+ // Together, they allow us to proportionally style the progress bars.
93
96
const [ currentRT , setCurrentRT ] = useState < number > ( 0 ) ;
94
97
const [ initialRT , setInitialRT ] = useState < number > ( 0 ) ;
95
98
const [ currentCT , setCurrentCT ] = useState < number > ( 0 ) ;
@@ -138,7 +141,13 @@ export const GameRoundTime: React.FC<GameRoundTimeProps> = (
138
141
} ) ;
139
142
140
143
return (
141
- < >
144
+ < div
145
+ style = { {
146
+ display : 'flex' ,
147
+ flexDirection : 'column' ,
148
+ gap : '5px' ,
149
+ } }
150
+ >
142
151
< GameTimeDisplay
143
152
type = "RoundTime"
144
153
currentTime = { currentRT }
@@ -153,7 +162,7 @@ export const GameRoundTime: React.FC<GameRoundTimeProps> = (
153
162
textColor = { euiTheme . colors . fullShade }
154
163
fillColor = { euiTheme . colors . primary }
155
164
/>
156
- </ >
165
+ </ div >
157
166
) ;
158
167
} ;
159
168
0 commit comments