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
86#pragma region messaging_functions
100#pragma region member_variables
111#pragma region helper_functions
118#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:235
std::vector< int > filterIDs
All the IDs that we will receive input from.
Definition FilteredSelector.h:107
bool isDirty
Definition FilteredSelector.h:104
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:103
auto receiveUpKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:226
FilteredSelector()
Definition FilteredSelector.cpp:27
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:152
auto operator=(const FilteredSelector &) -> FilteredSelector &=default
auto linkMessages() -> void override
Definition FilteredSelector.cpp:167
~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:157
auto receiveLeftKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:208
friend auto to_json(json &j, const FilteredSelector &s) -> void
Definition FilteredSelector.cpp:119
auto receiveSelectKeyPressed(const Message *message) -> Message override
Definition FilteredSelector.cpp:198
auto addFilterID(int id) -> void
Adds a new ID to the filter.
Definition FilteredSelector.cpp:146
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:249
friend auto from_json(const json &j, FilteredSelector &s) -> void
Definition FilteredSelector.cpp:128
auto setFilterID(int id) -> void
Clears the vector and sets the ID to be just one thing.
Definition FilteredSelector.cpp:139
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:217
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Selector()
Definition Selector.cpp:40