mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
Fix trade window draw and timer draw by setting clip rect. Change
softkey to turnDone when trading. Tweak trade-related user messages.
This commit is contained in:
parent
1a2ce36bb0
commit
f5b5da9dc5
2 changed files with 13 additions and 4 deletions
|
@ -680,6 +680,8 @@ DRAW_FUNC_NAME(scoreBegin)( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
|
||||
dctx->scoreIsVertical = rect->height > rect->width;
|
||||
|
||||
/* I don't think the clip rect's set at this point but drawing seems fine
|
||||
anyway.... ceClearToBkground() is definitely needed here. */
|
||||
ceClearToBkground( (CEDrawCtx*)p_dctx, rect );
|
||||
} /* ce_draw_scoreBegin */
|
||||
|
||||
|
@ -920,11 +922,13 @@ DRAW_FUNC_NAME(drawTimer)( DrawCtx* p_dctx, const XP_Rect* rInner,
|
|||
dctx->scoreIsVertical? "%s%.1dm" XP_CR "%.2ds" : "%s%.1d:%.2d",
|
||||
isNegative? "-": "", mins, secs );
|
||||
|
||||
if ( !globals->hdc ) {
|
||||
if ( !hdc ) {
|
||||
InvalidateRect( dctx->mainWin, &rt, FALSE );
|
||||
hdc = BeginPaint( dctx->mainWin, &ps );
|
||||
}
|
||||
|
||||
ceClipToRect( hdc, &rt );
|
||||
|
||||
SetTextColor( hdc, dctx->globals->appPrefs.colors[getPlayerColor(player)] );
|
||||
ceClearToBkground( dctx, rInner );
|
||||
drawLines( dctx, hdc, buf, CE_TIMER_PADDING, &rt,
|
||||
|
@ -955,7 +959,7 @@ DRAW_FUNC_NAME(getMiniWText)( DrawCtx* XP_UNUSED(p_dctx),
|
|||
str = "Triple word";
|
||||
break;
|
||||
case INTRADE_MW_TEXT:
|
||||
str = "Trading tiles;" XP_CR "select 'Turn done' when ready";
|
||||
str = "Trading tiles." XP_CR "Select 'Turn done' when ready";
|
||||
break;
|
||||
default:
|
||||
XP_ASSERT( XP_FALSE );
|
||||
|
@ -994,6 +998,7 @@ DRAW_FUNC_NAME(drawMiniWindow)( DrawCtx* p_dctx, const XP_UCHAR* text,
|
|||
InvalidateRect( dctx->mainWin, &rt, FALSE );
|
||||
hdc = BeginPaint( dctx->mainWin, &ps );
|
||||
}
|
||||
ceClipToRect( hdc, &rt );
|
||||
|
||||
ceClearToBkground( dctx, rect );
|
||||
|
||||
|
|
|
@ -1340,7 +1340,11 @@ ceHandleHintRequest( CEAppGlobals* globals )
|
|||
static XP_Bool
|
||||
handleTradeCmd( CEAppGlobals* globals )
|
||||
{
|
||||
return board_beginTrade( globals->game.board );
|
||||
XP_Bool success = board_beginTrade( globals->game.board );
|
||||
if ( success ) {
|
||||
ceSetLeftSoftkey( globals, ID_MOVE_TURNDONE );
|
||||
}
|
||||
return success;
|
||||
} /* handleTradeCmd */
|
||||
|
||||
static XP_Bool
|
||||
|
@ -2718,7 +2722,7 @@ ce_util_userQuery( XW_UtilCtxt* uc, UtilQueryID id, XWStreamCtxt* stream )
|
|||
return ceQueryFromStream( globals, stream );
|
||||
|
||||
case QUERY_COMMIT_TRADE:
|
||||
query = "Are you sure you want to spend this move trading tiles?";
|
||||
query = "Are you sure you want to trade the selected tiles?";
|
||||
return queryBoxChar( globals, query );
|
||||
|
||||
case QUERY_ROBOT_MOVE:
|
||||
|
|
Loading…
Reference in a new issue