本文整理汇总了Java中com.badlogic.gdx.Preferences.putBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java Preferences.putBoolean方法的具体用法?Java Preferences.putBoolean怎么用?Java Preferences.putBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.Preferences
的用法示例。
在下文中一共展示了Preferences.putBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: storeConfiguration
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public static void storeConfiguration() {
Preferences prefs = Gdx.app.getPreferences("ss_train_config");
prefs.putInteger("offset", offset);
prefs.putInteger("input_offset", inputOffset);
prefs.putInteger("song_vol", songVolume);
prefs.putInteger("feedback_vol", feedbackVolume);
prefs.putString("path_to_beatmaps", pathToBeatmaps);
prefs.putBoolean("play_hint_sounds", playHintSounds);
prefs.putInteger("note_speed", noteSpeed);
prefs.putInteger("overall_difficulty", overallDifficulty);
prefs.putBoolean("display_line", displayLine);
prefs.putInteger("sorting_mode", sortMode);
prefs.putInteger("sorting_order", sortOrder);
prefs.putInteger("sync_mode", syncMode);
prefs.flush();
}
示例2: storeConfiguration
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public static void storeConfiguration() {
Preferences prefs = Gdx.app.getPreferences("sif_train_config");
prefs.putInteger("offset", offset);
prefs.putInteger("input_offset", inputOffset);
prefs.putInteger("song_vol", songVolume);
prefs.putInteger("feedback_vol", feedbackVolume);
prefs.putString("path_to_beatmaps", pathToBeatmaps);
prefs.putBoolean("play_hint_sounds", playHintSounds);
prefs.putInteger("note_speed", noteSpeed);
prefs.putInteger("overall_difficulty", overallDifficulty);
prefs.putInteger("sorting_mode", sortMode);
prefs.putInteger("random_mode", randomMode);
prefs.putInteger("sorting_order", sortOrder);
prefs.putInteger("sync_mode", syncMode);
prefs.flush();
}
示例3: setDefaultPrefs
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public void setDefaultPrefs( Preferences prefs )
{
prefs.putBoolean( "pathfindMovement", false );
prefs.putFloat( "musicVolume", 1 );
prefs.putFloat( "ambientVolume", 1 );
prefs.putFloat( "effectVolume", 1 );
prefs.putInteger( "resolutionX", 800 );
prefs.putInteger( "resolutionY", 600 );
prefs.putBoolean( "fullscreen", false );
prefs.putBoolean( "borderless", false );
prefs.putBoolean( "vSync", true );
prefs.putInteger( "fps", 0 );
prefs.putFloat( "animspeed", 1 );
prefs.putInteger( "msaa", 16 );
Global.Controls.defaultArrow();
for ( Controls.Keys key : Controls.Keys.values() )
{
prefs.putInteger( key.toString(), Global.Controls.getKeyCode( key ) );
}
}
示例4: InitPreferences
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public void InitPreferences()
{
Preferences prefs = Gdx.app.getPreferences("MyPreferences");
if(!prefs.contains("sound"))
{
prefs.putBoolean("sound",true);
prefs.flush();
}
}
示例5: saveSettings
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
/**
* Save the settings for this profile
*/
public final void saveSettings() {
int myCRC=0;
Preferences prefsEditor = Gdx.app.getPreferences(fileName);
// save settings and preferences
prefsEditor.putBoolean("usemusic", useMusic);
prefsEditor.putBoolean("usesfx", useSFX);
prefsEditor.putBoolean("useFullscreen",useFullscreen);
prefsEditor.putInteger("storedWindowedModeID",storedWindowedModeID);
prefsEditor.putInteger("musicvolume",musicVolume);
prefsEditor.putInteger("soundvolume",soundVolume);
for (int i=6; --i>=0;) {
prefsEditor.putInteger("stickx"+i,stickX[i]);
prefsEditor.putInteger("sticky"+i,stickY[i]);
}
for (int i=16; --i>=0;) {
prefsEditor.putInteger("keyboardSettings"+i,keyboardSettings[i]);
}
for (int i=12; --i>=0;) {
prefsEditor.putInteger("controller1"+i,controller1[i]);
prefsEditor.putInteger("controller2"+i,controller2[i]);
}
prefsEditor.putInteger("LastMinuteEvent", myCRC);
prefsEditor.flush();
prefsEditor=null;
}
示例6: checkToImportOldProgress
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
private void checkToImportOldProgress(Preferences preferences) {
boolean imported_old_progress;
imported_old_progress = preferences.getBoolean("imported_old_progress", false);
if (imported_old_progress) return;
importOldProgress();
preferences.putBoolean("imported_old_progress", true);
}
示例7: save
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public void save() {
Preferences preferences = Gdx.app.getPreferences(key);
preferences.putBoolean("campaign", campaignMode);
preferences.putInteger("players", numberOfHumans);
preferences.putString("date", date);
preferences.putInteger("level_index", levelIndex);
replay.setTempSlayRules(GameRules.slayRules);
replay.setTempColorOffset(gameController.colorIndexViewOffset);
preferences.flush();
replay.saveToPreferences(key);
}
示例8: saveToPreferences
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public void saveToPreferences(String prefsKey) {
Preferences preferences = Gdx.app.getPreferences(prefsKey);
preferences.putString("initial", initialLevelString);
preferences.putBoolean("slay_rules", tempSlayRules);
preferences.putInteger("color_offset", tempColorOffset);
preferences.putInteger("real_human_number", realNumberOfHumans);
preferences.putString("actions", convertActionsToString());
preferences.flush();
}
示例9: setAndSaveLanguage
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public static void setAndSaveLanguage(String langName) {
Preferences preferences = Gdx.app.getPreferences(prefs);
preferences.putBoolean("auto", false);
preferences.putString("lang_name", langName);
preferences.flush();
Fonts.initFonts(); // calls loadLanguage()
CityNameGenerator.getInstance().load();
}
示例10: saveValues
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public void saveValues() {
Preferences prefs = Gdx.app.getPreferences("campaign_options");
prefs.putInteger("color_offset", colorOffsetSlider.getCurrentRunnerIndex());
prefs.putBoolean("slay_rules", chkSlayRules.isChecked());
prefs.flush();
}
示例11: saveValues
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public void saveValues() {
Preferences prefs = Gdx.app.getPreferences("skirmish");
prefs.putInteger("color_offset", colorOffsetSlider.getCurrentRunnerIndex());
prefs.putBoolean("slay_rules", chkSlayRules.isChecked());
prefs.putBoolean("fog_of_war", chkFogOfWar.isChecked());
prefs.putBoolean("diplomacy", chkDiplomacy.isChecked());
prefs.flush();
}
示例12: checkToImportOldSaves
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
private void checkToImportOldSaves() {
Preferences preferences = getPreferences(SAVE_SLOT_PREFS);
boolean importedOldSaves = preferences.getBoolean("imported_old_saves", false);
if (importedOldSaves) return;
preferences.putBoolean("imported_old_saves", true);
preferences.flush();
performImportOldSaves();
}
示例13: saveSettings
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public boolean saveSettings() {
Preferences prefs = Gdx.app.getPreferences("settings");
prefs.putInteger("sound", boolToInteger(menuControllerYio.getCheckButtonById(5).isChecked()));
prefs.putInteger("autosave", boolToInteger(menuControllerYio.getCheckButtonById(1).isChecked()));
prefs.putInteger("ask_to_end_turn", boolToInteger(menuControllerYio.getCheckButtonById(3).isChecked()));
prefs.putInteger("city_names", boolToInteger(menuControllerYio.getCheckButtonById(4).isChecked()));
prefs.putBoolean("music", menuControllerYio.getCheckButtonById(2).isChecked());
prefs.flush();
MusicManager.getInstance().onMusicStatusChanged();
return false;
}
示例14: saveMoreSettings
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
public void saveMoreSettings() {
Preferences prefs = Gdx.app.getPreferences("settings");
saveSkin(prefs);
prefs.putInteger("sensitivity", Scenes.sceneMoreSettingsMenu.sensitivitySlider.getCurrentRunnerIndex());
saveWaterTexture(prefs);
prefs.putBoolean("long_tap_to_move", menuControllerYio.getCheckButtonById(7).isChecked());
prefs.putBoolean("replays_enabled", menuControllerYio.getCheckButtonById(8).isChecked());
prefs.putBoolean("fast_construction", menuControllerYio.getCheckButtonById(9).isChecked());
prefs.putBoolean("left_hand_mode", menuControllerYio.getCheckButtonById(12).isChecked());
MusicManager.getInstance().onMusicStatusChanged();
prefs.flush();
}
示例15: saveSoundStatut
import com.badlogic.gdx.Preferences; //导入方法依赖的package包/类
void saveSoundStatut()
{
Preferences prefs = Gdx.app.getPreferences("My Preferences");
//put some Integer
prefs.putBoolean("sound",sound);
//persist preferences
prefs.flush();
}