added one more level, rm comments
This commit is contained in:
@@ -82,6 +82,10 @@ func (scene *SelectScene) SetupUI() {
|
||||
levels = append(levels, LevelEntry{Id: id, Name: scene.Game.Levels[id].Name})
|
||||
}
|
||||
|
||||
// for i := 0; i < 40; i++ {
|
||||
// levels = append(levels, LevelEntry{Id: i, Name: "level"})
|
||||
// }
|
||||
|
||||
slog.Debug("levels", "levels", levels)
|
||||
buttonImage, err := gameui.LoadButtonImage()
|
||||
if err != nil {
|
||||
@@ -123,14 +127,14 @@ func (scene *SelectScene) SetupUI() {
|
||||
widget.ListOpts.EntryFontFace(*assets.FontRenderer.FontNormal),
|
||||
// Set the colors for the list
|
||||
widget.ListOpts.EntryColor(&widget.ListEntryColor{
|
||||
Selected: color.NRGBA{0, 255, 0, 255}, // Foreground color for the unfocused selected entry
|
||||
Unselected: color.NRGBA{254, 255, 255, 255}, // Foreground color for the unfocused unselected entry
|
||||
SelectedBackground: color.NRGBA{R: 130, G: 130, B: 200, A: 255}, // Background color for the unfocused selected entry
|
||||
SelectedFocusedBackground: color.NRGBA{R: 130, G: 130, B: 170, A: 255}, // Background color for the focused selected entry
|
||||
FocusedBackground: color.NRGBA{R: 170, G: 170, B: 180, A: 255}, // Background color for the focused unselected entry
|
||||
DisabledUnselected: color.NRGBA{100, 100, 100, 255}, // Foreground color for the disabled unselected entry
|
||||
DisabledSelected: color.NRGBA{100, 100, 100, 255}, // Foreground color for the disabled selected entry
|
||||
DisabledSelectedBackground: color.NRGBA{100, 100, 100, 255}, // Background color for the disabled selected entry
|
||||
Selected: color.NRGBA{0, 255, 0, 255},
|
||||
Unselected: color.NRGBA{254, 255, 255, 255},
|
||||
SelectedBackground: color.NRGBA{R: 130, G: 130, B: 200, A: 255},
|
||||
SelectedFocusedBackground: color.NRGBA{R: 130, G: 130, B: 170, A: 255},
|
||||
FocusedBackground: color.NRGBA{R: 170, G: 170, B: 180, A: 255},
|
||||
DisabledUnselected: color.NRGBA{100, 100, 100, 255},
|
||||
DisabledSelected: color.NRGBA{100, 100, 100, 255},
|
||||
DisabledSelectedBackground: color.NRGBA{100, 100, 100, 255},
|
||||
}),
|
||||
// This required function returns the string displayed in the list
|
||||
widget.ListOpts.EntryLabelFunc(func(e interface{}) string {
|
||||
|
||||
Reference in New Issue
Block a user