tweaks on tray position

This commit is contained in:
ehouse 2004-11-03 03:58:46 +00:00
parent 51b55f4979
commit 48afd331ef

View file

@ -291,36 +291,31 @@ getSizes( PalmAppGlobals* globals )
static void static void
locateTrayButtons( PalmAppGlobals* globals ) locateTrayButtons( PalmAppGlobals* globals )
{ {
if ( !globals->hasHiRes ) { if ( !globals->useHiRes ) {
/* we need to put the buttons into the old position and set their /* we need to put the buttons into the old position and set their
sizes for the larger tray. */ sizes for the larger tray. */
XP_U16 buttonInfoTriplets[] = { XW_MAIN_HIDE_BUTTON_ID, XP_U16 buttonInfoTriplets[] = { XW_MAIN_HIDE_BUTTON_ID,
TRAY_BUTTONS_Y_LR, TRAY_BUTTONS_Y_LR,
TRAY_BUTTON_HEIGHT_LR,
XW_MAIN_JUGGLE_BUTTON_ID, XW_MAIN_JUGGLE_BUTTON_ID,
TRAY_BUTTONS_Y_LR, TRAY_BUTTONS_Y_LR,
TRAY_BUTTON_HEIGHT_LR,
XW_MAIN_TRADE_BUTTON_ID, XW_MAIN_TRADE_BUTTON_ID,
TRAY_BUTTONS_Y_LR TRAY_BUTTONS_Y_LR
+ TRAY_BUTTON_HEIGHT_LR, + TRAY_BUTTON_HEIGHT_LR,
TRAY_BUTTON_HEIGHT_LR,
XW_MAIN_DONE_BUTTON_ID, XW_MAIN_DONE_BUTTON_ID,
TRAY_BUTTONS_Y_LR TRAY_BUTTONS_Y_LR
+ TRAY_BUTTON_HEIGHT_LR, + TRAY_BUTTON_HEIGHT_LR
TRAY_BUTTON_HEIGHT_LR
}; };
XP_U16* ptr; XP_U16* ptr;
XP_U16 i; XP_U16 i;
for ( i = 0, ptr = buttonInfoTriplets; i < 4; ++i, ptr += 3 ) { for ( i = 0, ptr = buttonInfoTriplets; i < 4; ++i, ptr += 2 ) {
RectangleType rect; RectangleType rect;
getObjectBounds( ptr[0], &rect ); getObjectBounds( ptr[0], &rect );
rect.topLeft.y = ptr[1]; rect.topLeft.y = ptr[1];
rect.extent.y = ptr[2];; rect.extent.y = TRAY_BUTTON_HEIGHT_LR;
setObjectBounds( ptr[0], &rect ); setObjectBounds( ptr[0], &rect );
} }
} }
@ -446,16 +441,15 @@ positionBoard( PalmAppGlobals* globals )
boardHeight = scaleV * nCols; boardHeight = scaleV * nCols;
if ( globals->useHiRes ) { if ( globals->useHiRes ) {
trayTop = 160 - TRAY_HEIGHT_HR; trayTop = ((160 - TRAY_HEIGHT_HR) * doubler) - 1;
globals->needsScrollbar = false; globals->needsScrollbar = false;
} else { } else {
trayTop = 160 - TRAY_HEIGHT_LR; trayTop = 160 - TRAY_HEIGHT_LR;
globals->needsScrollbar = showGrid && (nCols == PALM_MAX_COLS); globals->needsScrollbar = showGrid && (nCols == PALM_MAX_COLS);
} }
trayTop *= doubler;
trayScaleV = globals->useHiRes? trayScaleV = globals->useHiRes?
(TRAY_HEIGHT_HR*doubler):TRAY_HEIGHT_LR; (TRAY_HEIGHT_HR*doubler) + 1:TRAY_HEIGHT_LR;
board_setTrayLoc( globals->game.board, board_setTrayLoc( globals->game.board,
(isLefty? PALM_TRAY_LEFT_LH:PALM_TRAY_LEFT_RH) * doubler, (isLefty? PALM_TRAY_LEFT_LH:PALM_TRAY_LEFT_RH) * doubler,
trayTop, trayTop,