From 2b5d8f595f96a2864899f4c7e28bc06fa52d2603 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 18 Jul 2026 04:44:50 -0400 Subject: feat: expose all colors in config.yaml for easier theming --- internal/game/cmd_option.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'internal/game/cmd_option.go') 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")) { -- cgit v1.2.3