当前位置: 首页>>代码示例>>Java>>正文


Java Preferences.putBoolean方法代码示例

本文整理汇总了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();
}
 
开发者ID:kbz,项目名称:SSTrain,代码行数:17,代码来源:GlobalConfiguration.java

示例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();
}
 
开发者ID:kbz,项目名称:SIFTrain,代码行数:17,代码来源:GlobalConfiguration.java

示例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 ) );
	}
}
 
开发者ID:infinity8,项目名称:Roguelike,代码行数:24,代码来源:LwjglApplicationChanger.java

示例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();
	}
}
 
开发者ID:luarca84,项目名称:Caramelos,代码行数:10,代码来源:CaramelosGame.java

示例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;
}
 
开发者ID:orangepascal,项目名称:planetbusters,代码行数:40,代码来源:PlayerProfile.java

示例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);
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:9,代码来源:CampaignProgressManager.java

示例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);
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:15,代码来源:RepSlot.java

示例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();
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:13,代码来源:Replay.java

示例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();
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:12,代码来源:CustomLanguageLoader.java

示例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();
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:9,代码来源:SceneMoreCampaignOptions.java

示例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();
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:11,代码来源:SceneMoreSkirmishOptions.java

示例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();
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:11,代码来源:SaveSystem.java

示例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;
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:16,代码来源:Settings.java

示例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();
}
 
开发者ID:yiotro,项目名称:Antiyoy,代码行数:16,代码来源:Settings.java

示例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();
		
		
}
 
开发者ID:yassir-ouali,项目名称:Freaking-Math,代码行数:12,代码来源:MyGame.java


注:本文中的com.badlogic.gdx.Preferences.putBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。