aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/detrav/gui/DetravGuiProPick.java
blob: ebb098f6a3f4f35c71ca5d516718bc7a2c294c8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.detrav.gui;

import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.texture.TextureUtil;

/**
 * Created by wital_000 on 21.03.2016.
 */
public class DetravGuiProPick extends GuiScreen {
    public static final int GUI_ID = 20;
    private static DetravMapTexture map = null;
    public DetravGuiProPick()
    {

    }

    public static void newMap(DetravMapTexture aMap) {
        if (map != null) {
            map.deleteGlTexture();
            map = null;
        }
        map = aMap;
        map.loadTexture(null);
    }



    @Override
    public void  drawScreen(int x, int y, float f) {
        this.drawDefaultBackground();
        if(map!=null)
        {
            int aX = (this.width - map.width)/2;
            int aY = (this.height - map.height)/2;
            map.glBindTexture();
            map.draw(aX,aY);
            //this.drawTexturedModalRect(aX,aY,0,0,map.width,map.height);
        }
        //TextureUtil.glGenTextures()
        //this.mc.renderEngine.bindTexture();
        //this.drawTexturedModelRectFromIcon();
        //this.drawTexturedModalRect();
    }
}