Fixed framework and moved window events to app

This commit is contained in:
lieght
2025-09-24 16:53:29 +02:00
parent 05e2b27330
commit e590941e2f
9 changed files with 54 additions and 141 deletions

View File

@@ -8,6 +8,14 @@
<properties>
<main-class>org.toop.Main</main-class>
</properties>
<dependencies>
<dependency>
<groupId>org.toop</groupId>
<artifactId>pism_framework</artifactId>
<version>0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

View File

@@ -0,0 +1,24 @@
package org.toop.events;
import org.toop.framework.eventbus.events.Events;
public class WindowEvents extends Events {
/** Triggers when a cell is clicked in one of the game boards. */
public record CellClicked(int cell) {}
/** Triggers when the window wants to quit. */
public record OnQuitRequested() implements IEvent {}
/** Triggers when the window is resized. */
// public record OnResize(Window.Size size) {}
/** Triggers when the mouse is moved within the window. */
public record OnMouseMove(int x, int y) implements IEvent {}
/** Triggers when the mouse is clicked within the window. */
public record OnMouseClick(int button) {}
/** Triggers when the mouse is released within the window. */
public record OnMouseRelease(int button) {}
}