mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
Fix drawing of divider -- is too narrow to shrink horizontally so do so vertically; implement warnf with a dialog.
This commit is contained in:
parent
0e31d4d33c
commit
bff4b573c9
3 changed files with 38 additions and 5 deletions
|
@ -655,7 +655,7 @@ DRAW_FUNC_NAME(drawTrayDivider)( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
|
||||
if ( isFocussed ) {
|
||||
FillRect( hdc, &rt, dctx->brushes[CE_FOCUS_COLOR] );
|
||||
InsetRect( &rt, 2, 0 );
|
||||
InsetRect( &rt, 0, (rt.bottom - rt.top) >> 2 );
|
||||
}
|
||||
|
||||
if ( selected ) {
|
||||
|
@ -950,8 +950,8 @@ DRAW_FUNC_NAME(score_pendingScore)( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
wchar_t widebuf[5];
|
||||
XP_UCHAR buf[5];
|
||||
RECT rt, clip;
|
||||
XP_U16 bkIndex = (flags & CELL_ISCURSOR) == 0?
|
||||
CE_BKG_COLOR : CE_FOCUS_COLOR;
|
||||
XP_Bool focussed = TREAT_AS_CURSOR(dctx,flags);
|
||||
XP_U16 bkIndex = focussed ? CE_FOCUS_COLOR : CE_BKG_COLOR;
|
||||
|
||||
HFONT font = ceGetSizedFont( dctx, rect->height/2, RFONTS_PTS );
|
||||
HFONT oldFont = SelectObject( hdc, font );
|
||||
|
|
|
@ -2441,7 +2441,7 @@ void
|
|||
wince_assert( XP_UCHAR* XP_UNUSED_LOG(s), int XP_UNUSED_LOG(line),
|
||||
char* XP_UNUSED_LOG(fileName) )
|
||||
{
|
||||
XP_WARNF( "ASSERTION FAILED %s: file %s, line %d\n", s, fileName, line );
|
||||
XP_DEBUGF( "ASSERTION FAILED %s: file %s, line %d\n", s, fileName, line );
|
||||
} /* wince_assert */
|
||||
|
||||
#ifdef ENABLE_LOGGING
|
||||
|
@ -2459,6 +2459,30 @@ makeTimeStamp( XP_UCHAR* timeStamp, XP_U16 XP_UNUSED_DBG(size) )
|
|||
XP_ASSERT( size > strlen(timeStamp) );
|
||||
} /* makeTimeStamp */
|
||||
|
||||
void
|
||||
wince_warnf(const XP_UCHAR* format, ...)
|
||||
{
|
||||
#if 1
|
||||
XP_UCHAR buf[256];
|
||||
va_list ap;
|
||||
XP_U16 slen;
|
||||
|
||||
va_start( ap, format );
|
||||
vsnprintf( buf, sizeof(buf), format, ap );
|
||||
va_end(ap);
|
||||
|
||||
slen = strlen(buf)+1;
|
||||
wchar_t widebuf[slen];
|
||||
|
||||
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, buf, slen,
|
||||
widebuf, slen );
|
||||
|
||||
MessageBox( NULL, widebuf, L"WARNF", MB_OK );
|
||||
#else
|
||||
MessageBox( NULL, L"warnf", L"WARNF", MB_OK );
|
||||
#endif
|
||||
} /* wince_warnf */
|
||||
|
||||
void
|
||||
wince_debugf(const XP_UCHAR* format, ...)
|
||||
{
|
||||
|
@ -2637,6 +2661,11 @@ ce_util_userError( XW_UtilCtxt* uc, UtilErrID id )
|
|||
message = "Tile assignment can't be undone.";
|
||||
break;
|
||||
|
||||
case ERR_CANT_HINT_WHILE_DISABLED:
|
||||
message = "The hint feature is disabled for this game. Enable "
|
||||
"it for a new game using the Preferences diaog.";
|
||||
break;
|
||||
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
case ERR_NO_PEEK_REMOTE_TILES:
|
||||
message = "No peeking at remote players' tiles!";
|
||||
|
@ -3089,6 +3118,7 @@ ce_util_getTraySearchLimits( XW_UtilCtxt* uc, XP_U16* min, XP_U16* max )
|
|||
#endif
|
||||
|
||||
#ifdef SHOW_PROGRESS
|
||||
blah blah -- these are not in use
|
||||
static void
|
||||
ce_util_engineStarting( XW_UtilCtxt* uc )
|
||||
{
|
||||
|
|
|
@ -92,14 +92,15 @@ typedef XP_U32 XP_Time;
|
|||
|
||||
//#define XP_STATUSF if(0)p_ignore
|
||||
#define XP_STATUSF XP_DEBUGF
|
||||
#define XP_WARNF XP_DEBUGF
|
||||
|
||||
#ifdef ENABLE_LOGGING
|
||||
#define XP_DEBUGF(...) wince_debugf(__VA_ARGS__)
|
||||
#define XP_LOGF(...) wince_debugf(__VA_ARGS__)
|
||||
#define XP_WARNF(...) wince_warnf(__VA_ARGS__)
|
||||
#else
|
||||
#define XP_DEBUGF(...)
|
||||
#define XP_LOGF(...)
|
||||
#define XP_WARNF(...)
|
||||
#endif
|
||||
|
||||
#ifdef CPLUS
|
||||
|
@ -109,6 +110,8 @@ extern "C" {
|
|||
void wince_assert(XP_UCHAR* s, int line, char* fileName );
|
||||
void wince_debugf(const XP_UCHAR*, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
void wince_warnf(const XP_UCHAR*, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
void p_ignore(XP_UCHAR*, ...);
|
||||
XP_U16 wince_snprintf( XP_UCHAR* buf, XP_U16 len,
|
||||
const XP_UCHAR* format, ... );
|
||||
|
|
Loading…
Reference in a new issue