[nostalgia/core] Cleanup TileSheetEditor with new ImGui util functions
All checks were successful
Build / build (push) Successful in 2m21s
All checks were successful
Build / build (push) Successful in 2m21s
This commit is contained in:
@@ -10,26 +10,30 @@
|
||||
|
||||
namespace studio::ig {
|
||||
|
||||
inline constexpr auto BtnSz = ImVec2{50, 22};
|
||||
inline constexpr auto BtnSz = ImVec2{52, 22};
|
||||
|
||||
template<typename T>
|
||||
class IDStackItem {
|
||||
private:
|
||||
T m_id;
|
||||
public:
|
||||
explicit IDStackItem(T id) noexcept: m_id(id) {
|
||||
ImGui::PushID(m_id);
|
||||
}
|
||||
~IDStackItem() noexcept {
|
||||
ImGui::PopID();
|
||||
}
|
||||
explicit IDStackItem(int id) noexcept;
|
||||
explicit IDStackItem(const char *id) noexcept;
|
||||
explicit IDStackItem(ox::CStringView id) noexcept;
|
||||
~IDStackItem() noexcept;
|
||||
};
|
||||
|
||||
void centerNextWindow(turbine::Context &ctx) noexcept;
|
||||
|
||||
bool PushButton(ox::CStringView lbl, ImVec2 const&btnSz = BtnSz) noexcept;
|
||||
|
||||
void PopupBtns(float popupWidth, bool &popupOpen);
|
||||
enum class PopupResponse {
|
||||
None,
|
||||
OK,
|
||||
Cancel,
|
||||
};
|
||||
|
||||
PopupResponse PopupControlsOkCancel(float popupWidth, bool &popupOpen);
|
||||
|
||||
[[nodiscard]]
|
||||
bool BeginPopup(turbine::Context &ctx, ox::CStringView popupName, bool &show, ImVec2 const&sz = {285, 0});
|
||||
|
||||
/**
|
||||
*
|
||||
|
Reference in New Issue
Block a user