Parcourir la source

Fix

customisations
alemart il y a 5 mois
Parent
révision
583eb9decd
4 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 7
    0
      src/core/hud.ts
  2. 0
    1
      src/ui/fullscreen-button.ts
  3. 0
    1
      src/ui/stats-panel.ts
  4. 0
    1
      src/ui/support-widget.ts

+ 7
- 0
src/core/hud.ts Voir le fichier

@@ -136,6 +136,13 @@ export class HUD
136 136
         this.#fullscreenButton.init(parent, wantFullscreenButton);
137 137
         this.#supportWidget.init(parent);
138 138
 
139
+        for(const element of parent.children as any as HTMLElement[]) {
140
+            if(element.style.getPropertyValue('pointer-events') == '')
141
+                element.style.pointerEvents = 'auto'; // accept pointer input
142
+            if(element.style.getPropertyValue('z-index') == '')
143
+                element.style.zIndex = '1000000';
144
+        }
145
+
139 146
         const container = this._container;
140 147
         container.style.position = 'absolute';
141 148
         container.style.left = container.style.top = '0px';

+ 0
- 1
src/ui/fullscreen-button.ts Voir le fichier

@@ -98,7 +98,6 @@ export class FullscreenButton
98 98
         button.style.height = BUTTON_SIZE + 'px';
99 99
 
100 100
         button.style.opacity = '0.5';
101
-        button.style.zIndex = '1000000';
102 101
         button.style.cursor = 'pointer';
103 102
         button.style.outline = 'none';
104 103
         (button.style as any)['-webkit-tap-highlight-color'] = 'transparent';

+ 0
- 1
src/ui/stats-panel.ts Voir le fichier

@@ -184,7 +184,6 @@ export class StatsPanel
184 184
 
185 185
         container.style.position = 'absolute';
186 186
         container.style.left = container.style.top = '0px';
187
-        container.style.zIndex = '1000000';
188 187
         container.style.padding = '0px';
189 188
 
190 189
         container.appendChild(this._createTitle());

+ 0
- 1
src/ui/support-widget.ts Voir le fichier

@@ -86,7 +86,6 @@ export class SupportWidget
86 86
         button.style.transform = 'translateX(50%)';
87 87
 
88 88
         button.style.opacity = '0.75';
89
-        button.style.zIndex = '1000000';
90 89
         button.style.cursor = 'pointer';
91 90
         button.style.outline = 'none';
92 91
         (button.style as any)['-webkit-tap-highlight-color'] = 'transparent';

Chargement…
Annuler
Enregistrer