Allow left, center, and right alignment of text

This commit is contained in:
2024-01-09 22:48:47 -05:00
parent 6516c40862
commit 5884b37d5a
5 changed files with 50 additions and 18 deletions
+5 -6
View File
@@ -16,7 +16,7 @@ import (
)
const (
RefreshRateHz = 1
RefreshRateHz = 120
MempoolURL = "mempool.space"
)
@@ -29,10 +29,10 @@ func main() {
c := rgbmatrix.NewCanvas(m)
d := display.New(c,
display.NewSlot(9, 5, 4, 0, 0),
display.NewSlot(5, 5, 4, 44, 0),
display.NewSlot(7, 13, 8, 5, 9),
display.NewSlot(12, 5, 4, 7, 27),
display.NewSlot(display.Left, 9, 5, 4, 0, 0),
display.NewSlot(display.Right, 5, 5, 4, 44, 0),
display.NewSlot(display.Center, 8, 13, 8, 0, 9),
display.NewSlot(display.Center, 16, 5, 4, 0, 27),
)
ctx, cancel := context.WithCancel(context.Background())
@@ -85,7 +85,6 @@ func main() {
for {
select {
case m := <-msgs:
fmt.Printf("%+v\n", m)
if m.Fees != nil {
feesMutex.Lock()
fees = *m.Fees