raid/private/raid_test/application.hpp

41 lines
977 B
C++

#pragma once
#if !defined(RAID_TEST_APPLICATION_HPP_INCLUDED)
#define RAID_TEST_APPLICATION_HPP_INCLUDED 1
#include <array>
#include "raid/raid.hpp"
#include "./frames/data_table.hpp"
namespace raid_test
{
class Application : public raid::Application
{
private:
struct Frame
{
using render_fn_t = void (*)(bool& open);
const char* title;
render_fn_t render;
};
static constexpr Frame FRAMES[] = {
{.title = DATA_TABLE_TITLE, .render = &renderDataTable}
};
static constexpr std::size_t NUM_FRAMES = sizeof(FRAMES) / sizeof(FRAMES[0]);
bool mShowMetrics = false;
std::array<bool, NUM_FRAMES> mFrameOpen{};
protected:
bool init() override;
void configureImgui() override;
void render() override;
std::string getFolderName() override;
std::string getWindowTitle() override;
};
extern Application gApplication;
} // namespace raid_test
#endif // !defined(RAID_TEST_APPLICATION_HPP_INCLUDED)