add hints-allowed to set of defaults for new games

This commit is contained in:
Andy2 2011-01-13 18:12:55 -08:00 committed by Andy2
parent 9ebbbb0fec
commit 13ef8dd098
5 changed files with 15 additions and 1 deletions

View file

@ -30,6 +30,7 @@
<string name="key_proxy_port">key_proxy_port</string>
<string name="key_sms_port">key_sms_port</string>
<string name="key_dict_host">key_dict_host2</string>
<string name="key_init_hintsallowed">key_init_hintsallowed</string>
<string name="key_board_size">key_board_size</string>
<string name="key_initial_player_minutes">key_initial_player_minutes</string>
<string name="key_default_dict">key_default_dict</string>

View file

@ -196,6 +196,7 @@
open them without it.</string>
<string name="hints_allowed">Allow hints</string>
<string name="hints_allowed_sum">Enable the hint feature</string>
<string name="progress_title">Searching for moves</string>
<string name="use_timer">Enable game timer</string>
<string name="color_tiles">Color tiles</string>

View file

@ -13,6 +13,12 @@
android:defaultValue="CollegeEng_2to8"
/>
<CheckBoxPreference android:key="@string/key_init_hintsallowed"
android:title="@string/hints_allowed"
android:summary="@string/hints_allowed_sum"
android:defaultValue="true"
/>
<ListPreference android:key="@string/key_default_phonies"
android:title="@string/default_phonies"
android:entries="@array/phony_names"

View file

@ -237,6 +237,12 @@ public class CommonPrefs {
false );
}
public static boolean getDefaultHintsAllowed( Context context )
{
return getPrefsBoolean( context, R.string.key_init_hintsallowed,
true );
}
public static boolean getHideTitleBar( Context context )
{
return getPrefsBoolean( context, R.string.key_hide_title, true );

View file

@ -74,7 +74,7 @@ public class CurGameInfo {
: DeviceRole.SERVER_STANDALONE;
dictName = CommonPrefs.getDefaultDict( context );
dictLang = DictLangCache.getLangCode( context, dictName );
hintsNotAllowed = false;
hintsNotAllowed = !CommonPrefs.getDefaultHintsAllowed( context );
phoniesAction = CommonPrefs.getDefaultPhonies( context );
timerEnabled = CommonPrefs.getDefaultTimerEnabled( context );
allowPickTiles = false;