From 76bd3b3f5060830ea294169b22a3d31e0e43f193 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 28 Mar 2021 01:52:04 +0100 Subject: [PATCH] Pondering too fast - Added a button to slow down ponder scenes while any text is shown on screen --- src/generated/resources/.cache/cache | 26 ++--- .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/lang/unfinished/de_de.json | 3 +- .../assets/create/lang/unfinished/es_es.json | 3 +- .../assets/create/lang/unfinished/es_mx.json | 3 +- .../assets/create/lang/unfinished/fr_fr.json | 3 +- .../assets/create/lang/unfinished/it_it.json | 3 +- .../assets/create/lang/unfinished/ja_jp.json | 3 +- .../assets/create/lang/unfinished/ko_kr.json | 3 +- .../assets/create/lang/unfinished/nl_nl.json | 3 +- .../assets/create/lang/unfinished/pt_br.json | 3 +- .../assets/create/lang/unfinished/ru_ru.json | 3 +- .../assets/create/lang/unfinished/zh_cn.json | 3 +- .../assets/create/lang/unfinished/zh_tw.json | 3 +- .../create/foundation/gui/AllIcons.java | 3 +- .../foundation/ponder/PonderLocalization.java | 1 + .../create/foundation/ponder/PonderUI.java | 99 ++++++++++++------ .../assets/create/textures/gui/icons.png | Bin 2881 -> 2923 bytes 18 files changed, 108 insertions(+), 58 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index f4ced7d43..78ca66029 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -403,19 +403,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json ce0e5405da381a86625b908c569c5dbe347abdba assets/create/lang/en_ud.json -442123de75c67a2b562194981d62c6a6de053593 assets/create/lang/en_us.json -1a5739ce1ab4a923dcf5a7ed12f16af394aed719 assets/create/lang/unfinished/de_de.json -4f21f855b45e8b44aedcae94e5a41c797d05af45 assets/create/lang/unfinished/es_es.json -e971082462cd5a92a08c3a1481e8e7c6e1afcea1 assets/create/lang/unfinished/es_mx.json -64a39634a36da998fd11553340cd1fc652129ce9 assets/create/lang/unfinished/fr_fr.json -afb72ad7e2713819b3cda0110a41dcdbbcc0bb0b assets/create/lang/unfinished/it_it.json -583b4bddc044614efb1b08f9bfb36a49e0a67e4f assets/create/lang/unfinished/ja_jp.json -9baa3052e1a9440e1cb6d46950d2227f2be3435e assets/create/lang/unfinished/ko_kr.json -7701f3b29b3e92a9943c15000beb9df02143fe90 assets/create/lang/unfinished/nl_nl.json -9f935fe569d793f6ee581ebc24bff5740c91fbab assets/create/lang/unfinished/pt_br.json -9ede4dc1051fea0bcabc30da1d133c0048d29641 assets/create/lang/unfinished/ru_ru.json -2442b5fe4ed2d92ab3081e7422bfecdf1ac06610 assets/create/lang/unfinished/zh_cn.json -56268c452b57cf072f35839ebfa130213a966730 assets/create/lang/unfinished/zh_tw.json +e847bb88a7cf6bfa81f03f87f106a85c7e351da8 assets/create/lang/en_us.json +950f435754c82bb46d0f0bbd7fb0ea5c2a6db2be assets/create/lang/unfinished/de_de.json +953669a0880eb087bff8c6a0f31ab593826410ac assets/create/lang/unfinished/es_es.json +49dcba9e9e74421dc74e24a27f6876a9f9e4bafa assets/create/lang/unfinished/es_mx.json +db5fa9ea3a940cc378657db43d7de6f71abb8da3 assets/create/lang/unfinished/fr_fr.json +144bbca783790c63c1671388227a00780c23e5ba assets/create/lang/unfinished/it_it.json +8ebf781c5e3d8dd78eed9c1445d39a643dd1e2b1 assets/create/lang/unfinished/ja_jp.json +46f41cb9e6870bbb8aa4d58525f7ab07f5e911ff assets/create/lang/unfinished/ko_kr.json +eb16433d9ba6c3f9748074f48c22368c81cc52b3 assets/create/lang/unfinished/nl_nl.json +a4aa6902f68a6e4c2c0ce38dee6623e80a6cc65e assets/create/lang/unfinished/pt_br.json +8f889340f518084c90eba259ddbe822601462c4a assets/create/lang/unfinished/ru_ru.json +737e73147690f40aaae5ed51d24e3016fa9d778c assets/create/lang/unfinished/zh_cn.json +34826633b870307b430c64ec62695852b27cb872 assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index c7b5d21ad..2032f7448 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1829,6 +1829,7 @@ "create.ponder.previous": "Previous Scene", "create.ponder.replay": "Replay", "create.ponder.think_back": "Think Back", + "create.ponder.slow_text": "Comfy Reading", "create.ponder.shared.movement_anchors": "With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "32 RPM", "create.ponder.shared.sneak_and": "Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 043f0e322..141fee0d9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1506", + "_": "Missing Localizations: 1507", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index b2e8c7da2..b5220f2d3 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 541", + "_": "Missing Localizations: 542", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index b6c37a338..8beff1428 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1436", + "_": "Missing Localizations: 1437", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index af65f930a..17937cc79 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1218", + "_": "Missing Localizations: 1219", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index dde52b028..207f43b51 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 558", + "_": "Missing Localizations: 559", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 73d0995a1..d1f0cfd19 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 565", + "_": "Missing Localizations: 566", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 0788669d2..506b241b9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 611", + "_": "Missing Localizations: 612", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 375fd54da..9ea591d07 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1705", + "_": "Missing Localizations: 1706", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index f3be159ec..cd99e83ca 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1771", + "_": "Missing Localizations: 1772", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 879ba25c9..7f3f96767 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 561", + "_": "Missing Localizations: 562", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 3b343e167..e5dba1fb9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 559", + "_": "Missing Localizations: 560", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 6f2d608e7..f51b62266 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 564", + "_": "Missing Localizations: 565", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java b/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java index 577ea8028..cb12f0517 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java +++ b/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java @@ -123,7 +123,8 @@ public class AllIcons implements IScreenRenderable { I_MTD_RIGHT = next(), I_MTD_SCAN = next(), I_MTD_REPLAY = next(), - I_MTD_USER_MODE = next(); + I_MTD_USER_MODE = next(), + I_MTD_SLOW_MODE = next(); public AllIcons(int x, int y) { iconX = x * 16; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java index 62e359ab2..ad8a895fa 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java @@ -80,6 +80,7 @@ public class PonderLocalization { addGeneral(object, PonderUI.PREVIOUS, "Previous Scene"); addGeneral(object, PonderUI.REPLAY, "Replay"); addGeneral(object, PonderUI.THINK_BACK, "Think Back"); + addGeneral(object, PonderUI.SLOW_TEXT, "Comfy Reading"); shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v)); tag.forEach((k, v) -> { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java index 29435f48e..0c0e0c630 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java @@ -1,5 +1,7 @@ package com.simibubi.create.foundation.ponder; +import static com.simibubi.create.foundation.ponder.PonderLocalization.LANG_PREFIX; + import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -21,6 +23,7 @@ import com.simibubi.create.foundation.ponder.content.PonderChapter; import com.simibubi.create.foundation.ponder.content.PonderIndex; import com.simibubi.create.foundation.ponder.content.PonderTag; import com.simibubi.create.foundation.ponder.content.PonderTagScreen; +import com.simibubi.create.foundation.ponder.elements.TextWindowElement; import com.simibubi.create.foundation.ponder.ui.PonderButton; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.ColorHelper; @@ -58,14 +61,15 @@ public class PonderUI extends NavigatableSimiScreen { public static int ponderTicks; public static float ponderPartialTicksPaused; - public static final String PONDERING = PonderLocalization.LANG_PREFIX + "pondering"; - public static final String IDENTIFY_MODE = PonderLocalization.LANG_PREFIX + "identify_mode"; - public static final String IN_CHAPTER = PonderLocalization.LANG_PREFIX + "in_chapter"; - public static final String IDENTIFY = PonderLocalization.LANG_PREFIX + "identify"; - public static final String PREVIOUS = PonderLocalization.LANG_PREFIX + "previous"; - public static final String CLOSE = PonderLocalization.LANG_PREFIX + "close"; - public static final String NEXT = PonderLocalization.LANG_PREFIX + "next"; - public static final String REPLAY = PonderLocalization.LANG_PREFIX + "replay"; + public static final String PONDERING = LANG_PREFIX + "pondering"; + public static final String IDENTIFY_MODE = LANG_PREFIX + "identify_mode"; + public static final String IN_CHAPTER = LANG_PREFIX + "in_chapter"; + public static final String IDENTIFY = LANG_PREFIX + "identify"; + public static final String PREVIOUS = LANG_PREFIX + "previous"; + public static final String CLOSE = LANG_PREFIX + "close"; + public static final String NEXT = LANG_PREFIX + "next"; + public static final String REPLAY = LANG_PREFIX + "replay"; + public static final String SLOW_TEXT = LANG_PREFIX + "slow_text"; private List scenes; private List tags; @@ -76,6 +80,7 @@ public class PonderUI extends NavigatableSimiScreen { PonderChapter chapter = null; private boolean userViewMode; + private boolean slowTextMode; private boolean identifyMode; private ItemStack hoveredTooltipItem; private BlockPos hoveredBlockPos; @@ -90,10 +95,13 @@ public class PonderUI extends NavigatableSimiScreen { private int index = 0; private PonderTag referredToByTag; - private PonderButton left, right, scan, chap, userMode, close, replay; + private PonderButton left, right, scan, chap, userMode, close, replay, slowMode; private PonderProgressBar progressBar; private int skipCooling = 0; + private int extendedTickLength = 0; + private int extendedTickTimer = 0; + public static PonderUI of(ResourceLocation id) { return new PonderUI(PonderRegistry.compile(id)); } @@ -196,8 +204,13 @@ public class PonderUI extends NavigatableSimiScreen { .shortcut(bindings.keyBindDrop) .fade(0, -1)); + widgets.add(slowMode = new PonderButton(width - 20 - 31, bY, () -> { + slowTextMode = !slowTextMode; + }).showing(AllIcons.I_MTD_SLOW_MODE) + .fade(0, -1)); + if (PonderIndex.EDITOR_MODE) { - widgets.add(userMode = new PonderButton(width - 20 - 31, bY, () -> { + widgets.add(userMode = new PonderButton(width - 50 - 31, bY, () -> { userViewMode = !userViewMode; }).showing(AllIcons.I_MTD_USER_MODE) .fade(0, -1)); @@ -250,16 +263,32 @@ public class PonderUI extends NavigatableSimiScreen { referredToByTag = null; } - PonderScene activeScene = scenes.get(index); - if (!identifyMode) { - ponderTicks++; - if (skipCooling == 0) - activeScene.tick(); - } - lazyIndex.tickChaser(); fadeIn.tickChaser(); finishingFlash.tickChaser(); + PonderScene activeScene = scenes.get(index); + + extendedTickLength = 0; + if (slowTextMode) + activeScene.forEachVisible(TextWindowElement.class, twe -> extendedTickLength = 2); + + if (extendedTickTimer == 0) { + if (!identifyMode) { + ponderTicks++; + if (skipCooling == 0) + activeScene.tick(); + } + + if (!identifyMode) { + float lazyIndexValue = lazyIndex.getValue(); + if (Math.abs(lazyIndexValue - index) > 1 / 512f) + scenes.get(lazyIndexValue < index ? index - 1 : index + 1) + .tick(); + } + extendedTickTimer = extendedTickLength; + } else + extendedTickTimer--; + progressBar.tick(); if (activeScene.currentTime == activeScene.totalTime - 1) @@ -272,13 +301,6 @@ public class PonderUI extends NavigatableSimiScreen { } } - if (!identifyMode) { - float lazyIndexValue = lazyIndex.getValue(); - if (Math.abs(lazyIndexValue - index) > 1 / 512f) - scenes.get(lazyIndexValue < index ? index - 1 : index + 1) - .tick(); - } - updateIdentifiedItem(activeScene); } @@ -357,6 +379,7 @@ public class PonderUI extends NavigatableSimiScreen { @Override protected void renderWindow(int mouseX, int mouseY, float partialTicks) { + partialTicks = getPartialTicks(); RenderSystem.enableBlend(); renderVisibleScenes(mouseX, mouseY, skipCooling > 0 ? 0 : identifyMode ? ponderPartialTicksPaused : partialTicks); @@ -388,7 +411,7 @@ public class PonderUI extends NavigatableSimiScreen { RenderSystem.enableDepthTest(); RenderSystem.pushMatrix(); - + // has to be outside of MS transforms, important for vertex sorting RenderSystem.translated(0, 0, 800); @@ -400,8 +423,6 @@ public class PonderUI extends NavigatableSimiScreen { story.renderScene(buffer, ms, partialTicks); buffer.draw(); - RenderSystem.popMatrix(); - MutableBoundingBox bounds = story.getBounds(); RenderSystem.pushMatrix(); RenderSystem.multMatrix(ms.peek() @@ -492,8 +513,8 @@ public class PonderUI extends NavigatableSimiScreen { } RenderSystem.popMatrix(); - ms.pop(); + RenderSystem.popMatrix(); } protected void renderWidgets(int mouseX, int mouseY, float partialTicks) { @@ -547,7 +568,7 @@ public class PonderUI extends NavigatableSimiScreen { drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, tooltipColor); drawRightAlignedString(font, - Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee); + Lang.translate(LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee); RenderSystem.popMatrix(); } @@ -594,6 +615,11 @@ public class PonderUI extends NavigatableSimiScreen { else userMode.dim(); } + + if (slowTextMode) + slowMode.flash(); + else + slowMode.dim(); { // Scene overlay @@ -680,6 +706,10 @@ public class PonderUI extends NavigatableSimiScreen { drawCenteredString(font, Lang.translate(NEXT), right.x + 10, tooltipY, tooltipColor); if (replay.isHovered()) drawCenteredString(font, Lang.translate(REPLAY), replay.x + 10, tooltipY, tooltipColor); + if (slowMode.isHovered()) + drawCenteredString(font, Lang.translate(SLOW_TEXT), slowMode.x + 5, tooltipY, tooltipColor); + if (PonderIndex.EDITOR_MODE && userMode.isHovered()) + drawCenteredString(font, "Editor View", userMode.x + 10, tooltipY, tooltipColor); RenderSystem.popMatrix(); } @@ -794,7 +824,7 @@ public class PonderUI extends NavigatableSimiScreen { @Override protected String getBreadcrumbTitle() { if (chapter != null) - return Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()); + return Lang.translate(LANG_PREFIX + "chapter." + chapter.getId()); return stack.getItem() .getName() @@ -922,13 +952,18 @@ public class PonderUI extends NavigatableSimiScreen { } public static float getPartialTicks() { + float renderPartialTicks = Minecraft.getInstance() + .getRenderPartialTicks(); + if (Minecraft.getInstance().currentScreen instanceof PonderUI) { PonderUI ui = (PonderUI) Minecraft.getInstance().currentScreen; if (ui.identifyMode) return ponderPartialTicksPaused; + + return (renderPartialTicks + (ui.extendedTickLength - ui.extendedTickTimer)) / (ui.extendedTickLength + 1); } - return Minecraft.getInstance() - .getRenderPartialTicks(); + + return renderPartialTicks; } @Override diff --git a/src/main/resources/assets/create/textures/gui/icons.png b/src/main/resources/assets/create/textures/gui/icons.png index c9d661aee4462a0b8ea19468f8c50e180a0a9546..1dff79b367fb92985f19643b0fe3032bca2a9dae 100644 GIT binary patch literal 2923 zcmdT``9IWM8~%Qc8QYAVFo=+t79o)^#$J|5iL5D-Wf02NFxgUxAxoAlWe=f}B_mM` zPnH=WWEo_8>}!MR9q;q}@cs+$`FzgjI@dY(59j`z>$>mr2y1SH;1uHo003cPtZxYb zAae-<><}h+mf2i6VE&dy7@(p{e2z(2-E_@#0iY^@YtI?VnqU6&zXLG%G}6vI;qW!S z=Fbc$KA514)pQ~Na8{b=>s|?RTzs)$D^tg9fE26G6CM3?*C_3TUD85QRFq(%wY(gT zeD6nQ{_}+O$vyh+<4s=k!Nt)hK@B}kVRR^$z>OpbPaEAxT)2508}oh@3(McDX~ zK586lXy$&{8--@SL^{`Rc~tD#JTqsz@pGmz54x@=nmsyvzZ9i+qldc zyJ2{5BQE1v%yAJB)aL@H2T@)@65b79QUeRhX}sBzaBC_#`(9Xdy*I&5JWePYLEPoA zZMlIr>{B)$vz@cemou|G`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