[studio/modlib] Add variant of ComboBox that takes callback

This commit is contained in:
2024-05-27 00:46:55 -05:00
parent e62426b085
commit f9a14433d1
2 changed files with 33 additions and 0 deletions

View File

@@ -148,6 +148,19 @@ bool BeginPopup(turbine::Context &ctx, ox::CStringView popupName, bool &show, Im
*/
bool ComboBox(ox::CStringView lbl, ox::SpanView<ox::String> list, size_t &selectedIdx) noexcept;
/**
*
* @param lbl
* @param callback
* @param selectedIdx
* @return true if new value selected, false otherwise
*/
bool ComboBox(
ox::CStringView lbl,
std::function<ox::CStringView(size_t)> const&f,
size_t strCnt,
size_t &selectedIdx) noexcept;
bool FileComboBox(
ox::CStringView lbl,
studio::StudioContext &sctx,