001/* 002 * Forge Mod Loader 003 * Copyright (c) 2012-2013 cpw. 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser Public License v2.1 006 * which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 008 * 009 * Contributors: 010 * cpw - implementation 011 */ 012 013package cpw.mods.fml.client; 014 015import net.minecraft.client.gui.GuiErrorScreen; 016import cpw.mods.fml.common.MissingModsException; 017import cpw.mods.fml.common.versioning.ArtifactVersion; 018 019public class GuiModsMissing extends GuiErrorScreen 020{ 021 022 private MissingModsException modsMissing; 023 024 public GuiModsMissing(MissingModsException modsMissing) 025 { 026 this.modsMissing = modsMissing; 027 } 028 029 @Override 030 031 /** 032 * Adds the buttons (and other controls) to the screen in question. 033 */ 034 public void initGui() 035 { 036 super.initGui(); 037 } 038 @Override 039 040 /** 041 * Draws the screen and all the components in it. 042 */ 043 public void drawScreen(int par1, int par2, float par3) 044 { 045 this.drawDefaultBackground(); 046 int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10); 047 this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF); 048 offset+=10; 049 this.drawCenteredString(this.fontRenderer, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF); 050 offset+=5; 051 for (ArtifactVersion v : modsMissing.missingMods) 052 { 053 offset+=10; 054 this.drawCenteredString(this.fontRenderer, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE); 055 } 056 offset+=20; 057 this.drawCenteredString(this.fontRenderer, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF); 058 } 059}