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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
package binnie.craftgui.window;
import binnie.craftgui.controls.core.Control;
import binnie.craftgui.core.CraftGUI;
import binnie.craftgui.core.IWidget;
import binnie.craftgui.core.geometry.IArea;
import binnie.craftgui.core.renderer.Renderer;
import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
import binnie.craftgui.resource.minecraft.CraftGUITexture;
public class Panel
extends Control
{
IPanelType type;
public Panel(IWidget parent, float x, float y, float width, float height, IPanelType type)
{
super(parent, x, y, width, height);
this.type = type;
}
public Panel(IWidget parent, IArea area, IPanelType type)
{
this(parent, area.x(), area.y(), area.w(), area.h(), type);
}
public IPanelType getType()
{
return this.type;
}
public void onRenderBackground()
{
IPanelType panelType = getType();
if ((panelType instanceof MinecraftGUI.PanelType)) {
switch (1.$SwitchMap$binnie$craftgui$minecraft$MinecraftGUI$PanelType[((MinecraftGUI.PanelType)panelType).ordinal()])
{
case 1:
CraftGUI.Render.texture(CraftGUITexture.PanelBlack, getArea());
break;
case 2:
CraftGUI.Render.texture(CraftGUITexture.PanelGray, getArea());
break;
case 3:
CraftGUI.Render.texture(CraftGUITexture.PanelTinted, getArea());
break;
case 4:
CraftGUI.Render.texture(CraftGUITexture.Outline, getArea());
break;
case 5:
CraftGUI.Render.texture(CraftGUITexture.TabOutline, getArea());
break;
}
}
}
public static abstract interface IPanelType {}
}
|