This commit is contained in:
parent
4754359a21
commit
305eb62647
@ -34,7 +34,11 @@ ox::Result<T> getDragDropPayload(ox::CStringViewCR name) noexcept {
|
|||||||
static_cast<size_t>(payload->DataSize)});
|
static_cast<size_t>(payload->DataSize)});
|
||||||
}
|
}
|
||||||
|
|
||||||
ox::Error setDragDropPayload(ox::CStringViewCR name, auto const&obj) noexcept;
|
ox::Error setDragDropPayload(ox::CStringViewCR name, auto const&obj) noexcept {
|
||||||
|
oxRequire(buff, ox::writeClaw(obj, ox::ClawFormat::Metal));
|
||||||
|
ImGui::SetDragDropPayload(name.c_str(), buff.data(), buff.size());
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class DragDropSource {
|
class DragDropSource {
|
||||||
@ -208,7 +212,7 @@ bool FileComboBox(
|
|||||||
|
|
||||||
bool ListBox(
|
bool ListBox(
|
||||||
ox::CStringViewCR name,
|
ox::CStringViewCR name,
|
||||||
std::function<ox::CStringViewCR(size_t)> const&f,
|
std::function<ox::CStringView(size_t)> const&f,
|
||||||
size_t strCnt,
|
size_t strCnt,
|
||||||
size_t &selIdx) noexcept;
|
size_t &selIdx) noexcept;
|
||||||
|
|
||||||
|
@ -10,13 +10,6 @@
|
|||||||
|
|
||||||
namespace studio::ig {
|
namespace studio::ig {
|
||||||
|
|
||||||
ox::Error setDragDropPayload(ox::CStringViewCR name, auto const&obj) noexcept {
|
|
||||||
oxRequire(buff, ox::writeClaw(obj, ox::ClawFormat::Metal));
|
|
||||||
ImGui::SetDragDropPayload(name.c_str(), buff.data(), buff.size());
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ChildStackItem::ChildStackItem(ox::CStringViewCR id, ImVec2 const&sz) noexcept {
|
ChildStackItem::ChildStackItem(ox::CStringViewCR id, ImVec2 const&sz) noexcept {
|
||||||
ImGui::BeginChild(id.c_str(), sz);
|
ImGui::BeginChild(id.c_str(), sz);
|
||||||
}
|
}
|
||||||
@ -142,7 +135,7 @@ bool FileComboBox(
|
|||||||
|
|
||||||
bool ListBox(
|
bool ListBox(
|
||||||
ox::CStringViewCR name,
|
ox::CStringViewCR name,
|
||||||
std::function<ox::CStringViewCR(size_t)> const&f,
|
std::function<ox::CStringView(size_t)> const&f,
|
||||||
size_t strCnt,
|
size_t strCnt,
|
||||||
size_t &selIdx) noexcept {
|
size_t &selIdx) noexcept {
|
||||||
auto out = false;
|
auto out = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user