Add data components 151-175; clear MyGo row highlights

Lists, tables, trees, grids, inventories and records in data/.
Outline and GridView build on ui.List: ui.Outline strokes its arrows
and ui.GridView spaces and tints items. The pixel theme keeps MyGo's
row highlights clear so scrolled rows stay on whole dots; off lists
take a veil against the wheel. Adds Canvas.Silhouette, SwitchOptions
Label and exports Rarity.Slot.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 22:29:07 -04:00
1 parent f587d25a5a
commit 03680980da
47 files changed
+3379 -17

No files matched your search

+3 -2
View File
@@ -18,7 +18,8 @@ const (
Legendary
)
func (r Rarity) slot() pixel.Slot {
// Slot is the rarity's color.
func (r Rarity) Slot() pixel.Slot {
if r > Legendary {
panic(fmt.Sprintf("display: unknown Rarity %d", r))
}
@@ -64,7 +65,7 @@ type GemOptions struct {
// Gem is a cut gem by rarity, sparkling in steps.
func Gem(c *ui.Context, r Rarity, o GemOptions) *ui.Element {
k, sc := pixel.K(c), scale(o.Scale)
ink := r.slot()
ink := r.Slot()
return art(c, k, r.name(k), (gem.W+3)*sc, (gem.H+2)*sc, func(g pixel.Canvas) {
g.Sprite(0, 2*sc, gem, 0, ink, sc)
if f := g.Step(4) % 4; f < 2 {