hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/states/config_state.cpp
blob: 403f667aa1b617b901a627f642b142aa2b6417d7 (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 "config_state.h"
#include "rendering/renderer.h"
#include "core/application.h"

#include <imgui.h>

namespace Donut
{
    void ConfigState::on_enter()
    {
        DONUT_INFO("Entering Config State");
    }
    
    void ConfigState::on_exit()
    {
        DONUT_INFO("Exiting Config State");
    }
    
    void ConfigState::on_update(float delta_time)
    {
    }
    
    void ConfigState::on_render()
    {
        Renderer::set_clear_color({ 0.1f, 0.1f, 0.2f, 1.0f });
        Renderer::clear();
    }
    
    void ConfigState::on_event(Event& event)
    {
    }
    
    void ConfigState::on_im_ui_render()
    {
        ImGui::Begin("Configuration");
        ImGui::Text("Configuration State");
        if (ImGui::Button("Start Simulation"))
            Application::get().get_state_manager().switch_to_state("Simulation");
        ImGui::End();
    }
};