Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@
@Mixin(TitleScreen.class)
public class MTitleScreen extends Screen {

// Valid positions: "top_left" && "bottom_right".
// DM 8Blits if you would like to have the numbers be in another position, or if you want other texture changes.
private static final String NUM_LOCATION = "top_left";

private final Identifier identifier_main = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/df.png");
private final Identifier identifier_beta = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/beta.png");
private final Identifier identifier_node1 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/node1.png");
private final Identifier identifier_node2 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/node2.png");
private final Identifier identifier_node3 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/node3.png");
private final Identifier identifier_node4 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/node4-valley.png");
private final Identifier identifier_node5 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/node5.png");
private final Identifier identifier_beta = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/beta.png");
private final Identifier identifier_node1 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node1.png");
private final Identifier identifier_node2 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node2.png");
private final Identifier identifier_node3 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node3.png");
private final Identifier identifier_node4 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node4.png");
private final Identifier identifier_node5 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node5.png");
private final Identifier identifier_node6 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node6.png");
private final Identifier identifier_node7 = new Identifier(CodeUtilities.MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node7.png");

protected MTitleScreen(LiteralText title) {
super(title);
Expand All @@ -35,6 +41,7 @@ protected MTitleScreen(LiteralText title) {
public void drawMenuButton(int y, int spacingY, CallbackInfo info) {
if (Config.getBoolean("dfButton")) {
if (!Config.getBoolean("dfNodeButtons")) {
// Default Server Join
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104, y + spacingY, 20, 20, 0, 0, 20, identifier_main, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
Expand All @@ -50,54 +57,77 @@ public void drawMenuButton(int y, int spacingY, CallbackInfo info) {
modMenuButtonPresent = io.github.codeutilities.sys.util.ModMenuSupport.isModsButtonPresent();
}

// Default Server Join
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104, y - spacingY, 20, 20, 0, 0, 20, identifier_main, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF", "mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

// Node Beta
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 22, y - spacingY, 20, 20, 0, 0, 20, identifier_beta, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Beta", "beta.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104, y, 20, 20, 0, 0, 20, identifier_node1, 20, 40,
// Node 1
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 44, y - spacingY, 20, 20, 0, 0, 20, identifier_node1, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Node1", "node1.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 22, y, 20, 20, 0, 0, 20, identifier_node2, 20, 40,
// Node 2
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104, y, 20, 20, 0, 0, 20, identifier_node2, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Node2", "node2.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104, y + spacingY, 20, 20, 0, 0, 20, identifier_node3, 20, 40,
// Node 3
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 22, y, 20, 20, 0, 0, 20, identifier_node3, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Node3", "node3.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 22, y + spacingY, 20, 20, 0, 0, 20, identifier_node4, 20, 40,
// Node 4
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 44, y, 20, 20, 0, 0, 20, identifier_node4, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Node4", "node4.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + (modMenuButtonPresent ? 22 : 0), y + spacingY + 24, 20, 20, 0, 0, 20, identifier_node5, 20, 40,
// Node 5
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104, y + spacingY, 20, 20, 0, 0, 20, identifier_node5, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Node5", "node5.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

// Node 6
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 22, y + spacingY, 20, 20, 0, 0, 20, identifier_node6, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Node6", "node6.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));

// Node 7
this.addButton(new BlendableTexturedButtonWidget(this.width / 2 + 104 + 44, y + spacingY, 20, 20, 0, 0, 20, identifier_node7, 20, 40,
(button) -> {
MinecraftClient mc = MinecraftClient.getInstance();
ServerInfo serverInfo = new ServerInfo("DF Node7", "node7.mcdiamondfire.com:25565", false);
mc.openScreen(new ConnectScreen(mc.currentScreen, mc, serverInfo));
}));
}
}

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified src/main/resources/assets/codeutilities/textures/gui/df.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.