Noah Petherbridge
49876c4fdf
* Install the new ui.TabFrame widget into the Settings and Doodad Dropper windows to give them properly tabbed interfaces. * Doodad Dropper's new tabs divide the list of doodads into categories to make them easier to find. * The officially defined categories so far are: - Objects (Start/End Flags and Box) - Doors (All locked doors and keys, Warp Doors, and Electric Door) - Gizmos (All buttons, switches, state blocks/doors, Electric Door) - Creatures (Blue/Red Azulian, Bird, Boy) * The "All" tab of the Doodad Dropper will show every doodad regardless of its category or whether it fit one of the official categories. * How doodads are assigned categories is by a special "category" tag in their metadata, e.g. "category=doors,gizmos" - multiple supported.
11 lines
222 B
Go
11 lines
222 B
Go
package doodads
|
|
|
|
import "sort"
|
|
|
|
// SortByName orders an array of loaded Doodads by their titles.
|
|
func SortByName(list []*Doodad) {
|
|
sort.SliceStable(list, func(i, j int) bool {
|
|
return list[i].Title < list[j].Title
|
|
})
|
|
}
|