mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
fix drawing of empty tray space.
This commit is contained in:
parent
382848f556
commit
84321fa158
1 changed files with 16 additions and 11 deletions
|
@ -294,8 +294,10 @@ curses_stringInTile( CursesDrawCtx* dctx, const XP_Rect* rect,
|
||||||
{
|
{
|
||||||
eraseRect( dctx, rect );
|
eraseRect( dctx, rect );
|
||||||
|
|
||||||
mvwaddnstr( dctx->boardWin, rect->top+1, rect->left+(rect->width/2),
|
if ( !!letter ) {
|
||||||
letter, strlen(letter) );
|
mvwaddnstr( dctx->boardWin, rect->top+1, rect->left+(rect->width/2),
|
||||||
|
letter, strlen(letter) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( !!val ) {
|
if ( !!val ) {
|
||||||
int len = strlen( val );
|
int len = strlen( val );
|
||||||
|
@ -312,19 +314,22 @@ curses_draw_drawTile( DrawCtx* p_dctx, const XP_Rect* rect,
|
||||||
char numbuf[5];
|
char numbuf[5];
|
||||||
char letterbuf[5];
|
char letterbuf[5];
|
||||||
char* nump = NULL;
|
char* nump = NULL;
|
||||||
|
char* letterp = NULL;
|
||||||
CursesDrawCtx* dctx = (CursesDrawCtx*)p_dctx;
|
CursesDrawCtx* dctx = (CursesDrawCtx*)p_dctx;
|
||||||
|
|
||||||
letterbuf[0] = !!textP? *textP: '_'; /* BLANK or bitmap */
|
if ( (flags&CELL_ISEMPTY) == 0 ) {
|
||||||
letterbuf[1] = '\0';
|
letterbuf[0] = !!textP? *textP: '_'; /* BLANK or bitmap */
|
||||||
if ( val >= 0 ) {
|
letterbuf[1] = '\0';
|
||||||
sprintf( numbuf, "%.2d", val );
|
if ( val >= 0 ) {
|
||||||
if ( numbuf[0] == '0' ) {
|
sprintf( numbuf, "%.2d", val );
|
||||||
numbuf[0] = ' ';
|
if ( numbuf[0] == '0' ) {
|
||||||
|
numbuf[0] = ' ';
|
||||||
|
}
|
||||||
|
nump = numbuf;
|
||||||
}
|
}
|
||||||
nump = numbuf;
|
letterp = letterbuf;
|
||||||
}
|
}
|
||||||
|
curses_stringInTile( dctx, rect, letterp, nump );
|
||||||
curses_stringInTile( dctx, rect, letterbuf, nump );
|
|
||||||
|
|
||||||
if ( (flags&CELL_HIGHLIGHT) != 0 ) {
|
if ( (flags&CELL_HIGHLIGHT) != 0 ) {
|
||||||
mvwaddnstr( dctx->boardWin, rect->top+rect->height-1,
|
mvwaddnstr( dctx->boardWin, rect->top+rect->height-1,
|
||||||
|
|
Loading…
Reference in a new issue