v0.8.0: added an update notification service

This commit is contained in:
Evan Debenham
2019-11-22 15:05:47 -05:00
parent 2e533b74db
commit 2138ad24ec
24 changed files with 606 additions and 13 deletions
@@ -29,6 +29,8 @@ import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Preferences;
import com.badlogic.gdx.utils.SharedLibraryLoader;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.services.updates.UpdateImpl;
import com.shatteredpixel.shatteredpixeldungeon.services.updates.Updates;
import com.watabou.noosa.Game;
import com.watabou.utils.FileUtils;
import com.watabou.utils.Point;
@@ -79,6 +81,10 @@ public class DesktopLauncher {
} catch (NumberFormatException e) {
Game.versionCode = Integer.parseInt(System.getProperty("Implementation-Version"));
}
if (UpdateImpl.supportsUpdates()){
Updates.service = UpdateImpl.getUpdateService();
}
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
@@ -58,6 +58,11 @@ public class DesktopPlatformSupport extends PlatformSupport {
} );
}
@Override
public boolean connectedToUnmeteredNetwork() {
return true; //no easy way to check this in desktop, just assume user doesn't care
}
@Override
public void promptTextInput(String title, String hintText, int maxLen, boolean multiLine, String posTxt, String negTxt, TextCallback callback) {