ADD: Main Menu
This commit is contained in:
parent
82b499e65c
commit
de7cbdc73c
@ -4,12 +4,41 @@
|
||||
|
||||
#include "MainMenuUiLayer.h"
|
||||
|
||||
#include "imgui.h"
|
||||
#include "GLFW/glfw3.h"
|
||||
|
||||
void MainMenuUiLayer::onRender() {
|
||||
Layer::onRender();
|
||||
|
||||
std::vector<engine::GUITexture> guiElements;
|
||||
guiElements.emplace_back(*backgroundImage);
|
||||
m_guiRenderer.render(guiElements);
|
||||
|
||||
// Imgui Main Menu
|
||||
ImGui::SetNextWindowPos(ImVec2(20, 20), ImGuiCond_FirstUseEver);
|
||||
ImGui::Begin("Ludo", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize);
|
||||
|
||||
//ImGui::PushFont(titleFont); // falls du einen größeren Font geladen hast, sonst weglassen
|
||||
ImGui::Text("Ludo");
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::Spacing();
|
||||
|
||||
const ImVec2 buttonSize(180, 40);
|
||||
|
||||
if (ImGui::Button("Play", buttonSize)) {
|
||||
// z.B. State-Wechsel: game.setState(GameState::Playing);
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
if (ImGui::Button("Quit", buttonSize)) {
|
||||
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void MainMenuUiLayer::onAttachImpl() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user