aboutsummaryrefslogtreecommitdiff
path: root/src/States/ConfigState.cpp
blob: 9f578404a1706cd7fbc9a385bfb3fbd138a145d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "ConfigState.h"
#include "Rendering/Renderer.h"
#include "Core/Application.h"

#include <imgui.h>

namespace Donut
{
    void ConfigState::OnEnter()
    {
        DONUT_INFO("Entering Config State");
    }
    
    void ConfigState::OnExit()
    {
        DONUT_INFO("Exiting Config State");
    }
    
    void ConfigState::OnUpdate(float deltaTime)
    {
    }
    
    void ConfigState::OnRender()
    {
        Renderer::SetClearColor({ 0.1f, 0.1f, 0.2f, 1.0f });
        Renderer::Clear();
    }
    
    void ConfigState::OnEvent(Event& event)
    {
    }
    
    void ConfigState::OnImUIRender()
    {
        ImGui::Begin("Configuration");
        ImGui::Text("Configuration State");
        if (ImGui::Button("Start Simulation"))
            Application::Get().GetStateManager().SwitchToState("Simulation");
        ImGui::End();
    }
}