Brunot
Loading...
Searching...
No Matches
Backdrop.h
Go to the documentation of this file.
1
13// ____ __ __ __
14// /\__ _\/\ \ /\ \/\ \
15// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
16// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
17// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
18// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
19// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
20
21#pragma once
22#include "Framework/Component.h"
23
28class Backdrop : public Component
29{
30public:
31 static auto getEnum() -> ComponentTypeEnum
32 {
33 return cBackdrop;
34 }
35 static auto bindLuaTypes(sol::state& lua) -> void;
36
37 Backdrop();
38 Backdrop(const Backdrop&) = default;
39 auto operator=(const Backdrop&) -> Backdrop& = default;
40 ~Backdrop() override = default;
41 Backdrop(Backdrop&& other) noexcept = default;
42 auto operator=(Backdrop&& other) noexcept -> Backdrop& = default;
43
44 auto clone() const -> std::unique_ptr<GameObject> override;
45
46 auto componentShowMenu() -> void override
47 {
48 } // for debug ImGUI
49 auto onUpdate(float dt) -> void override;
50
51 auto endWindow() -> void override
52 {
53 }; // for debug ImGUI
54 auto onRender() -> void override;
55 auto load(const Stream& stream) -> void override;
56 auto save(Stream& stream) const -> void override;
57
58 friend auto to_json(json& j, const Backdrop& b) -> void;
59 friend auto from_json(const json& j, Backdrop& b) -> void;
60
61};
sys::Json Stream
Definition AudioObject.h:20
The base class for components, holding all of their shared All components should inherit from this.
nlohmann::json json
Definition Json.cpp:19
The component that belongs to the entity that all entities are children to, inside a scene.
Definition Backdrop.h:29
Backdrop(Backdrop &&other) noexcept=default
friend auto from_json(const json &j, Backdrop &b) -> void
Definition Backdrop.cpp:78
auto operator=(Backdrop &&other) noexcept -> Backdrop &=default
static auto getEnum() -> ComponentTypeEnum
Definition Backdrop.h:31
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Backdrop.cpp:57
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Backdrop.cpp:61
auto operator=(const Backdrop &) -> Backdrop &=default
Backdrop(const Backdrop &)=default
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Backdrop.h:51
static auto bindLuaTypes(sol::state &lua) -> void
Definition Backdrop.cpp:28
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Backdrop.cpp:66
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Backdrop.cpp:37
auto onUpdate(float dt) -> void override
called once every frame.
Definition Backdrop.cpp:42
friend auto to_json(json &j, const Backdrop &b) -> void
Definition Backdrop.cpp:71
auto componentShowMenu() -> void override
Definition Backdrop.h:46
Backdrop()
Definition Backdrop.cpp:32
~Backdrop() override=default
ComponentTypeEnum
This enum lists out every type of component we have.
Definition Component.h:39
Component(ComponentTypeEnum type, const char *typeName)
Definition Component.cpp:72
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:24