Добавлена обработка курсора от Android-клиента
This commit is contained in:
parent
76a7955ae1
commit
d4d0af8c55
@ -30,6 +30,8 @@ public class CursorOperation extends Operation {
|
|||||||
TYPE_RELEASED = 4,
|
TYPE_RELEASED = 4,
|
||||||
TYPE_KEY_RELEASED = 5,
|
TYPE_KEY_RELEASED = 5,
|
||||||
TYPE_MOVE_RELATIVE = 6,
|
TYPE_MOVE_RELATIVE = 6,
|
||||||
|
TYPE_MOUSE_PRESSED = 7,
|
||||||
|
TYPE_MOUSE_RELEASED = 8,
|
||||||
STOP = 10;
|
STOP = 10;
|
||||||
|
|
||||||
private RobotUtils robot;
|
private RobotUtils robot;
|
||||||
@ -97,6 +99,12 @@ public class CursorOperation extends Operation {
|
|||||||
int x = (int) (dis.readInt());
|
int x = (int) (dis.readInt());
|
||||||
int y = (int) (dis.readInt());
|
int y = (int) (dis.readInt());
|
||||||
robot.moveCursorRelative(x, y);
|
robot.moveCursorRelative(x, y);
|
||||||
|
} else if (type == TYPE_MOUSE_PRESSED) {
|
||||||
|
int button = dis.readInt();
|
||||||
|
robot.getRobot().mousePress(button);
|
||||||
|
} else if (type == TYPE_MOUSE_RELEASED) {
|
||||||
|
int button = dis.readInt();
|
||||||
|
robot.getRobot().mouseRelease(button);
|
||||||
} else if (type == TYPE_RELEASED) {
|
} else if (type == TYPE_RELEASED) {
|
||||||
robot.getRobot().mouseRelease(InputEvent.BUTTON1_MASK);
|
robot.getRobot().mouseRelease(InputEvent.BUTTON1_MASK);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user