8000 fix phaser dom zindex by sylvainpolletvillard · Pull Request #2959 · keldaanCommunity/pokemonAutoChess · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix phaser dom zindex #2959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/public/src/game/depths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export const DEPTH = {
INDICATOR: 57,

// 61-70: Popup/Tooltips/HUD
TOOLTIP_BACK: 61,
TOOLTIP: 62,
TOOLTIP_FRONT: 63
HUD: 60,
PHASER_DOM_CONTAINER: 61,
TOOLTIP_BACK: 62,
TOOLTIP: 63,
TOOLTIP_FRONT: 64
}
2 changes: 2 additions & 0 deletions app/public/src/game/game-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { cc } from "../pages/utils/jsx"
import { values } from "../../../utils/schemas"
import { SchemaCallbackProxy } from "@colyseus/schema"
import { getPkmWithCustom } from "../../../models/colyseus-models/pokemon-customs"
import { DEPTH } from "./depths"

class GameContainer {
room: Room<GameState>
Expand Down Expand Up @@ -258,6 +259,7 @@ class GameContainer {
}
}
this.game = new Phaser.Game(config)
this.game.domContainer.style.zIndex = DEPTH.PHASER_DOM_CONTAINER.toString()
this.game.scene.start("gameScene", {
room: this.room,
spectate: this.spectate
Expand Down
0