Allow dialogues to be hidden or shown
To do this, MENU and SUBMENU are split into two types (at last), and a Widget type is introduced. This should allow lots of code to be removed at some point.
This commit is contained in:
@@ -157,24 +157,24 @@ func loadMenus() {
|
||||
|
||||
for _, menu := range menus {
|
||||
fmt.Printf(" * `%s`: objects=%v fonts=%v\n", menu.Name, menu.ObjectFiles, menu.FontNames)
|
||||
for _, record := range menu.Records {
|
||||
displayRecord(record, 2)
|
||||
|
||||
for _, group := range menu.Groups {
|
||||
// TODO: display group
|
||||
for _, record := range group.Records {
|
||||
displayRecord(record, 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func displayRecord(record *menus.Record, depth int) {
|
||||
content := fmt.Sprintf("id=%v type=%v sprite=%v", record.Id, record.Type, record.SpriteId)
|
||||
content := fmt.Sprintf("id=%v type=%v sprite=%v", record.ID, record.Type, record.SpriteId)
|
||||
|
||||
if !record.Active {
|
||||
content = "(" + content + ")"
|
||||
}
|
||||
|
||||
fmt.Printf("%s* %s\n", strings.Repeat(" ", depth), content)
|
||||
|
||||
for _, child := range record.Children {
|
||||
displayRecord(child, depth+1)
|
||||
}
|
||||
}
|
||||
|
||||
func loadFonts() {
|
||||
|
Reference in New Issue
Block a user