2022-05-04 19:16:40 +02:00
|
|
|
#include "views/view.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
|
2022-06-30 00:11:54 +02:00
|
|
|
#include "pointers.hpp"
|
|
|
|
#include "services/gui/gui_service.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
void view::active_view()
|
|
|
|
{
|
|
|
|
if (g_gui_service->get_selected()->func == nullptr)
|
|
|
|
return;
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
static float alpha = 1.f;
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
ImGui::SetNextWindowPos({(300.f + 20.f) * g.window.gui_scale, 100.f * g.window.gui_scale}, ImGuiCond_Always);
|
|
|
|
ImGui::SetNextWindowSize({0.f, 0.f});
|
|
|
|
ImGui::SetNextWindowSizeConstraints({300.f, 100.f},
|
|
|
|
{(float)*g_pointers->m_resolution_x - 270.f, (float)*g_pointers->m_resolution_y - 110.f});
|
2022-05-04 19:16:40 +02:00
|
|
|
if (ImGui::Begin("main", nullptr, window_flags))
|
|
|
|
{
|
|
|
|
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
2022-08-10 08:42:34 +08:00
|
|
|
components::title(g_gui_service->get_selected()->name);
|
|
|
|
ImGui::Separator();
|
2022-05-04 19:16:40 +02:00
|
|
|
g_gui_service->get_selected()->func();
|
|
|
|
ImGui::PopStyleVar();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|