mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Allow import in the free version, but make it limited to one savegame
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
h3 {
|
||||
@include Heading;
|
||||
font-weight: bold;
|
||||
@include S(margin-bottom, 15px);
|
||||
@include S(margin-bottom, 5px);
|
||||
text-transform: uppercase;
|
||||
color: $colorRedBright;
|
||||
}
|
||||
@@ -105,7 +105,7 @@
|
||||
}
|
||||
|
||||
ul {
|
||||
@include S(margin-top, 15px);
|
||||
@include S(margin-top, 5px);
|
||||
@include S(padding-left, 20px);
|
||||
li {
|
||||
@include Text;
|
||||
|
||||
@@ -16,11 +16,15 @@ export class HUDWatermark extends BaseHUDPart {
|
||||
parameters.context.fillStyle = "#f77";
|
||||
parameters.context.font = "bold " + this.root.app.getEffectiveUiScale() * 17 + "px GameFont";
|
||||
parameters.context.textAlign = "center";
|
||||
parameters.context.fillText("DEMO VERSION", w / 2, 50);
|
||||
parameters.context.fillText("DEMO VERSION", w / 2, this.root.app.getEffectiveUiScale() * 35);
|
||||
|
||||
parameters.context.font = "bold " + this.root.app.getEffectiveUiScale() * 12 + "px GameFont";
|
||||
parameters.context.textAlign = "center";
|
||||
parameters.context.fillText("Please consider to buy the full version!", w / 2, 90);
|
||||
parameters.context.fillText(
|
||||
"Please consider to buy the full version!",
|
||||
w / 2,
|
||||
this.root.app.getEffectiveUiScale() * 55
|
||||
);
|
||||
|
||||
parameters.context.textAlign = "left";
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ export class MainMenuState extends GameState {
|
||||
}
|
||||
|
||||
requestImportSavegame() {
|
||||
if (IS_DEMO) {
|
||||
this.dialogs.showFeatureRestrictionInfo(T.demo.features.importingGames);
|
||||
if (IS_DEMO && this.app.savegameMgr.getSavegamesMetaData().length > 0) {
|
||||
this.dialogs.showWarning(T.dialogs.oneSavegameLimit.title, T.dialogs.oneSavegameLimit.desc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -337,6 +337,11 @@ export class MainMenuState extends GameState {
|
||||
}
|
||||
|
||||
onPlayButtonClicked() {
|
||||
if (IS_DEMO && this.app.savegameMgr.getSavegamesMetaData().length > 0) {
|
||||
this.dialogs.showWarning(T.dialogs.oneSavegameLimit.title, T.dialogs.oneSavegameLimit.desc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (IS_DEMO) {
|
||||
const { ok } = this.dialogs.showWarning(
|
||||
T.dialogs.demoExplanation.title,
|
||||
|
||||
Reference in New Issue
Block a user