Add media components 346-365; input.SlideBase, guarded Pad

An audio player with transport, scrubber and volume; an equalizer and
a visualizer; a playlist; a cassette, cartridge and record that turn
while they play and hold where they stop; piano keys, a step sequencer
and a tracker you can type into; a waveform, a 16:9 video frame, an
image compare, a gallery, a filmstrip, a record button and an FM tuner.

input exports SlideBase, the undrawn rail its sliders share; the
gallery treats exported Bases as building blocks, not components.
pixel's micro font gains '#' for notes like C#4. pixel.Pad and the
slide rail read input only while their base is enabled, so Inert or a
fresh Disabled stops a drag or a key already sent. AGENTS records why
a drawn container keeps the DISABLED description: MyGo paints a
disabled subtree at half opacity.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-12 06:17:12 -04:00
1 parent 455f5f2a05
commit 0e21870b64
39 files changed
+3066 -10

No files matched your search

+24
View File
@@ -394,3 +394,27 @@ func TestListNamesRowsForReadersAndTyping(t *testing.T) {
t.Fatalf("typing ch chose row %d", sel)
}
}
// MyGo would halve a disabled list's colors off the palette.
func TestOffListsKeepThePalette(t *testing.T) {
fruit := []string{"Apple", "Banana"}
for _, tc := range []struct {
name string
disabled, inert bool
}{{"disabled", true, false}, {"inert", false, true}} {
sel := 0
tt := view(300, 200, newClock(), tc.inert, func(c *ui.Context) {
data.List(c, "Fruit", len(fruit), &sel, data.ListOptions{Disabled: tc.disabled}, func(i int) string { return fruit[i] }, func(i int) {
pixel.Text(c, fruit[i], pixel.TextOptions{})
})
})
r, img := find(t, tt, "Fruit"), tt.Image()
for y := int(r.Y); y < int(r.Y+r.H); y++ {
for x := int(r.X); x < int(r.X+r.W); x++ {
if c := img.RGBAAt(x, y); !slices.ContainsFunc(pixel.SpringDay.Colors[:], func(p ui.Color) bool { return p.R == c.R && p.G == c.G && p.B == c.B }) {
t.Fatalf("%s list shows %v at %d, %d, off the palette", tc.name, c, x, y)
}
}
}
}
}