Anonymous user
Honeycombs: Difference between revisions
m
→{{header|Icon}} and {{header|Unicon}}: tweak description
m (→{{header|Icon}} and {{header|Unicon}}: fix comment) |
m (→{{header|Icon}} and {{header|Unicon}}: tweak description) |
||
Line 17:
The HexWidgetData record carries around alot of data about each widget including drawing coordinates, label, a routine to know if it's been selected and helper data, and coordinates for drawing neighboring cells (down and upper/lower right).
Label selection is straight forward. Mouse selection first determines if x,y is within the widgets rectangular outer bounds. The x,y point is then reflected into the north west quadrant of the cell and the helper data is used to calculate an abbreviated cross-product (x and y will always be 0).
<lang Icon>link printf
|