File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ interface UIManagerCallbacks {
66 onRestart : ( ) => void ;
77}
88
9- const HIDDEN_CLASS_NAME = 'pointer-events-none opacity-0' ;
109const INVISIBLE_CLASS_NAME = 'opacity-0' ;
10+ const HIDDEN_CLASS_NAME = `pointer-events-none ${ INVISIBLE_CLASS_NAME } ` ;
1111
1212/**
1313 * Lightweight DOM UI for game states and score.
@@ -123,7 +123,7 @@ export class UIManager {
123123 return ;
124124 }
125125
126- this . panel . classList . add ( 'pointer-events-none' , 'opacity-0' ) ;
126+ this . panel . classList . add ( ... HIDDEN_CLASS_NAME . split ( ' ' ) ) ;
127127 }
128128
129129 /**
@@ -139,7 +139,7 @@ export class UIManager {
139139 buttonLabel : string ,
140140 mode : 'start' | 'resume' | 'restart' ,
141141 ) : void {
142- this . panel . classList . remove ( 'pointer-events-none' , 'opacity-0' ) ;
142+ this . panel . classList . remove ( ... HIDDEN_CLASS_NAME . split ( ' ' ) ) ;
143143 this . buttonMode = mode ;
144144 this . title . textContent = title ;
145145 this . message . textContent = message ;
You can’t perform that action at this time.
0 commit comments