d2ui: rename NewCustomButton -> NewDefaultButton; lintfix

This commit is contained in:
M. Sz 2021-01-19 17:47:42 +01:00
parent 07eeec4827
commit b25bbe31f4
3 changed files with 6 additions and 4 deletions

View File

@ -10,10 +10,12 @@ const (
PlayerRelationEnemy
)
// determinates a level, which both players should reach to go hostile
const (
PlayersHostileLevel = 9
)
// determinates max players number for one game
const (
MaxPlayersInGame = 8
)

View File

@ -811,8 +811,8 @@ func (ui *UIManager) NewButton(buttonType ButtonType, text string) *Button {
return btn
}
// NewCustomButton creates new custom button
func (ui *UIManager) NewCustomButton(path string, frame int) *Button {
// NewDefaultButton creates a new button with default settings
func (ui *UIManager) NewDefaultButton(path string, frame int) *Button {
layout := &ButtonLayout{
XSegments: 1,
YSegments: 1,

View File

@ -371,8 +371,8 @@ func (s *PartyPanel) Load() {
// createSwitcher creates party-panel switcher using frame given
func (s *PartyPanel) createSwitcher(frame int) *d2ui.SwitchableButton {
active := s.uiManager.NewCustomButton(d2resource.PartyBoxes, frame)
inactive := s.uiManager.NewCustomButton(d2resource.PartyBoxes, frame+d2enum.PartyButtonNextButtonFrame)
active := s.uiManager.NewDefaultButton(d2resource.PartyBoxes, frame)
inactive := s.uiManager.NewDefaultButton(d2resource.PartyBoxes, frame+d2enum.PartyButtonNextButtonFrame)
switcher := s.uiManager.NewSwitchableButton(active, inactive, true)
switcher.SetVisible(false)