Game menu button (#777)

* mini panel starts closed. Mini Panel game menu button opens game menu

* explicit close instead of toggle
This commit is contained in:
Thomas Christlieb 2020-10-21 19:58:51 +02:00 committed by GitHub
parent 8b2cc76c30
commit 53e3619781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -1129,6 +1129,9 @@ func (g *GameControls) onClickActionable(item ActionableType) {
g.inventory.Toggle()
g.updateLayout()
case miniPanelGameMenu:
g.miniPanel.Close()
g.escapeMenu.open()
default:
log.Printf("Unrecognized ActionableType(%d) being clicked\n", item)
}

View File

@ -47,7 +47,7 @@ func newMiniPanel(asset *d2asset.AssetManager, uiManager *d2ui.UIManager, isSing
asset: asset,
container: containerSprite,
button: buttonSprite,
isOpen: true,
isOpen: false,
isSinglePlayer: isSinglePlayer,
rectangle: rectangle,
}