get-cell-dimension ( n gadget -- celldims )


Vocabulary
gamelib.ui

Inputs
nan object
gadgetan object


Outputs
celldimsan object


Definition


:: get-cell-dimension ( n gadget -- celldims )
gadget dimension>> first2 :> ( wdt hgt ) n gadget board>>
nth dup width>> swap height>> :> ( cols rows ) wdt cols /i
:> cellwidth hgt rows /i :> cellheight cellwidth cellheight
{ } 2sequence ;