29 lines
777 B
Java
29 lines
777 B
Java
package cz.jzitnik.events;
|
|
|
|
import com.googlecode.lanterna.TerminalSize;
|
|
import cz.jzitnik.utils.events.Event;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Data;
|
|
|
|
import java.awt.*;
|
|
|
|
public record RerenderScreen(ScreenPart[] parts) implements Event {
|
|
public static RerenderScreen full(TerminalSize terminalSize) {
|
|
return new RerenderScreen(
|
|
new ScreenPart[]{
|
|
new ScreenPart(
|
|
new Point(0, 0),
|
|
new Point(terminalSize.getRows() - 1, terminalSize.getColumns() - 1)
|
|
)
|
|
}
|
|
);
|
|
}
|
|
|
|
@Data
|
|
@AllArgsConstructor
|
|
public static class ScreenPart {
|
|
private Point start;
|
|
private Point end;
|
|
}
|
|
}
|