add base dialogs
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "history.hpp"
|
||||
|
||||
#include "utils/types.hpp"
|
||||
|
||||
namespace rrr::layers::gui
|
||||
{
|
||||
void history::on_attach()
|
||||
@@ -17,11 +19,13 @@ namespace rrr::layers::gui
|
||||
|
||||
void history::gui_render()
|
||||
{
|
||||
if (!show) return;
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2(pos_x, pos_y));
|
||||
ImGui::SetNextWindowSize(ImVec2(width, height));
|
||||
|
||||
ImGuiStyle& st = ImGui::GetStyle();
|
||||
st.Colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.14f, 0.18f, 1.00f);
|
||||
st.Colors[ImGuiCol_WindowBg] = func::get_IMGUI_color<ImVec4>(33.f, 36.f, 46.f);
|
||||
|
||||
BEGIN_IMGUI_WIN();
|
||||
|
||||
@@ -77,8 +81,19 @@ namespace rrr::layers::gui
|
||||
width = try_engine::application::get()->get_window()->width() / 3.f;
|
||||
}
|
||||
|
||||
void history::on_event(std::any e, std::any value)
|
||||
void history::on_event(std::any event_type, std::any value)
|
||||
{
|
||||
auto et = std::any_cast<types::event_type>(event_type);
|
||||
|
||||
switch (et)
|
||||
{
|
||||
case types::event_type::NAVIGATION_LEFT:
|
||||
case types::event_type::NAVIGATION_RIGHT:
|
||||
cursor_position = cnt->get_cursor_position(TYPE_WIN::HISTORY);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void history::on_update(time t)
|
||||
|
||||
Reference in New Issue
Block a user