mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 02:44:50 +00:00
Events fixed
This commit is contained in:
10
app/pom.xml
10
app/pom.xml
@@ -19,5 +19,15 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>16</source>
|
||||||
|
<target>16</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,24 +1,25 @@
|
|||||||
package org.toop.events;
|
package org.toop.events;
|
||||||
|
|
||||||
|
import org.toop.framework.eventbus.events.EventWithoutUuid;
|
||||||
import org.toop.framework.eventbus.events.Events;
|
import org.toop.framework.eventbus.events.Events;
|
||||||
|
|
||||||
public class WindowEvents extends Events {
|
public class WindowEvents extends Events {
|
||||||
|
|
||||||
/** Triggers when a cell is clicked in one of the game boards. */
|
/** Triggers when a cell is clicked in one of the game boards. */
|
||||||
public record CellClicked(int cell) {}
|
public record CellClicked(int cell) implements EventWithoutUuid {}
|
||||||
|
|
||||||
/** Triggers when the window wants to quit. */
|
/** Triggers when the window wants to quit. */
|
||||||
public record OnQuitRequested() implements IEvent {}
|
public record OnQuitRequested() implements EventWithoutUuid {}
|
||||||
|
|
||||||
/** Triggers when the window is resized. */
|
/** Triggers when the window is resized. */
|
||||||
// public record OnResize(Window.Size size) {}
|
// public record OnResize(Window.Size size) implements EventWithoutUuid {}
|
||||||
|
|
||||||
/** Triggers when the mouse is moved within the window. */
|
/** Triggers when the mouse is moved within the window. */
|
||||||
public record OnMouseMove(int x, int y) implements IEvent {}
|
public record OnMouseMove(int x, int y) implements EventWithoutUuid {}
|
||||||
|
|
||||||
/** Triggers when the mouse is clicked within the window. */
|
/** Triggers when the mouse is clicked within the window. */
|
||||||
public record OnMouseClick(int button) {}
|
public record OnMouseClick(int button) implements EventWithoutUuid {}
|
||||||
|
|
||||||
/** Triggers when the mouse is released within the window. */
|
/** Triggers when the mouse is released within the window. */
|
||||||
public record OnMouseRelease(int button) {}
|
public record OnMouseRelease(int button) implements EventWithoutUuid {}
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ public class NetworkEvents extends Events {
|
|||||||
*
|
*
|
||||||
* @param connectionId The identifier of the connection being reconnected.
|
* @param connectionId The identifier of the connection being reconnected.
|
||||||
*/
|
*/
|
||||||
public record Reconnect(Object connectionId) {}
|
public record Reconnect(Object connectionId) implements EventWithoutUuid {}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,7 +161,7 @@ public class NetworkEvents extends Events {
|
|||||||
* @param ip The new IP address.
|
* @param ip The new IP address.
|
||||||
* @param port The new port.
|
* @param port The new port.
|
||||||
*/
|
*/
|
||||||
public record ChangeClient(Object connectionId, String ip, int port) {}
|
public record ChangeClient(Object connectionId, String ip, int port) implements EventWithoutUuid {}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -169,9 +169,9 @@ public class NetworkEvents extends Events {
|
|||||||
*
|
*
|
||||||
* @param connectionId The identifier of the connection that failed.
|
* @param connectionId The identifier of the connection that failed.
|
||||||
*/
|
*/
|
||||||
public record CouldNotConnect(Object connectionId) {}
|
public record CouldNotConnect(Object connectionId) implements EventWithoutUuid {}
|
||||||
|
|
||||||
/** WIP Triggers when a connection closes. */
|
/** WIP Triggers when a connection closes. */
|
||||||
public record ClosedConnection() {}
|
public record ClosedConnection() implements EventWithoutUuid {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user