Skip to content

Commit

Permalink
Merge pull request #92 from CleverRaven/master
Browse files Browse the repository at this point in the history
More centralized string reverts (CleverRaven#38421)
  • Loading branch information
fengjixuchui authored Feb 28, 2020
2 parents e954c9c + d9dbfbe commit 8a77f76
Show file tree
Hide file tree
Showing 131 changed files with 753 additions and 711 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,13 @@ ELSE()
-Wold-style-cast \
-Woverloaded-virtual \
-Wpedantic \
-Wredundant-decls \
-Wsuggest-override \
-Wunused-macros \
-Wzero-as-null-pointer-constant \
-Wno-unknown-warning-option")
IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES Windows)
SET(CATA_WARNINGS "${CATA_WARNINGS} -Wredundant-decls")
ENDIF()
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS}")
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ ifdef SOUND
cp -R --no-preserve=ownership data/sound $(DATA_PREFIX)
endif
install --mode=644 data/changelog.txt data/cataicon.ico data/fontdata.json \
LICENSE.txt -t $(DATA_PREFIX)
LICENSE.txt LICENSE-OFL-Terminus-Font.txt -t $(DATA_PREFIX)
mkdir -p $(LOCALE_DIR)
ifdef LANGUAGES
LOCALE_DIR=$(LOCALE_DIR) lang/compile_mo.sh $(LANGUAGES)
Expand Down Expand Up @@ -941,7 +941,7 @@ ifdef SOUND
cp -R --no-preserve=ownership data/sound $(DATA_PREFIX)
endif
install --mode=644 data/changelog.txt data/cataicon.ico data/fontdata.json \
LICENSE.txt -t $(DATA_PREFIX)
LICENSE.txt LICENSE-OFL-Terminus-Font.txt -t $(DATA_PREFIX)
mkdir -p $(LOCALE_DIR)
ifdef LANGUAGES
LOCALE_DIR=$(LOCALE_DIR) lang/compile_mo.sh $(LANGUAGES)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Dialog onCreateDialog(int id) {
installDialog = new ProgressDialog(this);
installDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
boolean clean_install = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString("installed", "").isEmpty();
installDialog.setTitle(getString(clean_install ? R.string.installing : R.string.upgrading));
installDialog.setTitle(getString(clean_install ? R.string.installTitle : R.string.upgradeTitle));
installDialog.setIndeterminate(true);
installDialog.setCancelable(false);
return installDialog;
Expand Down Expand Up @@ -110,6 +110,7 @@ private class InstallProgramTask extends AsyncTask<Void, Integer, Boolean> {

private AlertDialog installationAlert;
private AlertDialog settingsAlert;
private AlertDialog helpAlert;

@Override
protected void onPreExecute() {
Expand All @@ -133,6 +134,17 @@ public void onClick(DialogInterface dialog, int id) {
installationAlert.show();
}

helpAlert = new AlertDialog.Builder(SplashScreen.this)
.setTitle(getString(R.string.helpTitle))
.setCancelable(false)
.setMessage(getString(R.string.helpMessage))
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
settingsAlert.show();
return;
}
}).create();

settingsAlert = new AlertDialog.Builder(SplashScreen.this)
.setTitle("Settings")
.setMultiChoiceItems(SplashScreen.this.mSettingsNames, SplashScreen.this.mSettingsValues, new DialogInterface.OnMultiChoiceClickListener() {
Expand All @@ -148,6 +160,12 @@ public void onClick(DialogInterface dialog, int id) {
SplashScreen.this.startGameActivity(false);
return;
}
})
.setNeutralButton("Show help", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
helpAlert.show();
return;
}
}).create();
}

Expand Down
6 changes: 4 additions & 2 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="installing">Installing game data...</string>
<string name="upgrading">Upgrading game data...</string>
<string name="installTitle">Installing game data...</string>
<string name="upgradeTitle">Upgrading game data...</string>
<string name="helpTitle">Help &amp; Controls</string>
<string name="helpMessage">"Swipe" for directional movement (hold for virtual joystick). "Tap" to confirm selection in menu or Pause one turn in-game (hold to Pause several turns in-game). "Double tap" to cancel or go back in menus (works like Escape key). "Pinch" to zoom in/out (in-game). Use hardware "Back" button to toggle virtual keyboard (hold to toggle keyboard shortcuts).</string>
</resources>
Loading

0 comments on commit 8a77f76

Please sign in to comment.