1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-16 17:35:57 -05:00

party panel: party panel is created only, when game isn't singlePlayer game

This commit is contained in:
M. Sz 2021-01-19 19:36:16 +01:00
parent e982430c55
commit c9859f25d3

View File

@ -174,8 +174,6 @@ func NewGameControls(
heroStatsPanel := NewHeroStatsPanel(asset, ui, hero.Name(), hero.Class, l, hero.Stats)
PartyPanel := NewPartyPanel(asset, ui, hero.Name(), l, hero, hero.Stats, players)
questLog := NewQuestLog(asset, ui, l, audioProvider, hero.Act)
inventory, err := NewInventory(asset, ui, l, hero.Gold, inventoryRecord)
@ -208,7 +206,6 @@ func NewGameControls(
inventory: inventory,
skilltree: skilltree,
heroStatsPanel: heroStatsPanel,
PartyPanel: PartyPanel,
questLog: questLog,
HelpOverlay: helpOverlay,
keyMap: keyMap,
@ -236,6 +233,11 @@ func NewGameControls(
isSinglePlayer: isSinglePlayer,
}
if !isSinglePlayer {
PartyPanel := NewPartyPanel(asset, ui, hero.Name(), l, hero, hero.Stats, players)
gc.PartyPanel = PartyPanel
}
hud := NewHUD(asset, ui, hero, miniPanel, actionableRegions, mapEngine, l, gc, mapRenderer)
gc.hud = hud