2022-05-04 19:16:40 +02:00
|
|
|
#include "views/view.hpp"
|
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
|
|
|
|
{
|
|
|
|
void view::active_view() {
|
|
|
|
if (g_gui_service->get_selected()->func == nullptr) return;
|
|
|
|
|
|
|
|
static float alpha = 1.f;
|
|
|
|
|
2022-07-06 00:56:32 +08:00
|
|
|
ImGui::SetNextWindowPos({ 300.f + 20.f, 100.f }, ImGuiCond_Always);
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::SetNextWindowSize({ 0.f, 0.f });
|
2022-07-06 00:56:32 +08:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|