mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
Disabled error prone for now. Improved eventflow speed
This commit is contained in:
@@ -7,7 +7,7 @@ import javax.swing.*;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.toop.framework.eventbus.EventFlow;
|
||||
import org.toop.framework.eventbus.events.NetworkEvents;
|
||||
import org.toop.framework.networking.events.NetworkEvents;
|
||||
import org.toop.tictactoe.LocalTicTacToe;
|
||||
import org.toop.framework.networking.NetworkingGameClientHandler;
|
||||
import org.toop.tictactoe.gui.UIGameBoard;
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
package org.toop.events;
|
||||
|
||||
import org.toop.framework.eventbus.events.EventWithoutUuid;
|
||||
import org.toop.framework.eventbus.events.Events;
|
||||
import org.toop.framework.eventbus.events.EventWithoutSnowflake;
|
||||
import org.toop.framework.eventbus.events.EventsBase;
|
||||
|
||||
public class WindowEvents extends Events {
|
||||
public class WindowEvents extends EventsBase {
|
||||
|
||||
/** Triggers when a cell is clicked in one of the game boards. */
|
||||
public record CellClicked(int cell) implements EventWithoutUuid {}
|
||||
public record CellClicked(int cell) implements EventWithoutSnowflake {}
|
||||
|
||||
/** Triggers when the window wants to quit. */
|
||||
public record OnQuitRequested() implements EventWithoutUuid {}
|
||||
public record OnQuitRequested() implements EventWithoutSnowflake {}
|
||||
|
||||
/** Triggers when the window is resized. */
|
||||
// public record OnResize(Window.Size size) implements EventWithoutUuid {}
|
||||
// public record OnResize(Window.Size size) implements EventWithoutSnowflake {}
|
||||
|
||||
/** Triggers when the mouse is moved within the window. */
|
||||
public record OnMouseMove(int x, int y) implements EventWithoutUuid {}
|
||||
public record OnMouseMove(int x, int y) implements EventWithoutSnowflake {}
|
||||
|
||||
/** Triggers when the mouse is clicked within the window. */
|
||||
public record OnMouseClick(int button) implements EventWithoutUuid {}
|
||||
public record OnMouseClick(int button) implements EventWithoutSnowflake {}
|
||||
|
||||
/** Triggers when the mouse is released within the window. */
|
||||
public record OnMouseRelease(int button) implements EventWithoutUuid {}
|
||||
public record OnMouseRelease(int button) implements EventWithoutSnowflake {}
|
||||
}
|
||||
@@ -5,12 +5,10 @@ import java.util.concurrent.*;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.toop.framework.eventbus.EventFlow;
|
||||
import org.toop.framework.eventbus.events.Events;
|
||||
import org.toop.framework.eventbus.events.NetworkEvents;
|
||||
import org.toop.framework.networking.events.NetworkEvents;
|
||||
import org.toop.game.GameBase;
|
||||
import org.toop.tictactoe.gui.UIGameBoard;
|
||||
import org.toop.framework.networking.NetworkingGameClientHandler;
|
||||
import org.toop.tictactoe.TicTacToeAI;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user