add base dialogs
This commit is contained in:
55
src/rrr/layers/gui/dialogs/dialogs.hpp
Normal file
55
src/rrr/layers/gui/dialogs/dialogs.hpp
Normal file
@@ -0,0 +1,55 @@
|
||||
#pragma once
|
||||
|
||||
#include "try_engine/try_engine.hpp"
|
||||
#include "rrr/content/content.hpp"
|
||||
|
||||
namespace rrr::layers::gui
|
||||
{
|
||||
class dialogs : public try_engine::layer
|
||||
{
|
||||
using font_type = try_engine::style::fonts::font_type;
|
||||
|
||||
BASE_TYPE_DEFINE();
|
||||
|
||||
public:
|
||||
CONSTRUCT_IMPL(dialogs);
|
||||
|
||||
public:
|
||||
BASE_OVERIDE_IMPL();
|
||||
|
||||
public:
|
||||
SET_EVENT_MANAGER_IMPL();
|
||||
|
||||
void set_content(content* c) { };
|
||||
|
||||
private:
|
||||
FLAGS_STRUCT_DEFINED();
|
||||
|
||||
bool show = false;
|
||||
event_manager* em;
|
||||
|
||||
float width = 0.f;
|
||||
float height = 0.f;
|
||||
bool delete_dialog = false;
|
||||
bool create_dialog = false;
|
||||
file current_file;
|
||||
bool shift = false;
|
||||
std::string title;
|
||||
|
||||
private:
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImFontAtlas* atlas = io.Fonts;
|
||||
ImFont* font;
|
||||
|
||||
private:
|
||||
void resize();
|
||||
void cancel();
|
||||
void draw_delete_dialog();
|
||||
void draw_create_dialog();
|
||||
void create_file();
|
||||
void pressed(system_event& e);
|
||||
void released(system_event& e);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user