Implement the options menu, part 1
This commit implements loading and saving options from/to config, and enough UI toolkit magic to allow changes to boolean options to be persisted. We now respect the "play movies" setting and take screen resolution from the config file.
This commit is contained in:
@@ -10,11 +10,19 @@ import (
|
||||
"code.ur.gs/lupine/ordoor/internal/util/asciiscan"
|
||||
)
|
||||
|
||||
type MenuType int
|
||||
|
||||
const (
|
||||
TypeStatic = 0
|
||||
TypeMenu = 1
|
||||
TypeOverlay = 61
|
||||
TypeMainButton = 228
|
||||
TypeStatic MenuType = 0
|
||||
TypeMenu MenuType = 1
|
||||
TypeButton MenuType = 3
|
||||
TypeInvokeButton MenuType = 50
|
||||
TypeOverlay MenuType = 61
|
||||
TypeHypertext MenuType = 70
|
||||
TypeCheckbox MenuType = 91
|
||||
TypeAnimationSample MenuType = 220
|
||||
TypeMainButton MenuType = 228
|
||||
TypeSlider MenuType = 232
|
||||
)
|
||||
|
||||
type Record struct {
|
||||
@@ -22,7 +30,7 @@ type Record struct {
|
||||
Children []*Record
|
||||
|
||||
Id int
|
||||
Type int
|
||||
Type MenuType
|
||||
DrawType int
|
||||
FontType int
|
||||
Active bool
|
||||
@@ -183,7 +191,7 @@ func setProperty(r *Record, k, v string) {
|
||||
case "MENUID", "SUBMENUID":
|
||||
r.Id = vInt
|
||||
case "MENUTYPE", "SUBMENUTYPE":
|
||||
r.Type = vInt
|
||||
r.Type = MenuType(vInt)
|
||||
case "ACTIVE":
|
||||
r.Active = (vInt != 0)
|
||||
case "SPRITEID":
|
||||
|
Reference in New Issue
Block a user