Colour shift
- Switched to a more readable text colour for the config ui - Slight tweaks to ponder button colours as well - Replaced discord link with project page
This commit is contained in:
parent
7fae3e4968
commit
169669680b
25 changed files with 159 additions and 59 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
|
||||
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
|
||||
ec002cefbb883258daed50448e17f874eb814c18 assets/create/lang/en_us.json
|
||||
639b3bbd99887014d67fc943d6e1415bebd1c70a assets/create/lang/unfinished/de_de.json
|
||||
3dca81115778734215a4d361ec30f43b1342b51c assets/create/lang/unfinished/es_es.json
|
||||
df82753f7276ceb72a834170bb09260c4c4f7936 assets/create/lang/unfinished/es_mx.json
|
||||
021158ff586e33ccfd0012c2c4fbfba83b62d57b assets/create/lang/unfinished/fr_fr.json
|
||||
4d3132ccb4a8d7c211451e195165fb3719c135a6 assets/create/lang/unfinished/it_it.json
|
||||
741f5a61d9fec8ece2936649490318ef4b06b15f assets/create/lang/unfinished/ja_jp.json
|
||||
79983f46c225a3dca6b9e6cecc26f73e07db1b86 assets/create/lang/unfinished/ko_kr.json
|
||||
c85b841cf6ef7a5205782da242e98c2dc3b2af9a assets/create/lang/unfinished/nl_nl.json
|
||||
2bcee4396da8bc2cbba794e7dd4b33a406d58360 assets/create/lang/unfinished/pl_pl.json
|
||||
0b45c9ecdf8fc82f7f1e112d82cb95e94cf8b064 assets/create/lang/unfinished/pt_br.json
|
||||
b7ef8659876e0890016e696b5adf73404b31ef8a assets/create/lang/unfinished/ru_ru.json
|
||||
f04ba370732503448596909c56ff0e05aec5a233 assets/create/lang/unfinished/zh_cn.json
|
||||
708e423b949fc4113cefc46a0119d02cad8f71ad 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
|
||||
|
|
|
@ -677,7 +677,7 @@
|
|||
"create.menu.return": "Return to Menu",
|
||||
"create.menu.configure": "Configure...",
|
||||
"create.menu.getting_started": "Getting Started",
|
||||
"create.menu.send_feedback": "Feedback & Help",
|
||||
"create.menu.project_page": "Project Page",
|
||||
"create.menu.report_bugs": "Report Issues",
|
||||
"create.menu.support": "Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"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.project_page": "UNLOCALIZED: Project Page",
|
||||
"create.menu.report_bugs": "UNLOCALIZED: Report Issues",
|
||||
"create.menu.support": "UNLOCALIZED: Support Us",
|
||||
|
||||
|
|
|
@ -5,16 +5,19 @@ import javax.annotation.Nullable;
|
|||
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
import com.simibubi.create.foundation.gui.DelegatedStencilElement;
|
||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||
import com.simibubi.create.foundation.gui.TextStencilElement;
|
||||
import com.simibubi.create.foundation.gui.Theme;
|
||||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
import com.simibubi.create.foundation.gui.widgets.BoxWidget;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -31,6 +34,7 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
BoxWidget clientConfigWidget;
|
||||
BoxWidget commonConfigWidget;
|
||||
BoxWidget serverConfigWidget;
|
||||
BoxWidget goBack;
|
||||
|
||||
ForgeConfigSpec clientSpec;
|
||||
ForgeConfigSpec commonSpec;
|
||||
|
@ -39,6 +43,7 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
String commonTile = "COMMON CONFIG";
|
||||
String serverTile = "SERVER CONFIG";
|
||||
String modID = Create.ID;
|
||||
protected boolean returnOnClose;
|
||||
|
||||
/**
|
||||
* If you are a Create Addon dev and want to make use of the same GUI
|
||||
|
@ -106,12 +111,13 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
protected void init() {
|
||||
widgets.clear();
|
||||
super.init();
|
||||
returnOnClose = 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) {
|
||||
clientConfigWidget.withCallback(() -> ScreenOpener.open(new SubMenuConfigScreen(this, ModConfig.Type.CLIENT, clientSpec)));
|
||||
clientConfigWidget.withCallback(() -> linkTo(new SubMenuConfigScreen(this, ModConfig.Type.CLIENT, clientSpec)));
|
||||
clientText.withElementRenderer(BoxWidget.gradientFactory.apply(clientConfigWidget));
|
||||
} else {
|
||||
clientConfigWidget.active = false;
|
||||
|
@ -123,7 +129,7 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
widgets.add(commonConfigWidget = new BoxWidget(width / 2 - 100, height / 2 - 15, 200, 16).showingElement(commonText));
|
||||
|
||||
if (commonSpec != null) {
|
||||
commonConfigWidget.withCallback(() -> ScreenOpener.open(new SubMenuConfigScreen(this, ModConfig.Type.COMMON, commonSpec)));
|
||||
commonConfigWidget.withCallback(() -> linkTo(new SubMenuConfigScreen(this, ModConfig.Type.COMMON, commonSpec)));
|
||||
commonText.withElementRenderer(BoxWidget.gradientFactory.apply(commonConfigWidget));
|
||||
} else {
|
||||
commonConfigWidget.active = false;
|
||||
|
@ -135,14 +141,42 @@ public class BaseConfigScreen extends ConfigScreen {
|
|||
widgets.add(serverConfigWidget = new BoxWidget(width / 2 - 100, height / 2 - 15 + 30, 200, 16).showingElement(serverText));
|
||||
|
||||
if (serverSpec != null && Minecraft.getInstance().world != null) {
|
||||
serverConfigWidget.withCallback(() -> ScreenOpener.open(new SubMenuConfigScreen(this, ModConfig.Type.SERVER, serverSpec)));
|
||||
serverConfigWidget.withCallback(() -> linkTo(new SubMenuConfigScreen(this, ModConfig.Type.SERVER, serverSpec)));
|
||||
serverText.withElementRenderer(BoxWidget.gradientFactory.apply(serverConfigWidget));
|
||||
} else {
|
||||
serverConfigWidget.active = false;
|
||||
serverConfigWidget.updateColorsFromState();
|
||||
serverText.withElementRenderer(DISABLED_RENDERER);
|
||||
serverConfigWidget.active = true;
|
||||
serverConfigWidget.getToolTip()
|
||||
.add(new StringTextComponent("Stored individually per World"));
|
||||
serverConfigWidget.getToolTip()
|
||||
.addAll(TooltipHelper.cutTextComponent(
|
||||
new StringTextComponent(
|
||||
"Gameplay settings can only be accessed from the in-game menu after joining a World or Server."),
|
||||
TextFormatting.GRAY, TextFormatting.GRAY));
|
||||
}
|
||||
|
||||
ConfigScreen.modID = this.modID;
|
||||
|
||||
goBack = new BoxWidget(width / 2 - 134, height / 2, 20, 20).withPadding(2, 2)
|
||||
.withCallback(this::onClose);
|
||||
goBack.showingElement(AllIcons.I_CONFIG_BACK.asStencil()
|
||||
.withElementRenderer(BoxWidget.gradientFactory.apply(goBack)));
|
||||
goBack.getToolTip()
|
||||
.add(new StringTextComponent("Go Back"));
|
||||
widgets.add(goBack);
|
||||
}
|
||||
|
||||
private void linkTo(Screen screen) {
|
||||
returnOnClose = false;
|
||||
ScreenOpener.open(screen);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
super.onClose();
|
||||
ScreenOpener.open(parent);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -264,6 +264,8 @@ public class SubMenuConfigScreen extends ConfigScreen {
|
|||
//extras for server configs
|
||||
if (type != ModConfig.Type.SERVER)
|
||||
return;
|
||||
if (client.isSingleplayer())
|
||||
return;
|
||||
|
||||
list.isForServer = true;
|
||||
boolean canEdit = client != null && client.player != null && client.player.hasPermissionLevel(2);
|
||||
|
@ -277,6 +279,7 @@ public class SubMenuConfigScreen extends ConfigScreen {
|
|||
.withPadding(2, 2)
|
||||
.showingElement(stencil);
|
||||
|
||||
|
||||
if (!canEdit) {
|
||||
list.children().forEach(e -> e.setEditable(false));
|
||||
resetAll.active = false;
|
||||
|
@ -301,7 +304,7 @@ public class SubMenuConfigScreen extends ConfigScreen {
|
|||
super.renderWindow(ms, mouseX, mouseY, partialTicks);
|
||||
|
||||
int x = width/2;
|
||||
drawCenteredString(ms, client.fontRenderer, "Editing config: " + ConfigScreen.modID + ":" + type.toString().toLowerCase(Locale.ROOT) + "@" + title, x, 15, Theme.i(Theme.Key.TEXT));
|
||||
drawCenteredString(ms, client.fontRenderer, ConfigScreen.modID + " > " + type.toString().toLowerCase(Locale.ROOT) + " > " + title, x, 15, Theme.i(Theme.Key.TEXT));
|
||||
|
||||
list.render(ms, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.simibubi.create.foundation.config.ui.entries;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
import com.simibubi.create.foundation.gui.BoxElement;
|
||||
|
@ -22,7 +24,7 @@ public class EnumEntry extends ValueEntry<Enum<?>> {
|
|||
|
||||
public EnumEntry(String label, ForgeConfigSpec.ConfigValue<Enum<?>> value, ForgeConfigSpec.ValueSpec spec) {
|
||||
super(label, value, spec);
|
||||
|
||||
|
||||
valueText = new TextStencilElement(Minecraft.getInstance().fontRenderer, "YEP").centered(true, true);
|
||||
valueText.withElementRenderer((ms, width, height, alpha) -> UIRenderHelper.angledGradient(ms, 0, 0, height / 2,
|
||||
height, width, Theme.p(Theme.Key.TEXT)));
|
||||
|
@ -78,7 +80,7 @@ public class EnumEntry extends ValueEntry<Enum<?>> {
|
|||
cycleLeft.y = y + 10;
|
||||
cycleLeft.render(ms, mouseX, mouseY, partialTicks);
|
||||
|
||||
valueText.at(cycleLeft.x + cycleWidth - 8, y + 11, 200)
|
||||
valueText.at(cycleLeft.x + cycleWidth - 8, y + 10, 200)
|
||||
.withBounds(width - getLabelWidth(width) - 2 * cycleWidth - resetWidth - 4, 16)
|
||||
.render(ms);
|
||||
|
||||
|
@ -97,6 +99,10 @@ public class EnumEntry extends ValueEntry<Enum<?>> {
|
|||
@Override
|
||||
public void onValueChange(Enum<?> newValue) {
|
||||
super.onValueChange(newValue);
|
||||
valueText.withText(newValue.name());
|
||||
valueText.withText(newValue.name()
|
||||
.substring(0, 1)
|
||||
+ newValue.name()
|
||||
.substring(1)
|
||||
.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,12 @@ public class Theme {
|
|||
public static void setTheme(@Nullable Theme theme) {
|
||||
custom = theme;
|
||||
}
|
||||
|
||||
public static void reload() {
|
||||
base.init();
|
||||
if (custom != null)
|
||||
custom.init();
|
||||
}
|
||||
|
||||
private static ColorHolder resolve(String key) {
|
||||
ColorHolder h = null;
|
||||
|
@ -58,25 +64,29 @@ public class Theme {
|
|||
}
|
||||
|
||||
protected void init() {
|
||||
put(Key.BUTTON_IDLE, new Color(0x60_c0c0ff, true), new Color(0x30_c0c0ff, true));
|
||||
put(Key.BUTTON_HOVER, new Color(0xa0_c0c0ff, true), new Color(0x50_c0c0ff, true));
|
||||
put(Key.BUTTON_CLICK, new Color(0xff_4b4bff), new Color(0xff_3b3bdd));
|
||||
put(Key.BUTTON_DISABLE, new Color(0x80_909090, true), new Color(0x20_909090, true));
|
||||
put(Key.BUTTON_IDLE, new Color(0xdd_8ab6d6, true), new Color(0x90_8ab6d6, true));
|
||||
put(Key.BUTTON_HOVER, new Color(0xff_9ABBD3, true), new Color(0xd0_9ABBD3, true));
|
||||
put(Key.BUTTON_CLICK, new Color(0xff_ffffff), new Color(0xee_ffffff));
|
||||
put(Key.BUTTON_DISABLE, new Color(0x80_909090, true), new Color(0x60_909090, true));
|
||||
put(Key.BUTTON_SUCCESS, new Color(0xcc_88f788, true), new Color(0xcc_20cc20, true));
|
||||
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_7b7ba3));
|
||||
put(Key.TEXT_ACCENT_STRONG, new Color(0xff_8ab6d6), new Color(0xff_8ab6d6));
|
||||
put(Key.TEXT_ACCENT_SLIGHT, new Color(0xff_ddeeff), new Color(0xff_a0b0c0));
|
||||
put(Key.STREAK, new Color(0x101010, false));
|
||||
|
||||
put(Key.PONDER_BUTTON_IDLE, new Color(0x60_c0c0ff, true), new Color(0x30_c0c0ff, true));
|
||||
put(Key.PONDER_BUTTON_HOVER, new Color(0xf0_c0c0ff, true), new Color(0xa0_c0c0ff, true));
|
||||
put(Key.PONDER_BUTTON_CLICK, new Color(0xff_ffffff), new Color(0xdd_ffffff));
|
||||
put(Key.PONDER_BUTTON_DISABLE, new Color(0x80_909090, true), new Color(0x20_909090, true));
|
||||
put(Key.PONDER_BACKGROUND_TRANSPARENT, new Color(0xdd_000000, true));
|
||||
put(Key.PONDER_BACKGROUND_FLAT, new Color(0xff_000000, false));
|
||||
put(Key.PONDER_IDLE, new Color(0x40ffeedd, true), new Color(0x20ffeedd, true));
|
||||
put(Key.PONDER_HOVER, new Color(0x70ffffff, true), new Color(0x30ffffff, true));
|
||||
put(Key.PONDER_HIGHLIGHT, new Color(0xf0ffeedd, true), new Color(0x60ffeedd, true));
|
||||
put(Key.TEXT_WINDOW_BORDER, new Color(0x607a6000, true), new Color(0x207a6000, true));
|
||||
put(Key.PONDER_BACK_ARROW, new Color(0x70aa9999, true), new Color(0x30aa9999, true));
|
||||
put(Key.PONDER_BACK_ARROW, new Color(0xf0aa9999, true), new Color(0x30aa9999, true));
|
||||
put(Key.PONDER_PROGRESSBAR, new Color(0x80ffeedd, true), new Color(0x50ffeedd, true));
|
||||
put(Key.PONDER_MISSING_CREATE, new Color(0x70_984500, true), new Color(0x70_692400, true));
|
||||
put(Key.PONDER_MISSING_VANILLA, new Color(0x50_5000ff, true), new Color(0x50_300077, true));
|
||||
|
@ -129,6 +139,11 @@ public class Theme {
|
|||
public static Key PONDER_PROGRESSBAR = new Key();
|
||||
public static Key PONDER_MISSING_CREATE = new Key();
|
||||
public static Key PONDER_MISSING_VANILLA = new Key();
|
||||
|
||||
public static Key PONDER_BUTTON_IDLE = new Key();
|
||||
public static Key PONDER_BUTTON_HOVER = new Key();
|
||||
public static Key PONDER_BUTTON_CLICK = new Key();
|
||||
public static Key PONDER_BUTTON_DISABLE = new Key();
|
||||
|
||||
private static int index = 0;
|
||||
|
||||
|
|
|
@ -95,13 +95,13 @@ public class CreateMainMenuScreen extends AbstractSimiScreen {
|
|||
gettingStarted.active = false;
|
||||
addButton(gettingStarted);
|
||||
|
||||
String feedbackLink = "https://discord.gg/hmaD7Se";
|
||||
String projectLink = "https://www.curseforge.com/minecraft/mc-mods/create";
|
||||
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"),
|
||||
addButton(new Button(center - 100, yStart + 68, bShortWidth, bHeight,
|
||||
Lang.translate("menu.project_page"), $ -> linkTo(projectLink)));
|
||||
addButton(new Button(center + 2, yStart + 68, bShortWidth, bHeight, Lang.translate("menu.report_bugs"),
|
||||
$ -> linkTo(issueTrackerLink)));
|
||||
addButton(new Button(center - 100, yStart + 92, bLongWidth, bHeight, Lang.translate("menu.support"),
|
||||
$ -> linkTo(supportLink)));
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
|||
import com.simibubi.create.foundation.gui.BoxElement;
|
||||
import com.simibubi.create.foundation.gui.DelegatedStencilElement;
|
||||
import com.simibubi.create.foundation.gui.Theme;
|
||||
import com.simibubi.create.foundation.gui.Theme.Key;
|
||||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
|
@ -24,9 +25,11 @@ public class BoxWidget extends ElementWidget {
|
|||
protected Color customBorderBot;
|
||||
protected boolean animateColors = true;
|
||||
protected LerpedFloat colorAnimation = LerpedFloat.linear();
|
||||
|
||||
protected Color gradientColor1, gradientColor2;
|
||||
private Color colorTarget1 = Theme.c(Theme.Key.BUTTON_IDLE, true), colorTarget2 = Theme.c(Theme.Key.BUTTON_IDLE, false);
|
||||
private Color previousColor1, previousColor2;
|
||||
private Color colorTarget1 = Theme.c(getIdleTheme(), true);
|
||||
private Color colorTarget2 = Theme.c(getIdleTheme(), false);
|
||||
|
||||
public BoxWidget() {
|
||||
this(0, 0);
|
||||
|
@ -84,8 +87,8 @@ public class BoxWidget extends ElementWidget {
|
|||
public void onClick(double x, double y) {
|
||||
super.onClick(x, y);
|
||||
|
||||
gradientColor1 = Theme.c(Theme.Key.BUTTON_CLICK, true);
|
||||
gradientColor2 = Theme.c(Theme.Key.BUTTON_CLICK, true);
|
||||
gradientColor1 = Theme.c(getClickTheme(), true);
|
||||
gradientColor2 = Theme.c(getClickTheme(), false);
|
||||
startGradientAnimation(getColorForState(true), getColorForState(false), true, 0.15);
|
||||
}
|
||||
|
||||
|
@ -175,23 +178,40 @@ public class BoxWidget extends ElementWidget {
|
|||
}
|
||||
|
||||
private void startGradientAnimation(Color c1, Color c2, boolean positive) {
|
||||
startGradientAnimation(c1, c2, positive, 0.3);
|
||||
startGradientAnimation(c1, c2, positive, 0.6);
|
||||
}
|
||||
|
||||
private Color getColorForState(boolean first) {
|
||||
if (!active)
|
||||
return Theme.p(Theme.Key.BUTTON_DISABLE).get(first);
|
||||
return Theme.p(getDisabledTheme()).get(first);
|
||||
|
||||
if (hovered) {
|
||||
if (first)
|
||||
return customBorderTop != null ? customBorderTop.darker() : Theme.c(Theme.Key.BUTTON_HOVER, true);
|
||||
return customBorderTop != null ? customBorderTop.darker() : Theme.c(getHoverTheme(), true);
|
||||
else
|
||||
return customBorderBot != null ? customBorderBot.darker() : Theme.c(Theme.Key.BUTTON_HOVER, false);
|
||||
return customBorderBot != null ? customBorderBot.darker() : Theme.c(getHoverTheme(), false);
|
||||
}
|
||||
|
||||
if (first)
|
||||
return customBorderTop != null ? customBorderTop : Theme.c(Theme.Key.BUTTON_IDLE, true);
|
||||
return customBorderTop != null ? customBorderTop : Theme.c(getIdleTheme(), true);
|
||||
else
|
||||
return customBorderBot != null ? customBorderBot : Theme.c(Theme.Key.BUTTON_IDLE, false);
|
||||
return customBorderBot != null ? customBorderBot : Theme.c(getIdleTheme(), false);
|
||||
}
|
||||
|
||||
public Key getDisabledTheme() {
|
||||
return Theme.Key.BUTTON_DISABLE;
|
||||
}
|
||||
|
||||
public Key getIdleTheme() {
|
||||
return Theme.Key.BUTTON_IDLE;
|
||||
}
|
||||
|
||||
public Key getHoverTheme() {
|
||||
return Theme.Key.BUTTON_HOVER;
|
||||
}
|
||||
|
||||
public Key getClickTheme() {
|
||||
return Theme.Key.BUTTON_CLICK;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -693,7 +693,7 @@ public class PonderUI extends NavigatableSimiScreen {
|
|||
|
||||
chase.tickChaser();
|
||||
|
||||
if (highlightAll || sceneTags.contains(this.tags.get(i)))
|
||||
if (highlightAll)
|
||||
button.flash();
|
||||
else
|
||||
button.dim();
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
|||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||
import com.simibubi.create.foundation.gui.RenderElement;
|
||||
import com.simibubi.create.foundation.gui.Theme;
|
||||
import com.simibubi.create.foundation.gui.Theme.Key;
|
||||
import com.simibubi.create.foundation.gui.widgets.BoxWidget;
|
||||
import com.simibubi.create.foundation.gui.widgets.ElementWidget;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
@ -74,12 +75,12 @@ public class PonderButton extends BoxWidget {
|
|||
|
||||
float flashValue = flash.getValue(partialTicks);
|
||||
if (flashValue > .1f) {
|
||||
float sin = 0.5f + 0.5f * MathHelper.sin((AnimationTickHolder.getTicks(true) + partialTicks) / 6f);
|
||||
float sin = 0.5f + 0.5f * MathHelper.sin((AnimationTickHolder.getTicks(true) + partialTicks) / 5f);
|
||||
sin *= flashValue;
|
||||
Color c1 = gradientColor1;
|
||||
Color c2 = gradientColor2;
|
||||
Color nc1 = new Color(c1.getRed(), c1.getGreen(), c1.getBlue(), MathHelper.clamp(c1.getAlpha() + 50, 0, 255));
|
||||
Color nc2 = new Color(c2.getRed(), c2.getGreen(), c2.getBlue(), MathHelper.clamp(c2.getAlpha() + 50, 0, 255));
|
||||
Color nc1 = new Color(255, 255, 255, MathHelper.clamp(c1.getAlpha() + 150, 0, 255));
|
||||
Color nc2 = new Color(155, 155, 155, MathHelper.clamp(c2.getAlpha() + 150, 0, 255));
|
||||
gradientColor1 = ColorHelper.mixColors(c1, nc1, sin);
|
||||
gradientColor2 = ColorHelper.mixColors(c2, nc2, sin);
|
||||
}
|
||||
|
@ -102,4 +103,25 @@ public class PonderButton extends BoxWidget {
|
|||
public ItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key getDisabledTheme() {
|
||||
return Theme.Key.PONDER_BUTTON_DISABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key getIdleTheme() {
|
||||
return Theme.Key.PONDER_BUTTON_IDLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key getHoverTheme() {
|
||||
return Theme.Key.PONDER_BUTTON_HOVER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key getClickTheme() {
|
||||
return Theme.Key.PONDER_BUTTON_CLICK;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"create.menu.return": "Return to Menu",
|
||||
"create.menu.configure": "Configure...",
|
||||
"create.menu.getting_started": "Getting Started",
|
||||
"create.menu.send_feedback": "Feedback & Help",
|
||||
"create.menu.project_page": "Project Page",
|
||||
"create.menu.report_bugs": "Report Issues",
|
||||
"create.menu.support": "Support Us",
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.2 KiB |
Loading…
Reference in a new issue