aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_option.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-18 04:44:50 -0400
committerhistoria <[not public]>2026-07-18 04:44:50 -0400
commit2b5d8f595f96a2864899f4c7e28bc06fa52d2603 (patch)
treef1539db865d9968414e59d9b250861c1b356d627 /internal/game/cmd_option.go
parentdb8ca1fe26a36b78074a424ae657b2cbb9b3af19 (diff)
downloadthehouseoficarus-2b5d8f595f96a2864899f4c7e28bc06fa52d2603.tar.gz
feat: expose all colors in config.yaml for easier theming
Diffstat (limited to 'internal/game/cmd_option.go')
-rw-r--r--internal/game/cmd_option.go20
1 files changed, 12 insertions, 8 deletions
diff --git a/internal/game/cmd_option.go b/internal/game/cmd_option.go
index 2d6f3f0..55a04de 100644
--- a/internal/game/cmd_option.go
+++ b/internal/game/cmd_option.go
@@ -16,12 +16,16 @@ func (g *Game) doOption(sess *net.Session, input string) {
mode := g.colorMode(sess)
if input == "" {
+ hLabel := g.resolveConstant(sess, "table_header_label")
+ hValue := g.resolveConstant(sess, "table_header_value")
+ hDetail := g.resolveConstant(sess, "table_header_detail")
+ hDesc := g.resolveConstant(sess, "table_header_desc")
table := &ui.Table{
Columns: []string{
- color.Render(mode, color.Parse("49"), "Option"),
- color.Render(mode, color.Parse("FA"), "Value"),
- color.Render(mode, color.Parse("F5"), "Valid"),
- color.Render(mode, color.Parse("FF"), "Description"),
+ color.Render(mode, hLabel, "Option"),
+ color.Render(mode, hValue, "Value"),
+ color.Render(mode, hDetail, "Valid"),
+ color.Render(mode, hDesc, "Description"),
},
}
for _, def := range player.OptionDefs {
@@ -29,10 +33,10 @@ func (g *Game) doOption(sess *net.Session, input string) {
val = truncateForTable(val, p.OptionBool("unicode"))
valid := formatValidValues(&def)
table.Rows = append(table.Rows, []string{
- color.Render(mode, color.Parse("49"), def.Name),
- color.Render(mode, color.Parse("FA"), val),
- color.Render(mode, color.Parse("F5"), valid),
- color.Render(mode, color.Parse("FF"), def.Description),
+ color.Render(mode, hLabel, def.Name),
+ color.Render(mode, hValue, val),
+ color.Render(mode, hDetail, valid),
+ color.Render(mode, hDesc, def.Description),
})
}
for _, line := range table.Render(p.OptionBool("unicode"), p.OptionInt("wrap_width")) {