Skip to content

Commit 2efe4d1

Browse files
refactor(scenes): tidy classes in ui-manager
1 parent 2f4317e commit 2efe4d1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/scenes/ui-manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ interface UIManagerCallbacks {
66
onRestart: () => void;
77
}
88

9-
const HIDDEN_CLASS_NAME = 'pointer-events-none opacity-0';
109
const 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;

0 commit comments

Comments
 (0)