mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-05 09:47:18 -05:00
parent
48bde64a7e
commit
ec0bddc01e
@ -209,7 +209,7 @@ func (v *CharacterSelect) updateCharacterBoxes() {
|
||||
}
|
||||
|
||||
func (v *CharacterSelect) onNewCharButtonClicked() {
|
||||
d2screen.SetNextScreen(CreateSelectHeroClass(v.audioProvider, v.connectionType, v.connectionHost))
|
||||
d2screen.SetNextScreen(CreateSelectHeroClass(v.audioProvider, v.connectionType, v.connectionHost, v.terminal))
|
||||
}
|
||||
|
||||
func (v *CharacterSelect) onExitButtonClicked() {
|
||||
|
@ -286,7 +286,7 @@ func (v *MainMenu) onSinglePlayerClicked() {
|
||||
return
|
||||
}
|
||||
|
||||
d2screen.SetNextScreen(CreateSelectHeroClass(v.audioProvider, d2clientconnectiontype.Local, v.tcpJoinGameEntry.GetText()))
|
||||
d2screen.SetNextScreen(CreateSelectHeroClass(v.audioProvider, d2clientconnectiontype.Local, v.tcpJoinGameEntry.GetText(), v.terminal))
|
||||
}
|
||||
|
||||
func (v *MainMenu) onGithubButtonClicked() {
|
||||
|
@ -71,14 +71,19 @@ type SelectHeroClass struct {
|
||||
terminal d2interface.Terminal
|
||||
}
|
||||
|
||||
func CreateSelectHeroClass(audioProvider d2interface.AudioProvider,
|
||||
connectionType d2clientconnectiontype.ClientConnectionType, connectionHost string) *SelectHeroClass {
|
||||
func CreateSelectHeroClass(
|
||||
audioProvider d2interface.AudioProvider,
|
||||
connectionType d2clientconnectiontype.ClientConnectionType,
|
||||
connectionHost string,
|
||||
terminal d2interface.Terminal,
|
||||
) *SelectHeroClass {
|
||||
result := &SelectHeroClass{
|
||||
heroRenderInfo: make(map[d2enum.Hero]*HeroRenderInfo),
|
||||
selectedHero: d2enum.HeroNone,
|
||||
connectionType: connectionType,
|
||||
connectionHost: connectionHost,
|
||||
audioProvider: audioProvider,
|
||||
terminal: terminal,
|
||||
}
|
||||
|
||||
return result
|
||||
|
Loading…
Reference in New Issue
Block a user