Florian Nücke | 4adf4e1 | 2014-12-02 18:52:57 +0100 | [diff] [blame] | 1 | package li.cil.oc.client.gui |
| 2 | |
| 3 | import li.cil.oc.Localization |
| 4 | import li.cil.oc.client.Textures |
| 5 | import li.cil.oc.common.container |
| 6 | import li.cil.oc.common.tileentity |
| 7 | import net.minecraft.entity.player.InventoryPlayer |
| 8 | import org.lwjgl.opengl.GL11 |
| 9 | |
| 10 | class Raid(playerInventory: InventoryPlayer, val raid: tileentity.Raid) extends DynamicGuiContainer(new container.Raid(playerInventory, raid)) { |
Florian Nücke | f8277fe | 2015-01-15 16:37:28 +0100 | [diff] [blame] | 11 | override def drawSecondaryForegroundLayer(mouseX: Int, mouseY: Int) = { |
| 12 | super.drawSecondaryForegroundLayer(mouseX, mouseY) |
Florian Nücke | 4adf4e1 | 2014-12-02 18:52:57 +0100 | [diff] [blame] | 13 | fontRendererObj.drawString( |
| 14 | Localization.localizeImmediately(raid.getInventoryName), |
| 15 | 8, 6, 0x404040) |
| 16 | |
Florian Nücke | 347d10b | 2014-12-03 00:55:20 +0100 | [diff] [blame] | 17 | fontRendererObj.drawSplitString( |
Florian Nücke | 4adf4e1 | 2014-12-02 18:52:57 +0100 | [diff] [blame] | 18 | Localization.Raid.Warning, |
Florian Nücke | 347d10b | 2014-12-03 00:55:20 +0100 | [diff] [blame] | 19 | 8, 48, 0x404040, width - 16) |
Florian Nücke | 4adf4e1 | 2014-12-02 18:52:57 +0100 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | override def drawGuiContainerBackgroundLayer(dt: Float, mouseX: Int, mouseY: Int) { |
| 23 | GL11.glColor3f(1, 1, 1) // Required under Linux. |
Florian Nücke | 4adf4e1 | 2014-12-02 18:52:57 +0100 | [diff] [blame] | 24 | mc.renderEngine.bindTexture(Textures.guiRaid) |
| 25 | drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize) |
| 26 | } |
| 27 | } |