mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-12 09:30:22 -07:00
Refactored SignLink classes
This commit is contained in:
parent
8a35c73f76
commit
38800991cb
49 changed files with 741 additions and 748 deletions
|
|
@ -11,48 +11,48 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class CursorManager {
|
||||
|
||||
@OriginalMember(owner = "signlink!g", name = "b", descriptor = "Ljava/awt/Component;")
|
||||
private Component aComponent5;
|
||||
private Component component;
|
||||
|
||||
@OriginalMember(owner = "signlink!g", name = "a", descriptor = "Ljava/awt/Robot;")
|
||||
private final Robot aRobot1 = new Robot();
|
||||
private final Robot robot = new Robot();
|
||||
|
||||
@OriginalMember(owner = "signlink!g", name = "<init>", descriptor = "()V")
|
||||
public CursorManager() throws Exception {
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "signlink!g", name = "a", descriptor = "(BLjava/awt/Point;ILjava/awt/Component;I[I)V")
|
||||
public final void method5107(@OriginalArg(1) Point arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int[] arg4) {
|
||||
if (arg4 == null) {
|
||||
arg2.setCursor(null);
|
||||
public final void setCursor(@OriginalArg(1) Point hotSpot, @OriginalArg(2) int width, @OriginalArg(3) Component component, @OriginalArg(4) int height, @OriginalArg(5) int[] pixels) {
|
||||
if (pixels == null) {
|
||||
component.setCursor(null);
|
||||
} else {
|
||||
@Pc(13) BufferedImage local13 = new BufferedImage(arg1, arg3, 2);
|
||||
local13.setRGB(0, 0, arg1, arg3, arg4, 0, arg1);
|
||||
arg2.setCursor(arg2.getToolkit().createCustomCursor(local13, arg0, null));
|
||||
@Pc(13) BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||
image.setRGB(0, 0, width, height, pixels, 0, width);
|
||||
component.setCursor(component.getToolkit().createCustomCursor(image, hotSpot, null));
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "signlink!g", name = "a", descriptor = "(III)V")
|
||||
public final void method5108(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) {
|
||||
this.aRobot1.mouseMove(arg0, arg1);
|
||||
public final void setPosition(@OriginalArg(0) int x, @OriginalArg(2) int y) {
|
||||
this.robot.mouseMove(x, y);
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "signlink!g", name = "a", descriptor = "(Ljava/awt/Component;IZ)V")
|
||||
public final void method5109(@OriginalArg(0) Component arg0, @OriginalArg(2) boolean arg1) {
|
||||
if (arg1) {
|
||||
arg0 = null;
|
||||
} else if (arg0 == null) {
|
||||
public final void setComponent(@OriginalArg(0) Component component, @OriginalArg(2) boolean reset) {
|
||||
if (reset) {
|
||||
component = null;
|
||||
} else if (component == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
if (arg0 == this.aComponent5) {
|
||||
if (component == this.component) {
|
||||
return;
|
||||
}
|
||||
if (this.aComponent5 != null) {
|
||||
this.aComponent5.setCursor(null);
|
||||
this.aComponent5 = null;
|
||||
if (this.component != null) {
|
||||
this.component.setCursor(null);
|
||||
this.component = null;
|
||||
}
|
||||
if (arg0 != null) {
|
||||
arg0.setCursor(arg0.getToolkit().createCustomCursor(new BufferedImage(1, 1, 2), new Point(0, 0), null));
|
||||
this.aComponent5 = arg0;
|
||||
if (component != null) {
|
||||
component.setCursor(component.getToolkit().createCustomCursor(new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB), new Point(0, 0), null));
|
||||
this.component = component;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue