mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-29 08:26:37 +01:00
Create menu, Part I
- Added an intermediate menu screen for in-game links and configs - Couple slight tweaks to config UI
This commit is contained in:
parent
3372947c75
commit
212cd593a7
29 changed files with 289 additions and 40 deletions
|
@ -408,20 +408,20 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
|||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||
c71f5246d2cb8e9913d1552d23fcc82c43cde7a0 assets/create/lang/en_ud.json
|
||||
17639612f4b316d538fa21c8f15de0a1eb26bfcf assets/create/lang/en_us.json
|
||||
c464b61fa6144fb0818087b1f5ec2bafe5bebaa6 assets/create/lang/unfinished/de_de.json
|
||||
71e4e567bf3ff882755d25529d8edba28cb51c8d assets/create/lang/unfinished/es_es.json
|
||||
ffd5f17e5421e326622d13f79d3328f77e41f489 assets/create/lang/unfinished/es_mx.json
|
||||
37341b19fef342023644cb0d62be3b8592bcb9af assets/create/lang/unfinished/fr_fr.json
|
||||
c80c708222964a62fdb8f565d5384ffb30fcb358 assets/create/lang/unfinished/it_it.json
|
||||
e7a925d5187e3ca3cc417356012bfc68e08e262c assets/create/lang/unfinished/ja_jp.json
|
||||
83b4f81b12c33de3b743077fa0e38eb2635e3a6d assets/create/lang/unfinished/ko_kr.json
|
||||
5b26f54f33922cf1ae8dfb072b538a3558570b1f assets/create/lang/unfinished/nl_nl.json
|
||||
b839c1dae703adaf5de99f3f40f3444f363752d9 assets/create/lang/unfinished/pl_pl.json
|
||||
b33f825de7d999a8369ec44e11fa373a4a8e2e3b assets/create/lang/unfinished/pt_br.json
|
||||
ac557937cf57dde987d77cfd091198c0ad97433f assets/create/lang/unfinished/ru_ru.json
|
||||
1f5da639f8450d8cd818d938a871fad9a1041b3a assets/create/lang/unfinished/zh_cn.json
|
||||
25bf9dbb6163fb4be36afa0d4917bedbecb1cd3b assets/create/lang/unfinished/zh_tw.json
|
||||
71a84272fc9400fe86b377ac7bd40615925bd018 assets/create/lang/en_us.json
|
||||
a3ea0dc4f5ed123b662a4cadf31d79d110f0374a assets/create/lang/unfinished/de_de.json
|
||||
ce608ed3037f73eac417f6e71577314672c1751b assets/create/lang/unfinished/es_es.json
|
||||
62cb2b263e23d237a167c6d5846585bd3c8a760a assets/create/lang/unfinished/es_mx.json
|
||||
a2082a9cdd20340517223ba960c22bb481154f54 assets/create/lang/unfinished/fr_fr.json
|
||||
49c8f8d148fccfe390b1941111655935041cf1d0 assets/create/lang/unfinished/it_it.json
|
||||
f12eb0d39eee6af201274c46c0080423741f9a53 assets/create/lang/unfinished/ja_jp.json
|
||||
6b3efed651645d4d38fd1839a9465913a829a507 assets/create/lang/unfinished/ko_kr.json
|
||||
2a36cd97e79ac808a5a9a995ea42cb99f3567caa assets/create/lang/unfinished/nl_nl.json
|
||||
2e5ae4757496ac2e1915e629d164977aa0cbf134 assets/create/lang/unfinished/pl_pl.json
|
||||
bf53ced4eacfb7b6f95120059023698b3cbbbbaf assets/create/lang/unfinished/pt_br.json
|
||||
581fe62af8811637c7b328e8d9ff8489b7d2ac1e assets/create/lang/unfinished/ru_ru.json
|
||||
2646f7463c7910d5e03168a789ff0bf510e4c249 assets/create/lang/unfinished/zh_cn.json
|
||||
20a6450f0b22620139eeabbb23f65633c8225550 assets/create/lang/unfinished/zh_tw.json
|
||||
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
||||
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
||||
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||
|
|
|
@ -674,6 +674,13 @@
|
|||
"create.block.deployer.damage_source_name": "a rogue Deployer",
|
||||
"create.block.cart_assembler.invalid": "Place your Cart Assembler on a rail block",
|
||||
|
||||
"create.menu.return": "Return to Menu",
|
||||
"create.menu.configure": "Configure...",
|
||||
"create.menu.getting_started": "Getting Started",
|
||||
"create.menu.send_feedback": "Feedback & Help",
|
||||
"create.menu.report_bugs": "Report Issues",
|
||||
"create.menu.support": "Support Us",
|
||||
|
||||
"create.recipe.crushing": "Crushing",
|
||||
"create.recipe.milling": "Milling",
|
||||
"create.recipe.fan_washing": "Bulk Washing",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 962",
|
||||
"_": "Missing Localizations: 968",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "einem Finger",
|
||||
"create.block.cart_assembler.invalid": "Platziere deinen Lorenmonteur auf einer Schiene.",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Mahlen (Mahlwerk)",
|
||||
"create.recipe.milling": "Mahlen (Mahlstein)",
|
||||
"create.recipe.fan_washing": "Sammelwaschen",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 663",
|
||||
"_": "Missing Localizations: 669",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "un Desplegador rebelde",
|
||||
"create.block.cart_assembler.invalid": "Coloque su Ensamblador de vagonetas en un bloque de Raíles",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Trituración",
|
||||
"create.recipe.milling": "Fresado",
|
||||
"create.recipe.fan_washing": "Lavado a granel",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1286",
|
||||
"_": "Missing Localizations: 1292",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "UNLOCALIZED: a rogue Deployer",
|
||||
"create.block.cart_assembler.invalid": "UNLOCALIZED: Place your Cart Assembler on a rail block",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "UNLOCALIZED: Crushing",
|
||||
"create.recipe.milling": "UNLOCALIZED: Milling",
|
||||
"create.recipe.fan_washing": "UNLOCALIZED: Bulk Washing",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1214",
|
||||
"_": "Missing Localizations: 1220",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "un déployeur voyou",
|
||||
"create.block.cart_assembler.invalid": "UNLOCALIZED: Place your Cart Assembler on a rail block",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Ecrasement",
|
||||
"create.recipe.milling": "Mouture",
|
||||
"create.recipe.fan_washing": "Lavage",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 680",
|
||||
"_": "Missing Localizations: 686",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "un disadattato",
|
||||
"create.block.cart_assembler.invalid": "Piazza il tuo assemblatore di carrelli da miniera su un binario",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Frantumazione",
|
||||
"create.recipe.milling": "Macinatura",
|
||||
"create.recipe.fan_washing": "Lavaggio volumetrico",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 44",
|
||||
"_": "Missing Localizations: 50",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "悪いデプロイヤー",
|
||||
"create.block.cart_assembler.invalid": "トロッコアセンブラはレールの上にのみ設置できます",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "粉砕",
|
||||
"create.recipe.milling": "製粉",
|
||||
"create.recipe.fan_washing": "一括洗浄",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 733",
|
||||
"_": "Missing Localizations: 739",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "배포기",
|
||||
"create.block.cart_assembler.invalid": "카트조립기를 레일 위에 설치하세요",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "분쇄",
|
||||
"create.recipe.milling": "맷돌질",
|
||||
"create.recipe.fan_washing": "세척",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1597",
|
||||
"_": "Missing Localizations: 1603",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "UNLOCALIZED: a rogue Deployer",
|
||||
"create.block.cart_assembler.invalid": "UNLOCALIZED: Place your Cart Assembler on a rail block",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Verpulveren",
|
||||
"create.recipe.milling": "UNLOCALIZED: Milling",
|
||||
"create.recipe.fan_washing": "UNLOCALIZED: Bulk Washing",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 20",
|
||||
"_": "Missing Localizations: 26",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "zbuntowany aplikator",
|
||||
"create.block.cart_assembler.invalid": "Postaw monter wagoników na torze",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Kruszenie",
|
||||
"create.recipe.milling": "Mielenie",
|
||||
"create.recipe.fan_washing": "Hurtowe płukanie",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1649",
|
||||
"_": "Missing Localizations: 1655",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "UNLOCALIZED: a rogue Deployer",
|
||||
"create.block.cart_assembler.invalid": "UNLOCALIZED: Place your Cart Assembler on a rail block",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Moendo",
|
||||
"create.recipe.milling": "UNLOCALIZED: Milling",
|
||||
"create.recipe.fan_washing": "UNLOCALIZED: Bulk Washing",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 577",
|
||||
"_": "Missing Localizations: 583",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "автономным активатором",
|
||||
"create.block.cart_assembler.invalid": "Поместите сборщик вагонеток на блок рельс",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "Измельчение",
|
||||
"create.recipe.milling": "Помол",
|
||||
"create.recipe.fan_washing": "Массовая промывка",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 63",
|
||||
"_": "Missing Localizations: 69",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "二五仔机械手",
|
||||
"create.block.cart_assembler.invalid": "请将矿车装配器放置在铁轨上",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "粉碎",
|
||||
"create.recipe.milling": "研磨",
|
||||
"create.recipe.fan_washing": "批量洗涤",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 56",
|
||||
"_": "Missing Localizations: 62",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -675,6 +675,13 @@
|
|||
"create.block.deployer.damage_source_name": "機械手",
|
||||
"create.block.cart_assembler.invalid": "將您的礦車裝修站放在鐵軌上",
|
||||
|
||||
"create.menu.return": "UNLOCALIZED: Return to Menu",
|
||||
"create.menu.configure": "UNLOCALIZED: Configure...",
|
||||
"create.menu.getting_started": "UNLOCALIZED: Getting Started",
|
||||
"create.menu.send_feedback": "UNLOCALIZED: Feedback & Help",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
"create.recipe.crushing": "粉碎",
|
||||
"create.recipe.milling": "研磨",
|
||||
"create.recipe.fan_washing": "批次洗滌",
|
||||
|
|
|
@ -15,7 +15,6 @@ import com.simibubi.create.foundation.gui.widgets.BoxWidget;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.fml.config.ModConfig;
|
||||
|
||||
|
@ -108,7 +107,7 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
widgets.clear();
|
||||
super.init();
|
||||
|
||||
TextStencilElement clientText = new TextStencilElement(client.fontRenderer, new StringTextComponent(clientTile).formatted(TextFormatting.BOLD)).centered(true, true);
|
||||
TextStencilElement clientText = new TextStencilElement(client.fontRenderer, new StringTextComponent(clientTile)).centered(true, true);
|
||||
widgets.add(clientConfigWidget = new BoxWidget(width / 2 - 100, height / 2 - 15 - 30, 200, 16).showingElement(clientText));
|
||||
|
||||
if (clientSpec != null) {
|
||||
|
@ -120,7 +119,7 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
clientText.withElementRenderer(DISABLED_RENDERER);
|
||||
}
|
||||
|
||||
TextStencilElement commonText = new TextStencilElement(client.fontRenderer, new StringTextComponent(commonTile).formatted(TextFormatting.BOLD)).centered(true, true);
|
||||
TextStencilElement commonText = new TextStencilElement(client.fontRenderer, new StringTextComponent(commonTile)).centered(true, true);
|
||||
widgets.add(commonConfigWidget = new BoxWidget(width / 2 - 100, height / 2 - 15, 200, 16).showingElement(commonText));
|
||||
|
||||
if (commonSpec != null) {
|
||||
|
@ -132,7 +131,7 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
commonText.withElementRenderer(DISABLED_RENDERER);
|
||||
}
|
||||
|
||||
TextStencilElement serverText = new TextStencilElement(client.fontRenderer, new StringTextComponent(serverTile).formatted(TextFormatting.BOLD)).centered(true, true);
|
||||
TextStencilElement serverText = new TextStencilElement(client.fontRenderer, new StringTextComponent(serverTile)).centered(true, true);
|
||||
widgets.add(serverConfigWidget = new BoxWidget(width / 2 - 100, height / 2 - 15 + 30, 200, 16).showingElement(serverText));
|
||||
|
||||
if (serverSpec != null && Minecraft.getInstance().world != null) {
|
||||
|
|
|
@ -135,7 +135,8 @@ public class ConfigScreenList extends ExtendedList<ConfigScreenList.Entry> {
|
|||
|
||||
@Override
|
||||
public void render(MatrixStack ms, int index, int y, int x, int width, int height, int mouseX, int mouseY, boolean p_230432_9_, float partialTicks) {
|
||||
UIRenderHelper.streak(ms, 0, x, y + height / 2, height - 6, width, 0xdd_000000);
|
||||
UIRenderHelper.streak(ms, 0, x - 10, y + height / 2, height - 6, width / 8 * 7, 0xdd_000000);
|
||||
UIRenderHelper.streak(ms, 180, x + (int) (width * 1.35f) + 10, y + height / 2, height - 6, width / 8 * 7, 0xdd_000000);
|
||||
IFormattableTextComponent component = label.getComponent();
|
||||
FontRenderer font = Minecraft.getInstance().fontRenderer;
|
||||
if (font.getWidth(component) > getLabelWidth(width) - 10) {
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.util.stream.Collectors;
|
|||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||
import com.simibubi.create.foundation.gui.mainMenu.CreateMainMenuScreen;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screen.IngameMenuScreen;
|
||||
|
@ -21,12 +23,12 @@ import net.minecraftforge.client.event.GuiScreenEvent;
|
|||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
|
||||
public class OpenConfigButton extends Button {
|
||||
public class OpenCreateMenuButton extends Button {
|
||||
|
||||
public static ItemStack icon = AllItems.GOGGLES.asStack();
|
||||
|
||||
public OpenConfigButton(int x, int y) {
|
||||
super(x, y, 20, 20, StringTextComponent.EMPTY, OpenConfigButton::click);
|
||||
public OpenCreateMenuButton(int x, int y) {
|
||||
super(x, y, 20, 20, StringTextComponent.EMPTY, OpenCreateMenuButton::click);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +38,7 @@ public class OpenConfigButton extends Button {
|
|||
}
|
||||
|
||||
public static void click(Button b) {
|
||||
Minecraft.getInstance().displayGuiScreen(BaseConfigScreen.forCreate(Minecraft.getInstance().currentScreen));
|
||||
ScreenOpener.open(new CreateMainMenuScreen(Minecraft.getInstance().currentScreen));
|
||||
}
|
||||
|
||||
public static class SingleMenuRow {
|
||||
|
@ -102,7 +104,7 @@ public class OpenConfigButton extends Button {
|
|||
.filter(w -> w.getMessage().getString().equals(target))
|
||||
.findFirst()
|
||||
.ifPresent(w -> event.addWidget(
|
||||
new OpenConfigButton(w.x + offsetX_ + (onLeft ? -20 : w.getWidth()), w.y)
|
||||
new OpenCreateMenuButton(w.x + offsetX_ + (onLeft ? -20 : w.getWidth()), w.y)
|
||||
));
|
||||
}
|
||||
}
|
|
@ -360,6 +360,7 @@ public class SubMenuConfigScreen extends ConfigScreen {
|
|||
public void onClose() {
|
||||
if (changes.isEmpty()) {
|
||||
super.onClose();
|
||||
ScreenOpener.open(parent);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TextStencilElement extends DelegatedStencilElement {
|
|||
x = width / 2f - font.getWidth(component) / 2f;
|
||||
|
||||
if (centerVertically)
|
||||
y = height / 2f - font.FONT_HEIGHT / 2f;
|
||||
y = height / 2f - (font.FONT_HEIGHT - 1) / 2f;
|
||||
|
||||
font.draw(ms, component, x, y, 0xff_000000);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class TextStencilElement extends DelegatedStencilElement {
|
|||
x = width / 2f - font.getWidth(component) / 2f;
|
||||
|
||||
if (centerVertically)
|
||||
y = height / 2f - font.FONT_HEIGHT / 2f;
|
||||
y = height / 2f - (font.FONT_HEIGHT - 1) / 2f;
|
||||
|
||||
ms.push();
|
||||
ms.translate(x, y, 0);
|
||||
|
|
|
@ -66,7 +66,7 @@ public class Theme {
|
|||
put(Key.BUTTON_FAIL, new Color(0xcc_f78888, true), new Color(0xcc_cc2020, true));
|
||||
put(Key.TEXT, new Color(0xff_eeeeee), new Color(0xff_a3a3a3));
|
||||
put(Key.TEXT_DARKER, new Color(0xff_a3a3a3), new Color(0xff_808080));
|
||||
put(Key.TEXT_ACCENT_STRONG, new Color(0xff_7b7ba3), new Color(0xff_616192));
|
||||
put(Key.TEXT_ACCENT_STRONG, new Color(0xff_7b7ba3), new Color(0xff_7b7ba3));
|
||||
put(Key.TEXT_ACCENT_SLIGHT, new Color(0xff_ddeeff), new Color(0xff_a0b0c0));
|
||||
put(Key.STREAK, new Color(0x101010, false));
|
||||
|
||||
|
|
|
@ -0,0 +1,141 @@
|
|||
package com.simibubi.create.foundation.gui.mainMenu;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.foundation.config.ui.BaseConfigScreen;
|
||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.client.gui.screen.ConfirmOpenLinkScreen;
|
||||
import net.minecraft.client.gui.screen.MainMenuScreen;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.renderer.RenderSkybox;
|
||||
import net.minecraft.client.renderer.RenderSkyboxCube;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
|
||||
public class CreateMainMenuScreen extends AbstractSimiScreen {
|
||||
|
||||
protected final Screen parent;
|
||||
protected boolean returnOnClose;
|
||||
|
||||
private static final RenderSkyboxCube PANORAMA_RESOURCES =
|
||||
new RenderSkyboxCube(Create.asResource("textures/gui/title/background/panorama"));
|
||||
private static final ResourceLocation PANORAMA_OVERLAY_TEXTURES =
|
||||
new ResourceLocation("textures/gui/title/background/panorama_overlay.png");
|
||||
private RenderSkybox vanillaPanorama = new RenderSkybox(MainMenuScreen.PANORAMA_RESOURCES);
|
||||
private RenderSkybox panorama = new RenderSkybox(PANORAMA_RESOURCES);
|
||||
private long firstRenderTime;
|
||||
|
||||
public CreateMainMenuScreen(Screen parent) {
|
||||
this.parent = parent;
|
||||
returnOnClose = true;
|
||||
if (parent instanceof MainMenuScreen)
|
||||
vanillaPanorama = ObfuscationReflectionHelper.getPrivateValue(MainMenuScreen.class, (MainMenuScreen) parent,
|
||||
"field_209101_K");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
|
||||
if (firstRenderTime == 0L)
|
||||
this.firstRenderTime = Util.milliTime();
|
||||
super.render(ms, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderWindow(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
|
||||
if (parent instanceof MainMenuScreen) {
|
||||
float f = (float) (Util.milliTime() - this.firstRenderTime) / 1000.0F;
|
||||
float alpha = MathHelper.clamp(f, 0.0F, 1.0F);
|
||||
if (alpha < 1)
|
||||
vanillaPanorama.render(partialTicks, 1);
|
||||
panorama.render(partialTicks, alpha);
|
||||
|
||||
client.getTextureManager()
|
||||
.bindTexture(PANORAMA_OVERLAY_TEXTURES);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA,
|
||||
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
drawTexture(ms, 0, 0, this.width, this.height, 0.0F, 0.0F, 16, 128, 16, 128);
|
||||
}
|
||||
drawCenteredText(ms, textRenderer, new StringTextComponent("Create is Installed!"), width / 2, 40, 16777215);
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
super.init();
|
||||
returnOnClose = true;
|
||||
this.addButtons();
|
||||
}
|
||||
|
||||
private void addButtons() {
|
||||
buttons.clear();
|
||||
|
||||
int yStart = height / 4 + (parent instanceof MainMenuScreen ? 40 : 16);
|
||||
int center = width / 2;
|
||||
int bHeight = 20;
|
||||
int bShortWidth = 98;
|
||||
int bLongWidth = 200;
|
||||
|
||||
addButton(new Button(center - 100, yStart + 24 + -16, bLongWidth, bHeight, Lang.translate("menu.return"),
|
||||
$ -> onClose()));
|
||||
addButton(new Button(center - 100, yStart + 48 + -16, bShortWidth, bHeight, Lang.translate("menu.configure"),
|
||||
$ -> linkTo(BaseConfigScreen.forCreate(this))));
|
||||
|
||||
Button gettingStarted = new Button(center + 2, yStart + 48 + -16, bShortWidth, bHeight,
|
||||
Lang.translate("menu.getting_started"), $ -> {
|
||||
});
|
||||
gettingStarted.active = false;
|
||||
addButton(gettingStarted);
|
||||
|
||||
String feedbackLink = "https://discord.gg/hmaD7Se";
|
||||
String issueTrackerLink = "https://github.com/Creators-of-Create/Create/issues";
|
||||
String supportLink = "https://github.com/Creators-of-Create/Create/wiki/Supporting-the-Project";
|
||||
|
||||
addButton(new Button(center - 100, yStart + 72 + -16, bShortWidth, bHeight,
|
||||
Lang.translate("menu.send_feedback"), $ -> linkTo(feedbackLink)));
|
||||
addButton(new Button(center + 2, yStart + 72 + -16, bShortWidth, bHeight, Lang.translate("menu.report_bugs"),
|
||||
$ -> linkTo(issueTrackerLink)));
|
||||
addButton(new Button(center - 100, yStart + 92, bLongWidth, bHeight, Lang.translate("menu.support"),
|
||||
$ -> linkTo(supportLink)));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderWindowForeground(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
|
||||
super.renderWindowForeground(ms, mouseX, mouseY, partialTicks);
|
||||
buttons.forEach(w -> w.render(ms, mouseX, mouseY, partialTicks));
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
super.tick();
|
||||
}
|
||||
|
||||
private void linkTo(Screen screen) {
|
||||
returnOnClose = false;
|
||||
ScreenOpener.open(screen);
|
||||
}
|
||||
|
||||
private void linkTo(String url) {
|
||||
returnOnClose = false;
|
||||
ScreenOpener.open(new ConfirmOpenLinkScreen((p_213069_2_) -> {
|
||||
if (p_213069_2_)
|
||||
Util.getOSType()
|
||||
.openURI(url);
|
||||
this.client.displayGuiScreen(this);
|
||||
}, url, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
super.onClose();
|
||||
ScreenOpener.open(parent);
|
||||
}
|
||||
|
||||
}
|
|
@ -12,6 +12,13 @@
|
|||
"create.block.deployer.damage_source_name": "a rogue Deployer",
|
||||
"create.block.cart_assembler.invalid": "Place your Cart Assembler on a rail block",
|
||||
|
||||
"create.menu.return": "Return to Menu",
|
||||
"create.menu.configure": "Configure...",
|
||||
"create.menu.getting_started": "Getting Started",
|
||||
"create.menu.send_feedback": "Feedback & Help",
|
||||
"create.menu.report_bugs": "Report Issues",
|
||||
"create.menu.support": "Support Us",
|
||||
|
||||
"create.recipe.crushing": "Crushing",
|
||||
"create.recipe.milling": "Milling",
|
||||
"create.recipe.fan_washing": "Bulk Washing",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 380 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.7 MiB |
Binary file not shown.
After Width: | Height: | Size: 414 KiB |
Binary file not shown.
After Width: | Height: | Size: 399 KiB |
Binary file not shown.
After Width: | Height: | Size: 348 KiB |
Binary file not shown.
After Width: | Height: | Size: 305 KiB |
Loading…
Reference in a new issue