001 package cpw.mods.fml.client; 002 003 import net.minecraft.client.gui.GuiErrorScreen; 004 import cpw.mods.fml.common.MissingModsException; 005 import cpw.mods.fml.common.versioning.ArtifactVersion; 006 007 public class GuiModsMissing extends GuiErrorScreen 008 { 009 010 private MissingModsException modsMissing; 011 012 public GuiModsMissing(MissingModsException modsMissing) 013 { 014 this.modsMissing = modsMissing; 015 } 016 017 @Override 018 019 /** 020 * Adds the buttons (and other controls) to the screen in question. 021 */ 022 public void initGui() 023 { 024 super.initGui(); 025 } 026 @Override 027 028 /** 029 * Draws the screen and all the components in it. 030 */ 031 public void drawScreen(int par1, int par2, float par3) 032 { 033 this.drawDefaultBackground(); 034 int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10); 035 this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF); 036 offset+=10; 037 this.drawCenteredString(this.fontRenderer, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF); 038 offset+=5; 039 for (ArtifactVersion v : modsMissing.missingMods) 040 { 041 offset+=10; 042 this.drawCenteredString(this.fontRenderer, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE); 043 } 044 offset+=20; 045 this.drawCenteredString(this.fontRenderer, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF); 046 } 047 }