parent
4034cfe9dc
commit
d5549d770d
1 changed files with 3 additions and 2 deletions
|
@ -10,10 +10,12 @@ import net.minecraft.client.gui.GuiSlot;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.client.renderer.texture.TextureMap;
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
|
import net.minecraft.client.resources.ResourceLocation;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
|
||||||
public class GuiControlsScrollPanel extends GuiSlot
|
public class GuiControlsScrollPanel extends GuiSlot
|
||||||
{
|
{
|
||||||
|
protected static final ResourceLocation WIDGITS = new ResourceLocation("textures/gui/widgets.png");
|
||||||
private GuiControls controls;
|
private GuiControls controls;
|
||||||
private GameSettings options;
|
private GameSettings options;
|
||||||
private Minecraft mc;
|
private Minecraft mc;
|
||||||
|
@ -73,7 +75,6 @@ public class GuiControlsScrollPanel extends GuiSlot
|
||||||
{
|
{
|
||||||
if (Mouse.next() && Mouse.getEventButtonState())
|
if (Mouse.next() && Mouse.getEventButtonState())
|
||||||
{
|
{
|
||||||
System.out.println(Mouse.getEventButton());
|
|
||||||
options.setKeyBinding(selected, -100 + Mouse.getEventButton());
|
options.setKeyBinding(selected, -100 + Mouse.getEventButton());
|
||||||
selected = -1;
|
selected = -1;
|
||||||
KeyBinding.resetKeyBindingArrayAndHash();
|
KeyBinding.resetKeyBindingArrayAndHash();
|
||||||
|
@ -92,7 +93,7 @@ public class GuiControlsScrollPanel extends GuiSlot
|
||||||
boolean flag = _mouseX >= xPosition && _mouseY >= yPosition && _mouseX < xPosition + width && _mouseY < yPosition + height;
|
boolean flag = _mouseX >= xPosition && _mouseY >= yPosition && _mouseX < xPosition + width && _mouseY < yPosition + height;
|
||||||
int k = (flag ? 2 : 1);
|
int k = (flag ? 2 : 1);
|
||||||
|
|
||||||
mc.renderEngine.func_110577_a(TextureMap.field_110576_c);
|
mc.renderEngine.func_110577_a(WIDGITS);
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
controls.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 20, width / 2, height);
|
controls.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 20, width / 2, height);
|
||||||
controls.drawTexturedModalRect(xPosition + width / 2, yPosition, 200 - width / 2, 46 + k * 20, width / 2, height);
|
controls.drawTexturedModalRect(xPosition + width / 2, yPosition, 200 - width / 2, 46 + k * 20, width / 2, height);
|
||||||
|
|
Loading…
Reference in a new issue