okay new ux idea

This commit is contained in:
2025-08-27 23:22:39 -04:00
parent 8b1bfc8a01
commit 573396054f
8 changed files with 134 additions and 210 deletions

View File

@@ -9,12 +9,12 @@ import (
type Table struct {
mouseHandler
Block
block
ColumnCount int
RowCount int
Cells []Element
Cells []Dimensions
Style struct {
}
@@ -70,8 +70,8 @@ func (t *Table) HandleMouseUp(ctx context.Context, s MouseState) error {
return nil
}
func (t *Table) CellSize(ctx context.Context) (w, h float32) {
w, h = GetContainerSize(ctx)
func (t *Table) CellSize() (w, h float32) {
w, h = t.
return w / float32(t.ColumnCount), h / float32(t.RowCount)
}
@@ -83,16 +83,8 @@ func (t *Table) CellZero(ctx context.Context, addr int) (x, y float32) {
return x + float32(col)*w, y + float32(row) + h
}
func (t *Table) Draw(ctx context.Context, screen *ebiten.Image) error {
}
func (t *Table) contextForCell(ctx context.Context, addr int) context.Context {
zx, zy := t.CellZero(ctx, addr)
w, h := t.CellSize(ctx)
ctx = SetZero(ctx, zx, zy)
ctx = SetContainerSize(ctx, w, h)
return ctx
func (t *Table) Draw(screen *ebiten.Image, zx, zy float64) error {
return nil
}
func (t *Table) getAddressUnderMouse() int {