Commit 9bdace21 authored by fallenstardust's avatar fallenstardust

设置开关决斗助手

parent f6580ca9
......@@ -272,6 +272,17 @@ public class AppsSettings {
mSharedPreferences.putBoolean(Constants.PREF_SOUND_EFFECT, soundEffect);
}
/***
* 决斗助手
*/
public boolean isServiceDuelAssistant() {
return mSharedPreferences.getBoolean(Constants.PREF_START_SERVICEDUELASSISTANT, Constants.PREF_DEF_START_SERVICEDUELASSISTANT);
}
public void setServiceDuelAssistant(boolean serviceDuelAssiatant) {
mSharedPreferences.putBoolean(Constants.PREF_START_SERVICEDUELASSISTANT, serviceDuelAssiatant);
}
/***
* 摇摆数字
*/
......
......@@ -27,6 +27,8 @@ public interface Constants {
boolean PREF_DEF_PENDULUM_SCALE = true;
String PREF_SOUND_EFFECT = "pref_key_game_sound_effect";
boolean PREF_DEF_SOUND_EFFECT = true;
String PREF_START_SERVICEDUELASSISTANT = "pref_key_start_serviceduelassistant";
boolean PREF_DEF_START_SERVICEDUELASSISTANT = true;
String PREF_LOCK_SCREEN = "pref_key_game_screen_orientation";
boolean PREF_DEF_LOCK_SCREEN = false;
String PREF_IMMERSIVE_MODE = "pref_key_immersive_mode";
......
......@@ -37,6 +37,7 @@ import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.home.HomeActivity;
import cn.garymb.ygomobile.ui.home.MainActivity;
import cn.garymb.ygomobile.ui.plus.DialogPlus;
import cn.garymb.ygomobile.ui.plus.ServiceDuelAssistant;
import cn.garymb.ygomobile.ui.plus.VUiKit;
import cn.garymb.ygomobile.ui.preference.PreferenceFragmentPlus;
import cn.garymb.ygomobile.utils.IOUtils;
......@@ -66,6 +67,7 @@ import static cn.garymb.ygomobile.Constants.PREF_PENDULUM_SCALE;
import static cn.garymb.ygomobile.Constants.PREF_READ_EX;
import static cn.garymb.ygomobile.Constants.PREF_SENSOR_REFRESH;
import static cn.garymb.ygomobile.Constants.PREF_SOUND_EFFECT;
import static cn.garymb.ygomobile.Constants.PREF_START_SERVICEDUELASSISTANT;
import static cn.garymb.ygomobile.Constants.PREF_USE_EXTRA_CARD_CARDS;
import static cn.garymb.ygomobile.Constants.SETTINGS_AVATAR;
import static cn.garymb.ygomobile.Constants.SETTINGS_CARD_BG;
......@@ -97,6 +99,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
};
private AppsSettings mSettings;
private boolean isInit = true;
public SettingFragment() {
}
......@@ -119,6 +122,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
+ "(" + SystemUtils.getVersion(getActivity()) + ")");
bind(PREF_CHECK_UPDATE, getString(R.string.settings_about_author_pref) + " : " + getString(R.string.settings_author));
bind(PREF_SOUND_EFFECT, mSettings.isSoundEffect());
bind(PREF_START_SERVICEDUELASSISTANT, mSettings.isServiceDuelAssistant());
bind(PREF_LOCK_SCREEN, mSettings.isLockSreenOrientation());
bind(PREF_FONT_ANTIALIAS, mSettings.isFontAntiAlias());
bind(PREF_IMMERSIVE_MODE, mSettings.isImmerSiveMode());
......
......@@ -245,4 +245,5 @@
<string name="crashed">YGOMobile 추락 한!</string>
<string name="invalid_shortcut">잘못된 바로 가기</string>
<string name="return_to_duel">게임으로 돌아가다☞</string>
<string name="Start_ServiceDuelAssistant">결투 보조원</string>
</resources>
......@@ -244,4 +244,5 @@
<string name="crashed">软件错误退出</string>
<string name="invalid_shortcut">无效的快捷方式</string>
<string name="return_to_duel">返回决斗☞</string>
<string name="Start_ServiceDuelAssistant">开启决斗助手</string>
</resources>
......@@ -244,4 +244,5 @@
<string name="crashed">YGOMobile Crashed!</string>
<string name="invalid_shortcut">Invalid Shortcut</string>
<string name="return_to_duel">Return to Duel☞</string>
<string name="Start_ServiceDuelAssistant">DuelAssistant</string>
</resources>
......@@ -34,6 +34,10 @@
android:key="pref_settings_read_ex"
android:persistent="true"
android:title="@string/title_use_ex"/>
<CheckBoxPreference
android:key="pref_key_start_serviceduelassistant"
android:persistent="true"
android:title="@string/Start_ServiceDuelAssistant"/>
<CheckBoxPreference
android:key="pref_key_game_sound_effect"
android:persistent="true"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment