mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-23 21:49:45 +00:00
books will be fully translatable once someone does the .lang files
This commit is contained in:
1 parent
5f962eabf0
commit
c029bd8eef
6 files changed
+94
-129
No files matched your search
@@ -5,16 +5,12 @@ import java.util.List;
|
||||
|
||||
import mantle.crash.CallableSuppConfig;
|
||||
import mantle.crash.CallableUnsuppConfig;
|
||||
import net.minecraft.client.gui.GuiMainMenu;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.ICrashCallable;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnvironmentChecks
|
||||
{
|
||||
@@ -73,17 +69,4 @@ public class EnvironmentChecks
|
||||
return "";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void openMainMenu (GuiOpenEvent event)
|
||||
{
|
||||
if (event.gui instanceof GuiMainMenu)
|
||||
{
|
||||
if (incompatibilities.size() > 0)
|
||||
{
|
||||
event.gui = new EnvironmentGui(event.gui, incompatibilities);
|
||||
}
|
||||
MinecraftForge.EVENT_BUS.unregister(instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package tconstruct.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.world.storage.ISaveFormat;
|
||||
import net.minecraft.world.storage.WorldInfo;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class EnvironmentGui extends GuiScreen
|
||||
{
|
||||
private GuiScreen parentGuiScreen;
|
||||
//private GuiTextField theGuiTextField;
|
||||
private final List<String> mods;
|
||||
StringBuilder builder = new StringBuilder();
|
||||
int count = 0;
|
||||
|
||||
public EnvironmentGui(GuiScreen par1GuiScreen, List<String> modlist)
|
||||
{
|
||||
this.parentGuiScreen = par1GuiScreen;
|
||||
this.mods = modlist;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the buttons (and other controls) to the screen in question.
|
||||
*/
|
||||
public void initGui ()
|
||||
{
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
this.field_146292_n.clear();
|
||||
this.field_146292_n.add(new GuiButton(0, this.field_146294_l / 2 - 175, this.field_146295_m / 4 + 96 + 24, 350, 20, I18n.getStringParams("I accept responsibility for all cross-mod bugs in this modpack.")));
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 175, this.field_146295_m / 4 + 120 + 24, 350, 20, I18n.getStringParams("I do not want to run these mods together. (Exits Minecraft)")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the screen is unloaded. Used to disable keyboard repeat events
|
||||
*/
|
||||
public void func_146281_b ()
|
||||
{
|
||||
Keyboard.enableRepeatEvents(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
|
||||
*/
|
||||
protected void func_146284_a (GuiButton button)
|
||||
{
|
||||
if (button.field_146124_l)
|
||||
{
|
||||
if (button.field_146127_k == 0)
|
||||
{
|
||||
count++;
|
||||
if (count >= mods.size())
|
||||
this.field_146297_k.func_147108_a(this.parentGuiScreen);
|
||||
}
|
||||
if (button.field_146127_k == 1)
|
||||
{
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the screen and all the components in it.
|
||||
*/
|
||||
public void drawScreen (int par1, int par2, float par3)
|
||||
{
|
||||
builder.setLength(0);
|
||||
this.func_146276_q_();
|
||||
String mod = mods.get(count);
|
||||
this.drawCenteredString(this.field_146289_q, I18n.getStringParams("Tinkers' Construct is not compatible with "+mod), this.field_146294_l / 2, 20, 0xFFFFFF);
|
||||
this.drawCenteredString(this.field_146289_q, I18n.getStringParams("The following reasons are given:"), this.field_146294_l / 2, 32, 0xFFFFFF);
|
||||
field_146289_q.drawSplitString(I18n.getStringParams(EnvironmentChecks.modCompatDetails(mod, false)), 20, 52, 400, 0xffffff);
|
||||
|
||||
this.drawCenteredString(this.field_146289_q, I18n.getStringParams("The Tinkers' Construct team will not accept bug reports with this mod installed."), this.field_146294_l / 2, 153, 0xFFFFFF);
|
||||
this.drawCenteredString(this.field_146289_q, I18n.getStringParams("We apologize for any inconvenience this may cause you."), this.field_146294_l / 2, 165, 0xFFFFFF);
|
||||
super.drawScreen(par1, par2, par3);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user