1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-18 02:16:23 -05:00

bugfix for issue #528 (#529)

This commit is contained in:
dk 2020-07-03 00:03:44 -07:00 committed by GitHub
parent 48bde64a7e
commit ec0bddc01e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -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() {

View File

@ -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() {

View File

@ -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