fix some struct

This commit is contained in:
2025-04-08 15:31:06 +03:00
parent 1ab87dd53d
commit b182e35728
6 changed files with 16 additions and 54 deletions

View File

@@ -7,7 +7,6 @@
#include "gui/gui.hpp" // IWYU pragma: keep
#include "gui/flags.hpp" // IWYU pragma: keep
#include "gui/api/win.hpp" // IWYU pragma: keep
#include "gui/style/icons.hpp" // IWYU pragma: keep
#include "gui/style/fonts.hpp" // IWYU pragma: keep

View File

@@ -1,43 +0,0 @@
#pragma once
#include <string>
#include <imgui.h>
namespace VE
{
inline void WinPos(ImVec2 pos)
{
ImGui::SetNextWindowPos(pos);
}
inline void WinSize(ImVec2 size)
{
ImGui::SetNextWindowSize(size);
}
inline void End()
{
ImGui::End();
}
inline void Begin(std::string name, ImVec2 pos, ImVec2 size, bool& open, ImGuiWindowFlags win_flags)
{
WinPos(pos);
WinSize(size);
if (!ImGui::Begin(name.c_str(), &open, win_flags)) End();
}
inline void Begin(std::string name, ImVec2 pos, ImVec2 size, ImGuiWindowFlags win_flags)
{
WinPos(pos);
WinSize(size);
if (!ImGui::Begin(name.c_str(), nullptr, win_flags)) End();
}
inline void Begin(std::string name, ImGuiWindowFlags win_flags)
{
if (!ImGui::Begin(name.c_str(), nullptr, win_flags)) End();
}
}