35#pragma region static_functions
47#pragma region overriden_functions
51 return std::make_unique<FilteredSelector>(*
this);
55 auto onUpdate(
float dt) ->
void override;
62 auto load(
const Stream& stream) ->
void override;
63 auto save(
Stream& stream)
const ->
void override;
70#pragma region FilteredSelector_functions
73 auto select(
int id) ->
void override;
95#pragma region messaging_functions
109#pragma region member_variables
121#pragma region helper_functions
131#pragma region static_variables
sys::Json Stream
Definition AudioObject.h:20
nlohmann::json json
Definition Json.cpp:19
An indicator that loops through a parents' nodes children and can "select" them on keypress.
A derived version of selector that only selects from Input if the inputtingDeviceID matches a value i...
Definition FilteredSelector.h:33
FilteredSelector(FilteredSelector &&other) noexcept=default
auto receiveDownKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:255
std::vector< int > filterIDs
All the IDs that we will receive input from.
Definition FilteredSelector.h:117
bool isDirty
Definition FilteredSelector.h:113
auto componentShowMenu() -> void override
Definition FilteredSelector.cpp:48
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition FilteredSelector.h:49
auto onRender() -> void override
called every frame after update has been called for every object.
Definition FilteredSelector.cpp:104
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition FilteredSelector.h:58
std::vector< int > IDsToAdd
Definition FilteredSelector.h:112
auto receiveUpKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:246
FilteredSelector()
Definition FilteredSelector.cpp:27
auto isFilterDisabled() -> bool
Returns true if the filter is disabled.
Definition FilteredSelector.cpp:180
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition FilteredSelector.cpp:114
auto operator=(FilteredSelector &&other) noexcept -> FilteredSelector &=default
auto removeFilterID(int id) -> void
Removes a specific ID from the filter.
Definition FilteredSelector.cpp:159
auto operator=(const FilteredSelector &) -> FilteredSelector &=default
auto linkMessages() -> void override
Definition FilteredSelector.cpp:189
~FilteredSelector() override=default
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition FilteredSelector.cpp:109
auto isValidID(int id) -> bool override
Returns true if the passed in id matches filterID.
Definition FilteredSelector.cpp:164
auto receiveLeftKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:228
bool isDisabled
Definition FilteredSelector.h:114
friend auto to_json(json &j, const FilteredSelector &s) -> void
Definition FilteredSelector.cpp:119
auto receiveSelectKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:220
auto select(int id) -> void override
We override select as we always want to select based off of a passed in ID.
Definition FilteredSelector.cpp:137
auto addFilterID(int id) -> void
Adds a new ID to the filter.
Definition FilteredSelector.cpp:153
auto disableFilter() -> void
Disables the filtered selector and returns every input as valid.
Definition FilteredSelector.cpp:175
static auto getIDFromMessage(const Message *message) -> int
Helper function so you don't need to manually convert the message every time to get the inputDeviceID...
Definition FilteredSelector.cpp:269
friend auto from_json(const json &j, FilteredSelector &s) -> void
Definition FilteredSelector.cpp:127
auto setFilterID(int id) -> void
Clears the vector and sets the ID to be just one thing.
Definition FilteredSelector.cpp:146
FilteredSelector(const FilteredSelector &)=default
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition FilteredSelector.cpp:36
auto onUpdate(float dt) -> void override
called once every frame.
Definition FilteredSelector.cpp:87
auto receiveRightKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:237
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:24
Selector()
Definition Selector.cpp:42