1 #ifndef EDITOR_COMPONENTS_ITEMSELECTOR_HPP
2 #define EDITOR_COMPONENTS_ITEMSELECTOR_HPP
4 #include <BLIB/Interfaces/GUI.hpp>
20 using Ptr = std::shared_ptr<ItemSelector>;
53 static std::vector<core::item::Id> idLookup;
Id
Represents an item in its simplist form.
All classes and functionality used for implementing the game editor.
Wrapper over ComboBox that allows selection of any item in the item database.
void setItem(core::item::Id item)
Set the current item.
core::item::Id currentItem() const
Returns the current selected item.
void refresh()
Refreshes the items from the item database.
std::function< void(core::item::Id)> ChangeCb
Called when the item changes.
std::shared_ptr< ItemSelector > Ptr
Pointer to this component.
static Ptr create(const ChangeCb &cb=[](core::item::Id) {})
Creates a new ItemSelector.