當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。