v0.7.4b: fixed additional rare system UI issues

This commit is contained in:
Evan Debenham
2019-08-05 14:44:31 -04:00
parent c93bc9784b
commit a3e04de98c
5 changed files with 34 additions and 12 deletions

View File

@@ -21,21 +21,29 @@
package com.watabou.utils;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;
public class GameSettings {
//TODO might want to rename this file. this is the auto-generated name for android atm
public static final String PREFS_FILE = "ShatteredPixelDungeon";
private static Preferences prefs;
private static Preferences get() {
if (prefs == null) {
//TODO might want to rename this file. this is the auto-generated name for android atm
prefs = Gdx.app.getPreferences("ShatteredPixelDungeon");
prefs = Gdx.app.getPreferences(PREFS_FILE);
}
return prefs;
}
//allows setting up of preferences without Gdx.app being initialized
public static void setPrefsFromInstance (Application instance){
prefs = instance.getPreferences(PREFS_FILE);
}
public static boolean contains( String key ){
return get().contains( key );
}