Add warning on the startscreen about savegames in alpha- and beta version.

This commit is contained in:
Oskar Wiksten
2013-07-01 20:09:00 +02:00
parent c4908630c3
commit fd2014a697
4 changed files with 11 additions and 5 deletions

View File

@@ -44,7 +44,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="This is a development version of Andor's Trail. Savegames produced by this version are incompatible with the release version."
android:textColor="#880000"
android:gravity="center_horizontal"
android:visibility="gone"

View File

@@ -649,5 +649,7 @@ Every skill level increases the attack chance of weapons with %1$d %% of their o
<item>5</item>
<item>6</item>
</string-array>
<string name="startscreen_incompatible_savegames">This is a development version of Andor\'s Trail. Savegames produced by this version are incompatible with the release version.</string>
<string name="startscreen_non_release_version">This is a prerelease version of Andor\'s Trail. Savegames produced by this version might not be compatible with the release version.</string>
</resources>

View File

@@ -20,7 +20,8 @@ public final class AndorsTrailApplication extends Application {
public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || DEVELOPMENT_DEBUGBUTTONS;
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 37;
public static final String CURRENT_VERSION_DISPLAY = "0.7.0a1";
public static final boolean IS_RELEASE_VERSION = !CURRENT_VERSION_DISPLAY.matches(".*[a-d].*");
private final AndorsTrailPreferences preferences = new AndorsTrailPreferences();
private final WorldContext world = new WorldContext();
private final ControllerContext controllers = new ControllerContext(this, world);

View File

@@ -94,11 +94,15 @@ public final class StartScreenActivity extends Activity {
Dialogs.showLoad(StartScreenActivity.this);
}
});
TextView development_version = (TextView) findViewById(R.id.startscreen_dev_version);
if (AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAMES) {
TextView development_version = (TextView) findViewById(R.id.startscreen_dev_version);
development_version.setText(R.string.startscreen_incompatible_savegames);
development_version.setVisibility(View.VISIBLE);
}
} else if (!AndorsTrailApplication.IS_RELEASE_VERSION) {
development_version.setText(R.string.startscreen_non_release_version);
development_version.setVisibility(View.VISIBLE);
}
final Resources res = getResources();
TileManager tileManager = app.getWorld().tileManager;