[olympic/studio] Add ig::IndentStackItem
All checks were successful
Build / build (push) Successful in 2m28s
All checks were successful
Build / build (push) Successful in 2m28s
This commit is contained in:
parent
e84df7801e
commit
f128664a81
@ -20,6 +20,14 @@ class IDStackItem {
|
|||||||
~IDStackItem() noexcept;
|
~IDStackItem() noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class IndentStackItem {
|
||||||
|
private:
|
||||||
|
float m_indent{};
|
||||||
|
public:
|
||||||
|
explicit IndentStackItem(float id) noexcept;
|
||||||
|
~IndentStackItem() noexcept;
|
||||||
|
};
|
||||||
|
|
||||||
void centerNextWindow(turbine::Context &ctx) noexcept;
|
void centerNextWindow(turbine::Context &ctx) noexcept;
|
||||||
|
|
||||||
bool PushButton(ox::CStringView lbl, ImVec2 const&btnSz = BtnSz) noexcept;
|
bool PushButton(ox::CStringView lbl, ImVec2 const&btnSz = BtnSz) noexcept;
|
||||||
|
@ -24,6 +24,16 @@ IDStackItem::~IDStackItem() noexcept {
|
|||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
IndentStackItem::IndentStackItem(float indent) noexcept: m_indent(indent) {
|
||||||
|
ImGui::Indent(m_indent);
|
||||||
|
}
|
||||||
|
|
||||||
|
IndentStackItem::~IndentStackItem() noexcept {
|
||||||
|
ImGui::Indent(-m_indent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void centerNextWindow(turbine::Context &ctx) noexcept {
|
void centerNextWindow(turbine::Context &ctx) noexcept {
|
||||||
auto const sz = turbine::getScreenSize(ctx);
|
auto const sz = turbine::getScreenSize(ctx);
|
||||||
auto const screenW = static_cast<float>(sz.width);
|
auto const screenW = static_cast<float>(sz.width);
|
||||||
|
Loading…
Reference in New Issue
Block a user