mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 02:16:23 -05:00
lintfix: fixed lint errors
This commit is contained in:
parent
bd3fc4bb25
commit
ebfee273ac
@ -30,6 +30,7 @@ const (
|
|||||||
seeingButtonFrame = iota * 4
|
seeingButtonFrame = iota * 4
|
||||||
relationshipsFrame
|
relationshipsFrame
|
||||||
listeningButtonFrame
|
listeningButtonFrame
|
||||||
|
// nolint:deadcode,varcheck,unused // will be used
|
||||||
lockButtonFrame
|
lockButtonFrame
|
||||||
|
|
||||||
nextButtonFrame = 2
|
nextButtonFrame = 2
|
||||||
@ -55,13 +56,16 @@ const (
|
|||||||
type partyIndex struct {
|
type partyIndex struct {
|
||||||
name *d2ui.Label
|
name *d2ui.Label
|
||||||
class *d2ui.Label
|
class *d2ui.Label
|
||||||
|
// nolint:structcheck,unused // will be used
|
||||||
level *d2ui.Label
|
level *d2ui.Label
|
||||||
relationshipSwitcher *d2ui.SwitchableButton
|
relationshipSwitcher *d2ui.SwitchableButton
|
||||||
seeingSwitcher *d2ui.SwitchableButton
|
seeingSwitcher *d2ui.SwitchableButton
|
||||||
listeningSwitcher *d2ui.SwitchableButton
|
listeningSwitcher *d2ui.SwitchableButton
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *PartyPanel) NewPartyIndex(name string, class d2enum.Hero, level int, idx int) *partyIndex {
|
// newPartyIndex creates new party index
|
||||||
|
// nolint:unparam // level will be used
|
||||||
|
func (s *PartyPanel) newPartyIndex(name string, class d2enum.Hero, level, idx int) *partyIndex {
|
||||||
result := &partyIndex{}
|
result := &partyIndex{}
|
||||||
|
|
||||||
nameLabel := s.uiManager.NewLabel(d2resource.Font16, d2resource.PaletteSky)
|
nameLabel := s.uiManager.NewLabel(d2resource.Font16, d2resource.PaletteSky)
|
||||||
@ -183,7 +187,7 @@ func (s *PartyPanel) Load() {
|
|||||||
s.panelGroup.AddWidget(v)
|
s.panelGroup.AddWidget(v)
|
||||||
|
|
||||||
// example data
|
// example data
|
||||||
s.partyIndexes[0] = s.NewPartyIndex("PartyMember", d2enum.HeroPaladin, 5, 0)
|
s.partyIndexes[0] = s.newPartyIndex("PartyMember", d2enum.HeroPaladin, 5, 0)
|
||||||
for _, i := range s.partyIndexes {
|
for _, i := range s.partyIndexes {
|
||||||
// needed for "developing time" to avoit panic
|
// needed for "developing time" to avoit panic
|
||||||
if i.name != nil {
|
if i.name != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user