mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
Feat: ClickGUI Base
This commit is contained in:
1 parent
353c3b56d0
commit
fc03b2db9b
4 files changed
+35
-1
No files matched your search
@@ -29,7 +29,10 @@ public class ModuleManager {
|
||||
public void registerModules() {
|
||||
OrangeX.getInstance().getEventBus().register(this);
|
||||
addModule(new TestModule());
|
||||
|
||||
// Render
|
||||
addModule(new HUD());
|
||||
addModule(new ClickGUI());
|
||||
}
|
||||
|
||||
public List<Module> getModulesByCategory(ModuleCategory category) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.awt.event.KeyEvent;
|
||||
|
||||
public class TestModule extends Module {
|
||||
public TestModule() {
|
||||
super("Test", "A test module", ModuleCategory.MISC, Keyboard.KEY_SPACE);
|
||||
super("Test", "A test module", ModuleCategory.MISC);
|
||||
|
||||
addOption(new BooleanOption("boolean", "Boolean option", this, true));
|
||||
addOption(new DoubleOption("double", "Double slider", this, 0.5, 0.0, 1.0, 0.05, 2));
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.xiaozhou233.orangex.module.impl.render;
|
||||
|
||||
import cn.xiaozhou233.orangex.event.impl.EventKey;
|
||||
import cn.xiaozhou233.orangex.module.Module;
|
||||
import cn.xiaozhou233.orangex.module.ModuleCategory;
|
||||
import cn.xiaozhou233.orangex.ui.clickgui.ClickGUIScreen;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class ClickGUI extends Module {
|
||||
public ClickGUI() {
|
||||
super("ClickGUI", "ClickGUI", ModuleCategory.RENDER);
|
||||
setKey(Keyboard.KEY_RSHIFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onEnable() {
|
||||
mc.displayGuiScreen(new ClickGUIScreen());
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onKey(EventKey eventKey) {
|
||||
// unused, but necessary for eventbus
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package cn.xiaozhou233.orangex.ui.clickgui;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class ClickGUIScreen extends GuiScreen {
|
||||
}
|
||||
Reference in new issue
Block a user