fix some struct
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user