mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
94 lines
3.3 KiB
Diff
94 lines
3.3 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
|
@@ -1,5 +1,7 @@
|
|
package net.minecraft.client.gui;
|
|
|
|
+import cpw.mods.fml.client.GuiModList;
|
|
+import cpw.mods.fml.common.FMLCommonHandler;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import java.awt.image.BufferedImage;
|
|
@@ -11,6 +13,7 @@
|
|
import java.util.ArrayList;
|
|
import java.util.Calendar;
|
|
import java.util.Date;
|
|
+import java.util.List;
|
|
import java.util.Random;
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraft.client.renderer.Tessellator;
|
|
@@ -22,6 +25,9 @@
|
|
import net.minecraft.world.storage.WorldInfo;
|
|
import org.lwjgl.opengl.GL11;
|
|
import org.lwjgl.util.glu.GLU;
|
|
+
|
|
+import com.google.common.base.Strings;
|
|
+import com.google.common.collect.Lists;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public class GuiMainMenu extends GuiScreen
|
|
@@ -45,6 +51,8 @@
|
|
private int field_92020_v;
|
|
private int field_92019_w;
|
|
|
|
+ private GuiButton fmlModButton = null;
|
|
+
|
|
public GuiMainMenu()
|
|
{
|
|
BufferedReader bufferedreader = null;
|
|
@@ -143,6 +151,9 @@
|
|
{
|
|
this.func_73969_a(i, 24, stringtranslate);
|
|
}
|
|
+
|
|
+ fmlModButton = new GuiButton(6, this.field_73880_f / 2 - 100, i + 48, "Mods");
|
|
+ this.field_73887_h.add(fmlModButton);
|
|
|
|
this.func_96137_a(stringtranslate, i, 24);
|
|
|
|
@@ -197,7 +208,14 @@
|
|
|
|
private void func_98060_b(StringTranslate p_98060_1_, int p_98060_2_, int p_98060_3_)
|
|
{
|
|
- this.field_73887_h.add(new GuiButton(3, this.field_73880_f / 2 - 100, p_98060_2_ + p_98060_3_ * 2, p_98060_1_.func_74805_b("menu.online")));
|
|
+ //If Minecraft Realms is enabled, halve the size of both buttons and set them next to eachother.
|
|
+ fmlModButton.field_73747_a = 98;
|
|
+ fmlModButton.field_73746_c = this.field_73880_f / 2 + 2;
|
|
+
|
|
+ GuiButton realmButton = new GuiButton(3, this.field_73880_f / 2 - 100, p_98060_2_ + p_98060_3_ * 2, p_98060_1_.func_74805_b("menu.online"));
|
|
+ realmButton.field_73747_a = 98;
|
|
+ realmButton.field_73746_c = this.field_73880_f / 2 - 100;
|
|
+ this.field_73887_h.add(realmButton);
|
|
}
|
|
|
|
private void func_73969_a(int p_73969_1_, int p_73969_2_, StringTranslate p_73969_3_)
|
|
@@ -249,6 +267,11 @@
|
|
if (p_73875_1_.field_73741_f == 4)
|
|
{
|
|
this.field_73882_e.func_71400_g();
|
|
+ }
|
|
+
|
|
+ if (p_73875_1_.field_73741_f == 6)
|
|
+ {
|
|
+ this.field_73882_e.func_71373_a(new GuiModList(this));
|
|
}
|
|
|
|
if (p_73875_1_.field_73741_f == 11)
|
|
@@ -487,7 +510,16 @@
|
|
s = s + " Demo";
|
|
}
|
|
|
|
- this.func_73731_b(this.field_73886_k, s, 2, this.field_73881_g - 10, 16777215);
|
|
+ List<String> brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings());
|
|
+ for (int i = 0; i < brandings.size(); i++)
|
|
+ {
|
|
+ String brd = brandings.get(i);
|
|
+ if (!Strings.isNullOrEmpty(brd))
|
|
+ {
|
|
+ this.func_73731_b(this.field_73886_k, brd, 2, this.field_73881_g - ( 10 + i * (this.field_73886_k.field_78288_b + 1)), 16777215);
|
|
+ }
|
|
+ }
|
|
+
|
|
String s1 = "Copyright Mojang AB. Do not distribute!";
|
|
this.func_73731_b(this.field_73886_k, s1, this.field_73880_f - this.field_73886_k.func_78256_a(s1) - 2, this.field_73881_g - 10, 16777215);
|
|
|