blob: 91f1ecf1ebd1d994d9d09cc791a6e22984a09217 [file] [log] [blame] [raw]
Florian Nücke4adf4e12014-12-02 18:52:57 +01001package li.cil.oc.client.gui
2
3import li.cil.oc.Localization
4import li.cil.oc.client.Textures
5import li.cil.oc.common.container
6import li.cil.oc.common.tileentity
7import net.minecraft.entity.player.InventoryPlayer
8import org.lwjgl.opengl.GL11
9
10class Raid(playerInventory: InventoryPlayer, val raid: tileentity.Raid) extends DynamicGuiContainer(new container.Raid(playerInventory, raid)) {
Florian Nückef8277fe2015-01-15 16:37:28 +010011 override def drawSecondaryForegroundLayer(mouseX: Int, mouseY: Int) = {
12 super.drawSecondaryForegroundLayer(mouseX, mouseY)
Florian Nücke4adf4e12014-12-02 18:52:57 +010013 fontRendererObj.drawString(
14 Localization.localizeImmediately(raid.getInventoryName),
15 8, 6, 0x404040)
16
Florian Nücke347d10b2014-12-03 00:55:20 +010017 fontRendererObj.drawSplitString(
Florian Nücke4adf4e12014-12-02 18:52:57 +010018 Localization.Raid.Warning,
Florian Nücke347d10b2014-12-03 00:55:20 +010019 8, 48, 0x404040, width - 16)
Florian Nücke4adf4e12014-12-02 18:52:57 +010020 }
21
22 override def drawGuiContainerBackgroundLayer(dt: Float, mouseX: Int, mouseY: Int) {
23 GL11.glColor3f(1, 1, 1) // Required under Linux.
Florian Nücke4adf4e12014-12-02 18:52:57 +010024 mc.renderEngine.bindTexture(Textures.guiRaid)
25 drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize)
26 }
27}