12template <
typename EnumType>
22 ImGui::PushItemWidth(50);
23 ImGui::TextUnformatted(
_title.c_str());
24 ImGui::PopItemWidth();
27 ImGui::PushItemWidth(190);
31 if (ImGui::Selectable(name.c_str())) {
39 ImGui::PopItemWidth();
Definition EnumSelector.hpp:13
void draw()
Definition EnumSelector.hpp:20
void setUpdateCallback(std::function< void(EnumType value)> callback)
Definition EnumSelector.hpp:18
EnumSelector(const std::string &title, EnumType value, const std::map< EnumType, std::string > &options)
Definition EnumSelector.hpp:15
std::map< EnumType, std::string > _options
Definition EnumSelector.hpp:51
std::string _title
Definition EnumSelector.hpp:49
std::function< void(EnumType value)> _updateCallback
Definition EnumSelector.hpp:52
EnumType _value
Definition EnumSelector.hpp:50