blob: 2cbe9b8c0b4ca933dc4295d323f565dd11e2e0d9 (
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
|
package com.arslaancodes.arslaansmagichax.screens.clickgui.setting;
import com.arslaancodes.arslaansmagichax.modules.settings.Setting;
import com.arslaancodes.arslaansmagichax.screens.clickgui.ModuleButton;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.DrawContext;
public class Component {
public Setting setting;
public ModuleButton parent;
public int offset;
protected static Minecraft mc = Minecraft.getInstance();
public Component(Setting setting, ModuleButton parent, int offset) {
this.setting = setting;
this.parent = parent;
this.offset = offset;
}
public void render(DrawContext context, int mouseX, int mouseY, float deltaTicks) {
}
public void mouseClicked(double mouseX, double mouseY, int button) {
}
public void mouseReleased(double mouseX, double mouseY, int button) {
}
public boolean isHovered(double mouseX, double mouseY) {
return mouseX > parent.parent.x && mouseX < parent.parent.x + parent.parent.width && mouseY > parent.parent.y + parent.offset + offset && mouseY < parent.parent.y + parent.offset + offset + parent.parent.height;
}
}
|