mirror of
https://inf.pirckheimer-gymnasium.de/kebab/kebab
synced 2026-08-26 16:31:23 +00:00
Implemented custom cursor
This commit is contained in:
@@ -1,13 +1,31 @@
|
|||||||
package project;
|
package project;
|
||||||
|
|
||||||
|
|
||||||
import pi.Controller;
|
import pi.Controller;
|
||||||
import project.scenes.LoadingScene;
|
import project.scenes.LoadingScene;
|
||||||
|
|
||||||
|
import java.awt.Cursor;
|
||||||
|
import java.awt.Point;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
import java.io.File;
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
public class Main
|
public class Main
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
Controller.instantMode(false);
|
Controller.instantMode(false);
|
||||||
Controller.start(new LoadingScene(), 1000, 600);
|
Controller.start(new LoadingScene(), 1000, 600);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Cursor customCursor = Toolkit.getDefaultToolkit().createCustomCursor(
|
||||||
|
Controller.images.get("images/pixui-pack/Misc/Cursor.png"),
|
||||||
|
new Point(0, 0), // Hotspot (Klickpunkt)
|
||||||
|
"PixUI cursor"
|
||||||
|
);
|
||||||
|
Controller.frame().setCursor(customCursor);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class LoadingScene extends Scene
|
|||||||
private Image tatli;
|
private Image tatli;
|
||||||
|
|
||||||
public LoadingScene() {
|
public LoadingScene() {
|
||||||
|
|
||||||
title = new Text("Royal Kebab");
|
title = new Text("Royal Kebab");
|
||||||
subtitle_content = "Loading";
|
subtitle_content = "Loading";
|
||||||
subtitle = new Text(subtitle_content);
|
subtitle = new Text(subtitle_content);
|
||||||
|
|||||||
Reference in New Issue
Block a user