mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
add pref to edit color used to draw bonus hints on cells
This commit is contained in:
parent
79acccc6bf
commit
5acc2205be
5 changed files with 14 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
|||
<string name="key_empty">key_clr_empty</string>
|
||||
<string name="key_background">key_clr_background</string>
|
||||
<string name="key_clr_crosshairs">key_clr_crosshairs</string>
|
||||
<string name="key_clr_bonushint">key_clr_bonushint</string>
|
||||
|
||||
<string name="key_relay_host">key_relay_host</string>
|
||||
<string name="key_redir_host">key_redir_host</string>
|
||||
|
|
|
@ -332,6 +332,7 @@
|
|||
<string name="empty">Empty cell/background</string>
|
||||
<string name="clr_crosshairs">Crosshairs color</string>
|
||||
<string name="background">Board background</string>
|
||||
<string name="key_bonushint">In-square bonus hint</string>
|
||||
|
||||
<string name="tab_relay">Internet/Relay</string>
|
||||
<string name="tab_sms">SMS (broken)</string>
|
||||
|
|
|
@ -177,6 +177,13 @@
|
|||
android:title="@string/clr_crosshairs"
|
||||
android:defaultValue="0x7070FF"
|
||||
/>
|
||||
|
||||
<org.eehouse.android.xw4.EditColorPreference
|
||||
android:key="@string/key_clr_bonushint"
|
||||
android:title="@string/key_bonushint"
|
||||
android:defaultValue="0x7F7F7F"
|
||||
/>
|
||||
|
||||
<org.eehouse.android.xw4.EditColorPreference
|
||||
android:key="@string/key_tile_back"
|
||||
android:title="@string/tile_back"
|
||||
|
|
|
@ -119,7 +119,6 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
|||
private static final int BLACK = 0xFF000000;
|
||||
private static final int WHITE = 0xFFFFFFFF;
|
||||
private static final int FRAME_GREY = 0xFF101010;
|
||||
private static final int GREY = 0xFF7F7F7F;
|
||||
private int[] m_bonusColors;
|
||||
private int[] m_playerColors;
|
||||
private int[] m_otherColors;
|
||||
|
@ -506,7 +505,8 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
|||
m_origin.setBounds( rect );
|
||||
m_origin.draw( m_canvas );
|
||||
} else if ( null != bonusStr ) {
|
||||
m_fillPaint.setColor( GREY );
|
||||
m_fillPaint.
|
||||
setColor( m_otherColors[CommonPrefs.COLOR_BONUSHINT] );
|
||||
Rect brect = new Rect( rect );
|
||||
brect.inset( 0, brect.height()/10 );
|
||||
drawCentered( bonusStr, brect, m_fontDims );
|
||||
|
|
|
@ -36,7 +36,8 @@ public class CommonPrefs {
|
|||
public static final int COLOR_NOTILE = 1;
|
||||
public static final int COLOR_FOCUS = 2;
|
||||
public static final int COLOR_BACKGRND = 3;
|
||||
public static final int COLOR_LAST = 4;
|
||||
public static final int COLOR_BONUSHINT = 4;
|
||||
public static final int COLOR_LAST = 5;
|
||||
|
||||
private static CommonPrefs s_cp = null;
|
||||
|
||||
|
@ -101,6 +102,7 @@ public class CommonPrefs {
|
|||
R.string.key_empty,
|
||||
R.string.key_clr_crosshairs,
|
||||
R.string.key_background,
|
||||
R.string.key_clr_bonushint,
|
||||
};
|
||||
for ( int ii = 0; ii < idsOther.length; ++ii ) {
|
||||
otherColors[ii] = prefToColor( context, sp, idsOther[ii] );
|
||||
|
|
Loading…
Reference in a new issue