Handbook
Glossary
get-cell-dimension ( n gadget -- celldims )
Vocabulary
gamelib
.
ui
Inputs
n
an
object
gadget
an
object
Outputs
celldims
an
object
Definition
USING:
accessors
kernel
math
sequences
;
IN:
gamelib.ui
::
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
;