feat: animated background
All checks were successful
Linux arm64 / Build (push) Successful in 10m56s

This commit is contained in:
2025-01-30 22:28:26 +01:00
parent a74bf42e59
commit f47e4cc309
4 changed files with 37 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ package gui.menu;
import java.util.Stack;
import gui.Images;
import gui.AnimatedBackground;
import imgui.ImGui;
import imgui.ImVec2;
import imgui.flag.ImGuiKey;
@@ -11,9 +11,11 @@ import imgui.flag.ImGuiWindowFlags;
public class StateMachine {
private final Stack<BaseView> menus;
private final AnimatedBackground background;
public StateMachine() {
this.menus = new Stack<>();
this.background = new AnimatedBackground();
}
public void clear() {
@@ -40,12 +42,7 @@ public class StateMachine {
public void render() {
var displaySize = ImGui.getIO().getDisplaySize();
ImGui.setNextWindowPos(new ImVec2(0.0f, 0.0f));
ImGui.setNextWindowSize(displaySize);
ImGui.begin("Background", null, ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoMove
| ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoBackground | ImGuiWindowFlags.NoBringToFrontOnFocus | ImGuiWindowFlags.NoInputs);
ImGui.image(Images.BACKGROUND, displaySize, new ImVec2(0, 0));
ImGui.end();
this.background.render();
ImGui.setNextWindowPos(new ImVec2(0.0f, 0.0f));
ImGui.setNextWindowSize(displaySize);
ImGui.begin("##Main Window", null, ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoMove