mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-25 09:58:11 +01:00
Draw 'X' icon in empty middle square; start first player as non-robot
to show it.
This commit is contained in:
parent
052c99c9db
commit
da91820525
2 changed files with 13 additions and 7 deletions
|
@ -27,6 +27,7 @@ public class BoardView extends View implements DrawCtx,
|
|||
private Rect m_letterRect;
|
||||
Drawable m_rightArrow;
|
||||
Drawable m_downArrow;
|
||||
Drawable m_origin;
|
||||
|
||||
private static final int BLACK = 0xFF000000;
|
||||
private static final int WHITE = 0xFFFFFFFF;
|
||||
|
@ -151,8 +152,9 @@ public class BoardView extends View implements DrawCtx,
|
|||
m_gi = gi;
|
||||
|
||||
Resources res = context.getResources();
|
||||
m_downArrow = res.getDrawable( R.drawable.downarrow );
|
||||
m_rightArrow = res.getDrawable( R.drawable.rightarrow );
|
||||
m_downArrow = res.getDrawable( R.drawable.downarrow );
|
||||
m_origin = res.getDrawable( R.drawable.origin );
|
||||
}
|
||||
|
||||
// DrawCtxt interface implementation
|
||||
|
@ -205,7 +207,12 @@ public class BoardView extends View implements DrawCtx,
|
|||
m_fillPaint.setColor( backColor );
|
||||
m_canvas.drawRect( rect, m_fillPaint );
|
||||
|
||||
if ( !empty ) {
|
||||
if ( empty ) {
|
||||
if ( (CELL_ISSTAR & flags) != 0 ) {
|
||||
m_origin.setBounds( rect );
|
||||
m_origin.draw( m_canvas );
|
||||
}
|
||||
} else {
|
||||
m_fillPaint.setTextSize( rect.bottom - rect.top );
|
||||
if ( owner < 0 ) { // showColors option not turned on
|
||||
owner = 0;
|
||||
|
@ -218,11 +225,10 @@ public class BoardView extends View implements DrawCtx,
|
|||
return true;
|
||||
}
|
||||
|
||||
public void drawBoardArrow ( Rect rect, int bonus, boolean vert, int hintAtts,
|
||||
int flags )
|
||||
public void drawBoardArrow ( Rect rect, int bonus, boolean vert,
|
||||
int hintAtts, int flags )
|
||||
{
|
||||
rect.inset( 2, 2 );
|
||||
Utils.logf( "drawBoardArrow" );
|
||||
Drawable arrow = vert? m_downArrow : m_rightArrow;
|
||||
arrow.setBounds( rect );
|
||||
arrow.draw( m_canvas );
|
||||
|
|
|
@ -32,8 +32,8 @@ public class CurGameInfo {
|
|||
serverRole = DeviceRole.SERVER_STANDALONE;
|
||||
dictName = BUILTIN_DICT;
|
||||
hintsNotAllowed = false;
|
||||
players[0] = new LocalPlayer( "Eric", true );
|
||||
players[1] = new LocalPlayer( "Kati" );
|
||||
players[0] = new LocalPlayer( "Eric");
|
||||
players[1] = new LocalPlayer( "Kati", true );
|
||||
players[2] = new LocalPlayer( "Brynn", true );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue