mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
API change: board is responsible for figuring tile size and giving
extra pixels to divider.
This commit is contained in:
parent
9014ef3fd7
commit
14c973354b
2 changed files with 13 additions and 9 deletions
|
@ -1260,20 +1260,24 @@ drawScoreBoard( BoardCtxt* board )
|
|||
|
||||
void
|
||||
board_setTrayLoc( BoardCtxt* board, XP_U16 left, XP_U16 top,
|
||||
XP_U8 trayScaleH, XP_U8 trayScaleV,
|
||||
XP_U8 dividerWidth )
|
||||
XP_U16 trayWidth, XP_U16 trayHeight,
|
||||
XP_U16 minDividerWidth )
|
||||
{
|
||||
XP_U16 dividerWidth;
|
||||
board->trayBounds.left = left;
|
||||
board->trayBounds.top = top;
|
||||
/* what's this +1 for? */
|
||||
board->trayBounds.width = (trayScaleH * MAX_TRAY_TILES) + 1;
|
||||
board->trayBounds.height = trayScaleV;
|
||||
|
||||
board->trayScaleH = trayScaleH;
|
||||
board->trayScaleV = trayScaleV;
|
||||
board->trayBounds.width = trayWidth;
|
||||
board->trayBounds.height = trayHeight;
|
||||
|
||||
dividerWidth = minDividerWidth +
|
||||
((trayWidth - minDividerWidth) % MAX_TRAY_TILES);
|
||||
|
||||
board->trayScaleH = (trayWidth - dividerWidth) / MAX_TRAY_TILES;
|
||||
board->trayScaleV = trayHeight;
|
||||
|
||||
board->dividerWidth = dividerWidth;
|
||||
board->trayBounds.width += (XP_U8)dividerWidth;
|
||||
|
||||
/* boardObscuresTray is about whether they *can* overlap, not just about
|
||||
* they do given the current scroll position of the board. Remember
|
||||
|
|
|
@ -145,8 +145,8 @@ XP_Bool board_toggle_arrowDir( BoardCtxt* board );
|
|||
#define NO_TILES ((TileBit)0)
|
||||
|
||||
void board_setTrayLoc( BoardCtxt* board, XP_U16 trayLeft, XP_U16 trayTop,
|
||||
XP_U8 trayScaleH, XP_U8 trayScaleV,
|
||||
XP_U8 dividerWidth );
|
||||
XP_U16 trayWidth, XP_U16 trayHeight,
|
||||
XP_U16 minDividerWidth );
|
||||
XP_Bool board_hideTray( BoardCtxt* board );
|
||||
XP_Bool board_showTray( BoardCtxt* board );
|
||||
XW_TrayVisState board_getTrayVisState( BoardCtxt* board );
|
||||
|
|
Loading…
Reference in a new issue