TmpMenu/src/views/core/view_active_view.cpp

25 lines
753 B
C++
Raw Normal View History

#include "views/view.hpp"
#include "pointers.hpp"
#include "services/gui/gui_service.hpp"
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);
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 });
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();
g_gui_service->get_selected()->func();
ImGui::PopStyleVar();
}
}
}