mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
Put up dialog when user asks for hint and the feature's disabled.
This commit is contained in:
parent
b00a2ac384
commit
ac0a9f4ac5
2 changed files with 13 additions and 13 deletions
|
@ -1406,24 +1406,23 @@ board_requestHint( BoardCtxt* board,
|
||||||
#endif
|
#endif
|
||||||
XP_Bool* workRemainsP )
|
XP_Bool* workRemainsP )
|
||||||
{
|
{
|
||||||
MoveInfo newMove;
|
|
||||||
XP_Bool result = XP_FALSE;
|
XP_Bool result = XP_FALSE;
|
||||||
XP_S16 nTiles;
|
|
||||||
const Tile* tiles;
|
|
||||||
const XP_U16 selPlayer = board->selPlayer;
|
|
||||||
PerTurnInfo* pti;
|
|
||||||
EngineCtxt* engine;
|
|
||||||
XP_Bool searchComplete = XP_TRUE;
|
|
||||||
XP_Bool redraw = XP_FALSE;
|
XP_Bool redraw = XP_FALSE;
|
||||||
|
|
||||||
*workRemainsP = XP_FALSE; /* in case we exit without calling engine */
|
*workRemainsP = XP_FALSE; /* in case we exit without calling engine */
|
||||||
|
|
||||||
pti = board->pti + selPlayer;
|
if ( board->gi->hintsNotAllowed ) {
|
||||||
engine = server_getEngineFor( board->server, selPlayer );
|
util_userError( board->util, ERR_CANT_HINT_WHILE_DISABLED );
|
||||||
/* engine may be null, if e.g. hint menu's chosen for a remote player */
|
} else {
|
||||||
result = !!engine && !board->gi->hintsNotAllowed && preflight( board );
|
MoveInfo newMove;
|
||||||
|
XP_S16 nTiles;
|
||||||
|
const Tile* tiles;
|
||||||
|
XP_Bool searchComplete = XP_TRUE;
|
||||||
|
const XP_U16 selPlayer = board->selPlayer;
|
||||||
|
PerTurnInfo* pti = board->selInfo;
|
||||||
|
EngineCtxt* engine = server_getEngineFor( board->server, selPlayer );
|
||||||
|
|
||||||
if ( result ) {
|
result = !!engine && preflight( board );
|
||||||
const TrayTileSet* tileSet;
|
const TrayTileSet* tileSet;
|
||||||
ModelCtxt* model = board->model;
|
ModelCtxt* model = board->model;
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ typedef enum {
|
||||||
/* ERR_NOT_YOUR_TURN_TO_TRADE, */
|
/* ERR_NOT_YOUR_TURN_TO_TRADE, */
|
||||||
/* ERR_NOT_YOUR_TURN_TO_MOVE, */
|
/* ERR_NOT_YOUR_TURN_TO_MOVE, */
|
||||||
ERR_CANT_UNDO_TILEASSIGN,
|
ERR_CANT_UNDO_TILEASSIGN,
|
||||||
|
ERR_CANT_HINT_WHILE_DISABLED,
|
||||||
|
|
||||||
ERR_RELAY_BASE,
|
ERR_RELAY_BASE,
|
||||||
ERR_RELAY_END = ERR_RELAY_BASE + XWRELAY_ERROR_LASTERR
|
ERR_RELAY_END = ERR_RELAY_BASE + XWRELAY_ERROR_LASTERR
|
||||||
|
|
Loading…
Reference in a new issue