From 120772175d428854a5adb154c755d568750e0a17 Mon Sep 17 00:00:00 2001 From: NeilClack Date: Mon, 30 Mar 2026 00:43:01 -0500 Subject: [PATCH] Update Proclamation selection Moved selection keybinds: - Enter now saves - Space selects - Removed A Updated colors to be more readable and colorblind friendly. Cleaned up instructional text to be easier and more simple to read. --- internal/page/proclamationOptions.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/internal/page/proclamationOptions.go b/internal/page/proclamationOptions.go index e4dfb51..11f7155 100644 --- a/internal/page/proclamationOptions.go +++ b/internal/page/proclamationOptions.go @@ -21,11 +21,12 @@ var ( ) type FlatItem struct { - Label StringItem - ID string - IsCategory bool - Depth int - Expanded bool + Label StringItem + ID string + IsCategory bool + IsSubCategory bool + Depth int + Expanded bool } type ProclamationOptions struct { @@ -79,7 +80,7 @@ func (p *ProclamationOptions) Init(ctx *PageCtx) error { p.title, _ = NewStringItem("Proclamation Browser", p.font, colors.White) p.title.Scale(float32(64) / float32(ctx.CfgPtr.StandardFontSize)) - p.prompt, _ = NewStringItem("Arrows: Nav | Enter: Exp/Col | Space: Toggle | A: Accept | Back: Cancel", p.font, colors.White) + p.prompt, _ = NewStringItem("Arrows: Nav Space: Select/Expand Enter: Save Changes Back: Cancel", p.font, colors.White) p.prompt.Scale(itemScale * 0.8) // Calculation for visible area @@ -226,14 +227,14 @@ func (p *ProclamationOptions) HandleEvent(event *sdl.Event) error { p.scrollOffset = bottomIdx p.highlightIndex = bottomIdx case sdl.K_RETURN: - p.toggleExpansion(p.highlightIndex) + p.acceptChanges() case sdl.K_SPACE: item := p.allItems[p.highlightIndex] if !item.IsCategory { p.activeMap[item.ID] = !p.activeMap[item.ID] + } else { + p.toggleExpansion(p.highlightIndex) } - case sdl.K_a: - p.acceptChanges() case sdl.K_BACKSPACE, sdl.K_ESCAPE: p.Context.NavigateTo(SETTINGS) } @@ -256,7 +257,7 @@ func (p *ProclamationOptions) acceptChanges() { } return nil }) - p.Context.NavigateTo(SETTINGS) + p.Context.NavigateTo(SCROLLER) } func (p *ProclamationOptions) Render() error { @@ -278,9 +279,9 @@ func (p *ProclamationOptions) Render() error { if i == p.highlightIndex { item.Label.Color = colors.Black } else if item.IsCategory { - item.Label.Color = colors.Cyan + item.Label.Color = colors.DodgerBlue } else if p.activeMap[item.ID] { - item.Label.Color = colors.Green + item.Label.Color = colors.Orange } else { item.Label.Color = colors.White }