add preference for allowPeek

This commit is contained in:
Andy2 2010-07-17 07:06:33 -07:00
parent 639feb8965
commit fb8692fb9f
5 changed files with 12 additions and 1 deletions

View file

@ -160,6 +160,7 @@ loadCommonPrefs( JNIEnv* env, CommonPrefs* cp, jobject j_cp )
cp->skipCommitConfirm = getBool( env, j_cp, "skipCommitConfirm" );
cp->showColors = getBool( env, j_cp, "showColors" );
cp->sortNewTiles = getBool( env, j_cp, "sortNewTiles" );
cp->allowPeek = getBool( env, j_cp, "allowPeek" );
}
static XWStreamCtxt*

View file

@ -9,6 +9,7 @@
<string name="key_explain_robot">key_explain_robot</string>
<string name="key_skip_confirm">key_skip_confirm</string>
<string name="key_sort_tiles">key_sort_tiles</string>
<string name="key_peek_other">key_peek_other</string>
<string name="key_hide_values">key_hide_values</string>
<string name="key_ringer_zoom">key_ringer_zoom</string>
<string name="key_click_launches">key_click_launches</string>

View file

@ -205,7 +205,9 @@
<string name="hide_title">Hide titlebar</string>
<string name="hide_title_summary">Hiding the game name lets the
board be slightly larger</string>
<string name="peek_other">View tiles out-of-turn</string>
<string name="peek_other_summary">Tapping on scoreboard name shows
that player\'s tiles</string>
<string name="show_bonussum">Show bonus values</string>
<string name="show_bonussum_summary">Include text like "2W" on
empty bonus squares</string>

View file

@ -152,6 +152,11 @@
android:summary="@string/click_launches_summary"
android:defaultValue="false"
/>
<CheckBoxPreference android:key="@string/key_peek_other"
android:title="@string/peek_other"
android:summary="@string/peek_other_summary"
android:defaultValue="false"
/>
</PreferenceScreen>
<PreferenceScreen android:title="@string/advanced"

View file

@ -45,6 +45,7 @@ public class CommonPrefs {
public boolean skipCommitConfirm;
public boolean showColors;
public boolean sortNewTiles;
public boolean allowPeek;
public int[] playerColors;
public int[] bonusColors;
@ -78,6 +79,7 @@ public class CommonPrefs {
R.string.key_skip_confirm, false );
showColors = getBoolean( context, sp, R.string.key_color_tiles, true );
sortNewTiles = getBoolean( context, sp, R.string.key_sort_tiles, true );
allowPeek = getBoolean( context, sp, R.string.key_peek_other, false );
int ids[] = { R.string.key_player0,
R.string.key_player1,