This commit is contained in:
2026-05-25 23:13:25 +02:00
parent f75ada75ba
commit eeb6a5e827

View File

@@ -192,6 +192,7 @@ func (r *RadialVerbs) Draw(dst *ebiten.Image, ctx *UICtx) {
vector.DrawFilledCircle(dst, cx, cy, float32(radius), color.RGBA{0, 0, 0, 170}, true) vector.DrawFilledCircle(dst, cx, cy, float32(radius), color.RGBA{0, 0, 0, 170}, true)
hover := r.hitTest(g, g.Input.Point()) hover := r.hitTest(g, g.Input.Point())
selected := g.SelectedVerb()
slice := 2 * math.Pi / float64(n) slice := 2 * math.Pi / float64(n)
// Labels live INSIDE the disk, at 0.62×radius from the center, so a // Labels live INSIDE the disk, at 0.62×radius from the center, so a
@@ -205,9 +206,19 @@ func (r *RadialVerbs) Draw(dst *ebiten.Image, ctx *UICtx) {
label := r.labelFor(g, name) label := r.labelFor(g, name)
tw := textWidth(label) tw := textWidth(label)
col := th.VerbButtonText col := th.VerbButtonText
if i == hover { isSelected := name == selected
// hover halo behind the text isHover := i == hover
vector.DrawFilledCircle(dst, float32(lx), float32(ly+4), float32(radius*0.28), th.VerbButtonSelectedBG, true) if isSelected || isHover {
// Filled halo behind the label. Selected = stronger, hover =
// lighter overlay on top so a hover over a non-selected verb
// still shows feedback.
haloR := float32(radius * 0.28)
if isSelected {
vector.DrawFilledCircle(dst, float32(lx), float32(ly+4), haloR, th.VerbButtonSelectedBG, true)
}
if isHover && !isSelected {
vector.DrawFilledCircle(dst, float32(lx), float32(ly+4), haloR, th.VerbButtonBG, true)
}
} }
g.DrawText(dst, label, int(lx)-tw/2, int(ly)-7, col) g.DrawText(dst, label, int(lx)-tw/2, int(ly)-7, col)
} }