full function keybinds
This commit is contained in:
parent
dc1e189d38
commit
d70d0dc0d0
8 changed files with 451 additions and 63 deletions
|
@ -1,36 +0,0 @@
|
|||
package me.kawaiizenbo.moonlight.ui.clickgui;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
public class KeybindScreen extends Screen
|
||||
{
|
||||
public int returnedKeycode = 0;
|
||||
|
||||
public KeybindScreen()
|
||||
{
|
||||
super(Text.literal("Keybind Selector"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(DrawContext drawContext, int mouseX, int mouseY, float delta)
|
||||
{
|
||||
this.renderBackground(drawContext, mouseX, mouseY, delta);
|
||||
drawContext.drawCenteredTextWithShadow(textRenderer, "Press any key (may not work, use .setting instead)", width/2, height/2, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
returnedKeycode = keyCode;
|
||||
this.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldPause()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ public class SettingsScreen extends Screen
|
|||
private TextButton backButton;
|
||||
|
||||
boolean dragging = false;
|
||||
int startX, startY, x = 4, y = 4, windowWidth = 224, windowHeight = 192;
|
||||
int startX, startY, x = (ClickGUIScreen.INSTANCE.width/2)-112, y = (ClickGUIScreen.INSTANCE.height/2)-96, windowWidth = 224, windowHeight = 192;
|
||||
|
||||
public SettingsScreen(Module module)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue