1 #ifndef GENERATED_REGISTRATIONS_H
2 #define GENERATED_REGISTRATIONS_H
5 #include <chaiscript/utility/utility.hpp>
71 using namespace Input;
72 using namespace Events;
73 using namespace Utility;
74 using namespace Script;
76 using namespace Graphics;
77 using namespace Graphics::UI;
80 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
81 std::vector<std::pair<unsigned int, std::string>> vec = {{
MOUSE_CURSOR,
"EventType_MOUSE_CURSOR" },
88 {
KEY_UP,
"EventType_KEY_UP" },
113 chaiscript::utility::add_class<EventType>(*module, std::string(
"EventType"),
120 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
121 std::vector<std::pair<unsigned int, std::string>> vec = {{
Light::POINT,
"Light_Type_POINT" },
124 chaiscript::utility::add_class<Light::Type>(*module, std::string(
"Light_Type"),
131 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
132 std::vector<std::pair<unsigned int, std::string>> vec = {{
WrappableText::LEFT,
"WrappableText_HorizontalAlignment_LEFT" },
136 chaiscript::utility::add_class<WrappableText::HorizontalAlignment>(*module, std::string(
"WrappableText_HorizontalAlignment"),
143 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
144 std::vector<std::pair<unsigned int, std::string>> vec = {{
WrappableText::TOP,
"WrappableText_VerticalAlignment_TOP" },
148 chaiscript::utility::add_class<WrappableText::VerticalAlignment>(*module, std::string(
"WrappableText_VerticalAlignment"),
155 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
157 chaiscript::utility::add_class<Entity>(*module, std::string(
"Entity"),
159 chaiscript::constructor<Entity()>(),
174 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
176 chaiscript::utility::add_class<Component>(*module, std::string(
"Component"),
188 module->add(chaiscript::base_class<Subject, Component>());
189 module->add(chaiscript::base_class<Observer, Component>());
195 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
197 chaiscript::utility::add_class<Transform>(*module, std::string(
"Transform"),
199 chaiscript::constructor<Transform()>(),
207 {chaiscript::fun([](
Transform& c,
const float x,
const float y) { c.
translate(x, y); }),
"translate"},
208 {chaiscript::fun([](
Transform& c,
const float x,
const float y,
const float z) { c.
translate(x, y, z); }),
"translate"},
209 {chaiscript::fun([](
Transform& c,
const glm::vec3& vec) { c.
translate(vec); }),
"translate"},
210 {chaiscript::fun([](
Transform& c,
const glm::vec2& vec) { c.
translate(vec); }),
"translate"},
213 {chaiscript::fun([](
Transform& c,
const float angle_x,
const float angle_y,
const float angle_z) { c.
rotate(angle_x, angle_y, angle_z); }),
"rotate"},
214 {chaiscript::fun([](
Transform& c,
const glm::vec3& euler_angles) { c.
rotate(euler_angles); }),
"rotate"},
215 {chaiscript::fun([](
Transform& c,
const glm::quat& quat) { c.
rotate(quat); }),
"rotate"},
216 {chaiscript::fun([](
Transform& c,
const float angle,
const glm::vec3& axis) { c.
rotate(angle, axis); }),
"rotate"},
225 {chaiscript::fun([](
Transform& c,
const float x) { c.
scale(x); }),
"scale"},
226 {chaiscript::fun([](
Transform& c,
const float x,
const float y) { c.
scale(x, y); }),
"scale"},
227 {chaiscript::fun([](
Transform& c,
const float x,
const float y,
const float z) { c.
scale(x, y, z); }),
"scale"},
228 {chaiscript::fun([](
Transform& c,
const glm::vec2& vec) { c.
scale(vec); }),
"scale"},
229 {chaiscript::fun([](
Transform& c,
const glm::vec3& vec) { c.
scale(vec); }),
"scale"},
241 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
243 chaiscript::utility::add_class<SetEntityActiveEvent>(*module, std::string(
"SetEntityActiveEvent"),
245 chaiscript::constructor<SetEntityActiveEvent(const bool active)>(),
251 module->add(chaiscript::base_class<Event, SetEntityActiveEvent>());
257 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
259 chaiscript::utility::add_class<ComponentManager>(*module, std::string(
"ComponentManager"),
264 {chaiscript::fun([](
ComponentManager& c, std::vector<std::shared_ptr<Component>> components) { c.
addComponents(components); }),
"addComponents"},
265 {chaiscript::fun([](
ComponentManager& c, std::list<std::shared_ptr<Component>> components) { c.
addComponents(components); }),
"addComponents"},
275 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
277 chaiscript::utility::add_class<SetActiveEvent>(*module, std::string(
"SetActiveEvent"),
279 chaiscript::constructor<SetActiveEvent(const bool active)>(),
285 module->add(chaiscript::base_class<Event, SetActiveEvent>());
291 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
293 chaiscript::utility::add_class<Engine>(*module, std::string(
"Engine"),
311 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
313 chaiscript::utility::add_class<InputSystem>(*module, std::string(
"InputSystem"),
319 module->add(chaiscript::base_class<Subject, InputSystem>());
320 module->add(chaiscript::base_class<Observer, InputSystem>());
326 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
328 chaiscript::utility::add_class<MouseScrollEvent>(*module, std::string(
"MouseScrollEvent"),
330 chaiscript::constructor<MouseScrollEvent(const glm::dvec2& offset)>(),
336 module->add(chaiscript::base_class<Event, MouseScrollEvent>());
342 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
344 chaiscript::utility::add_class<MouseButtonUpEvent>(*module, std::string(
"MouseButtonUpEvent"),
346 chaiscript::constructor<MouseButtonUpEvent(const int button)>(),
352 module->add(chaiscript::base_class<Event, MouseButtonUpEvent>());
358 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
360 chaiscript::utility::add_class<MouseCursorEvent>(*module, std::string(
"MouseCursorEvent"),
362 chaiscript::constructor<MouseCursorEvent(const glm::dvec2& pos)>(),
368 module->add(chaiscript::base_class<Event, MouseCursorEvent>());
374 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
376 chaiscript::utility::add_class<CharacterTypedEvent>(*module, std::string(
"CharacterTypedEvent"),
378 chaiscript::constructor<CharacterTypedEvent(const unsigned char character)>(),
384 module->add(chaiscript::base_class<Event, CharacterTypedEvent>());
390 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
392 chaiscript::utility::add_class<KeyUpEvent>(*module, std::string(
"KeyUpEvent"),
394 chaiscript::constructor<KeyUpEvent(const int key)>(),
400 module->add(chaiscript::base_class<Event, KeyUpEvent>());
406 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
408 chaiscript::utility::add_class<KeyDownEvent>(*module, std::string(
"KeyDownEvent"),
410 chaiscript::constructor<KeyDownEvent(const int key)>(),
416 module->add(chaiscript::base_class<Event, KeyDownEvent>());
422 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
424 chaiscript::utility::add_class<KeyRepeatEvent>(*module, std::string(
"KeyRepeatEvent"),
426 chaiscript::constructor<KeyRepeatEvent(const int key)>(),
432 module->add(chaiscript::base_class<Event, KeyRepeatEvent>());
438 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
440 chaiscript::utility::add_class<CursorEnterEvent>(*module, std::string(
"CursorEnterEvent"),
442 chaiscript::constructor<CursorEnterEvent()>(),
447 module->add(chaiscript::base_class<Event, CursorEnterEvent>());
453 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
455 chaiscript::utility::add_class<MouseButtonDownEvent>(*module, std::string(
"MouseButtonDownEvent"),
457 chaiscript::constructor<MouseButtonDownEvent(const int button)>(),
463 module->add(chaiscript::base_class<Event, MouseButtonDownEvent>());
469 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
471 chaiscript::utility::add_class<CursorLeaveEvent>(*module, std::string(
"CursorLeaveEvent"),
473 chaiscript::constructor<CursorLeaveEvent()>(),
478 module->add(chaiscript::base_class<Event, CursorLeaveEvent>());
484 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
486 chaiscript::utility::add_class<Subject>(*module, std::string(
"Subject"),
500 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
502 chaiscript::utility::add_class<Event>(*module, std::string(
"Event"),
504 chaiscript::constructor<Event(const EventType& type)>(),
514 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
516 chaiscript::utility::add_class<ListLayersEvent>(*module, std::string(
"ListLayersEvent"),
518 chaiscript::constructor<ListLayersEvent()>(),
523 module->add(chaiscript::base_class<Event, ListLayersEvent>());
529 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
531 chaiscript::utility::add_class<LoadMapEvent>(*module, std::string(
"LoadMapEvent"),
533 chaiscript::constructor<LoadMapEvent(const std::string name)>(),
539 module->add(chaiscript::base_class<Event, LoadMapEvent>());
545 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
547 chaiscript::utility::add_class<FPSCounter>(*module, std::string(
"FPSCounter"),
556 module->add(chaiscript::base_class<Subject, FPSCounter>());
562 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
564 chaiscript::utility::add_class<ToggleLayerEvent>(*module, std::string(
"ToggleLayerEvent"),
566 chaiscript::constructor<ToggleLayerEvent(const unsigned int layer_number, const bool on)>(),
573 module->add(chaiscript::base_class<Event, ToggleLayerEvent>());
579 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
581 chaiscript::utility::add_class<WindowExitEvent>(*module, std::string(
"WindowExitEvent"),
583 chaiscript::constructor<WindowExitEvent()>(),
588 module->add(chaiscript::base_class<Event, WindowExitEvent>());
594 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
596 chaiscript::utility::add_class<ListCharactersEvent>(*module, std::string(
"ListCharactersEvent"),
598 chaiscript::constructor<ListCharactersEvent()>(),
603 module->add(chaiscript::base_class<Event, ListCharactersEvent>());
609 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
611 chaiscript::utility::add_class<ListMapsEvent>(*module, std::string(
"ListMapsEvent"),
613 chaiscript::constructor<ListMapsEvent()>(),
618 module->add(chaiscript::base_class<Event, ListMapsEvent>());
624 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
626 chaiscript::utility::add_class<ConfigManager>(*module, std::string(
"ConfigManager"),
644 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
646 chaiscript::utility::add_class<LoadCharacterEvent>(*module, std::string(
"LoadCharacterEvent"),
648 chaiscript::constructor<LoadCharacterEvent(const std::string name)>(),
654 module->add(chaiscript::base_class<Event, LoadCharacterEvent>());
660 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
662 chaiscript::utility::add_class<DebugParser>(*module, std::string(
"DebugParser"),
664 chaiscript::constructor<DebugParser()>(),
670 module->add(chaiscript::base_class<Subject, DebugParser>());
671 module->add(chaiscript::base_class<Observer, DebugParser>());
677 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
679 chaiscript::utility::add_class<ToggleLightsEvent>(*module, std::string(
"ToggleLightsEvent"),
681 chaiscript::constructor<ToggleLightsEvent(const bool on)>(),
687 module->add(chaiscript::base_class<Event, ToggleLightsEvent>());
693 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
695 chaiscript::utility::add_class<ToggleFreeCameraEvent>(*module, std::string(
"ToggleFreeCameraEvent"),
697 chaiscript::constructor<ToggleFreeCameraEvent()>(),
702 module->add(chaiscript::base_class<Event, ToggleFreeCameraEvent>());
708 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
710 chaiscript::utility::add_class<ScriptObject>(*module, std::string(
"ScriptObject"),
717 module->add(chaiscript::base_class<Subject, ScriptObject>());
718 module->add(chaiscript::base_class<Observer, ScriptObject>());
724 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
726 chaiscript::utility::add_class<Scene>(*module, std::string(
"Scene"),
728 chaiscript::constructor<Scene(const std::string scene_name)>(),
733 {chaiscript::fun([](
Scene& c, std::shared_ptr<Component> component) { c.
addComponent(component); }),
"addComponent"},
734 {chaiscript::fun([](
Scene& c, std::shared_ptr<Physics::CollisionData> collision_data) { c.
addComponent(collision_data); }),
"addComponent"},
750 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
752 chaiscript::utility::add_class<SceneGenerator>(*module, std::string(
"SceneGenerator"),
754 chaiscript::constructor<SceneGenerator(const Map& animation_index, std::shared_ptr<Graphics::TextureManager> texture_manager, std::shared_ptr<Graphics::ShaderManager> shader_manager,
const unsigned int ui_z_slots)>(),
755 chaiscript::constructor<SceneGenerator(const SceneGenerator& s)>(),
768 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
770 chaiscript::utility::add_class<SpriteMovement>(*module, std::string(
"SpriteMovement"),
772 chaiscript::constructor<SpriteMovement()>(),
781 module->add(chaiscript::base_class<Component, SpriteMovement>());
782 module->add(chaiscript::base_class<Subject, SpriteMovement>());
783 module->add(chaiscript::base_class<Observer, SpriteMovement>());
789 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
791 chaiscript::utility::add_class<Map>(*module, std::string(
"Map"),
793 chaiscript::constructor<Map(const std::string& path)>(),
794 chaiscript::constructor<
Map(
const Map& map)>(),
804 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
806 chaiscript::utility::add_class<SpriteMoveEvent>(*module, std::string(
"SpriteMoveEvent"),
808 chaiscript::constructor<SpriteMoveEvent(const glm::vec2& velocity, const glm::vec2& next_position)>(),
815 module->add(chaiscript::base_class<Event, SpriteMoveEvent>());
821 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
823 chaiscript::utility::add_class<GraphicsSystem>(*module, std::string(
"GraphicsSystem"),
844 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
846 chaiscript::utility::add_class<TextureManager>(*module, std::string(
"TextureManager"),
859 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
861 chaiscript::utility::add_class<SetUniformEvent>(*module, std::string(
"SetUniformEvent"),
863 chaiscript::constructor<SetUniformEvent(const Uniform& uniform)>(),
869 module->add(chaiscript::base_class<Event, SetUniformEvent>());
875 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
877 chaiscript::utility::add_class<Renderable>(*module, std::string(
"Renderable"),
897 module->add(chaiscript::base_class<Component, Renderable>());
898 module->add(chaiscript::base_class<Subject, Renderable>());
899 module->add(chaiscript::base_class<Observer, Renderable>());
905 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
907 chaiscript::utility::add_class<Camera>(*module, std::string(
"Camera"),
927 module->add(chaiscript::base_class<Component, Camera>());
928 module->add(chaiscript::base_class<Subject, Camera>());
929 module->add(chaiscript::base_class<Observer, Camera>());
935 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
937 chaiscript::utility::add_class<Light>(*module, std::string(
"Light"),
939 chaiscript::constructor<Light(const Light::Type& type)>(),
961 module->add(chaiscript::base_class<Component, Light>());
962 module->add(chaiscript::base_class<Subject, Light>());
963 module->add(chaiscript::base_class<Observer, Light>());
969 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
971 chaiscript::utility::add_class<Shader>(*module, std::string(
"Shader"),
986 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
988 chaiscript::utility::add_class<BaseTexture>(*module, std::string(
"BaseTexture"),
990 chaiscript::constructor<BaseTexture(const GLenum texture_type)>(),
1007 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1009 chaiscript::utility::add_class<ShaderManager>(*module, std::string(
"ShaderManager"),
1013 {chaiscript::fun([](
ShaderManager& c,
const std::string& name,
const bool geometry_shader) { c.
loadShader(name, geometry_shader); }),
"loadShader"},
1014 {chaiscript::fun([](
ShaderManager& c,
const std::string& name,
const std::string& vertex_filename,
const std::string& fragment_filename,
const std::string& geometry_filename) { c.
loadShader(name, vertex_filename, fragment_filename, geometry_filename); }),
"loadShader"},
1023 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1025 chaiscript::utility::add_class<Area>(*module, std::string(
"Area"),
1027 chaiscript::constructor<Area(VertexData vertex_data, std::shared_ptr<Skin> skin,
const unsigned int layer)>(),
1044 module->add(chaiscript::base_class<Element, Area>());
1045 module->add(chaiscript::base_class<Renderable, Area>());
1046 module->add(chaiscript::base_class<Component, Area>());
1047 module->add(chaiscript::base_class<Subject, Area>());
1048 module->add(chaiscript::base_class<Observer, Area>());
1054 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1056 chaiscript::utility::add_class<ChangeTextEvent>(*module, std::string(
"ChangeTextEvent"),
1058 chaiscript::constructor<ChangeTextEvent(const std::string& text)>(),
1064 module->add(chaiscript::base_class<Event, ChangeTextEvent>());
1070 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1072 chaiscript::utility::add_class<TextArea>(*module, std::string(
"TextArea"),
1074 chaiscript::constructor<TextArea(std::shared_ptr<WrappableText> text,
VertexData vertex_data, std::shared_ptr<Skin> skin,
const unsigned int layer)>(),
1096 module->add(chaiscript::base_class<Area, TextArea>());
1097 module->add(chaiscript::base_class<Element, TextArea>());
1098 module->add(chaiscript::base_class<Renderable, TextArea>());
1099 module->add(chaiscript::base_class<Component, TextArea>());
1100 module->add(chaiscript::base_class<Subject, TextArea>());
1101 module->add(chaiscript::base_class<Observer, TextArea>());
1107 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1109 chaiscript::utility::add_class<TextField>(*module, std::string(
"TextField"),
1111 chaiscript::constructor<TextField(std::shared_ptr<WrappableText> default_text, std::shared_ptr<WrappableText> typed_text,
VertexData vertex_data, std::shared_ptr<Skin> skin,
const unsigned int layer)>(),
1129 module->add(chaiscript::base_class<TextArea, TextField>());
1130 module->add(chaiscript::base_class<Area, TextField>());
1131 module->add(chaiscript::base_class<Element, TextField>());
1132 module->add(chaiscript::base_class<Renderable, TextField>());
1133 module->add(chaiscript::base_class<Component, TextField>());
1134 module->add(chaiscript::base_class<Subject, TextField>());
1135 module->add(chaiscript::base_class<Observer, TextField>());
1141 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1143 chaiscript::utility::add_class<WrappableText>(*module, std::string(
"WrappableText"),
1145 chaiscript::constructor<WrappableText()>(),
1156 module->add(chaiscript::base_class<Text, WrappableText>());
1157 module->add(chaiscript::base_class<Component, WrappableText>());
1158 module->add(chaiscript::base_class<Subject, WrappableText>());
1159 module->add(chaiscript::base_class<Observer, WrappableText>());
1165 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1167 chaiscript::utility::add_class<Skin>(*module, std::string(
"Skin"),
1169 chaiscript::constructor<Skin(std::shared_ptr<BaseTexture> texture, std::shared_ptr<Shader> shader)>(),
1182 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1184 chaiscript::utility::add_class<Element>(*module, std::string(
"Element"),
1204 module->add(chaiscript::base_class<Renderable, Element>());
1205 module->add(chaiscript::base_class<Component, Element>());
1206 module->add(chaiscript::base_class<Subject, Element>());
1207 module->add(chaiscript::base_class<Observer, Element>());
1213 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1215 chaiscript::utility::add_class<SuspendKeyInputEvent>(*module, std::string(
"SuspendKeyInputEvent"),
1217 chaiscript::constructor<SuspendKeyInputEvent()>(),
1222 module->add(chaiscript::base_class<Event, SuspendKeyInputEvent>());
1228 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1230 chaiscript::utility::add_class<Font>(*module, std::string(
"Font"),
1245 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1247 chaiscript::utility::add_class<FontGenerator>(*module, std::string(
"FontGenerator"),
1261 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1263 chaiscript::utility::add_class<QuitButton>(*module, std::string(
"QuitButton"),
1265 chaiscript::constructor<QuitButton(std::shared_ptr<WrappableText> text,
VertexData vertex_data, std::shared_ptr<Skin> skin,
const unsigned int layer)>(),
1272 module->add(chaiscript::base_class<Button, QuitButton>());
1273 module->add(chaiscript::base_class<TextArea, QuitButton>());
1274 module->add(chaiscript::base_class<Area, QuitButton>());
1275 module->add(chaiscript::base_class<Element, QuitButton>());
1276 module->add(chaiscript::base_class<Renderable, QuitButton>());
1277 module->add(chaiscript::base_class<Component, QuitButton>());
1278 module->add(chaiscript::base_class<Subject, QuitButton>());
1279 module->add(chaiscript::base_class<Observer, QuitButton>());
1285 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1287 chaiscript::utility::add_class<ResumeKeyInputEvent>(*module, std::string(
"ResumeKeyInputEvent"),
1289 chaiscript::constructor<ResumeKeyInputEvent()>(),
1294 module->add(chaiscript::base_class<Event, ResumeKeyInputEvent>());
1300 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1302 chaiscript::utility::add_class<Text>(*module, std::string(
"Text"),
1304 chaiscript::constructor<Text()>(),
1318 module->add(chaiscript::base_class<Component, Text>());
1319 module->add(chaiscript::base_class<Subject, Text>());
1320 module->add(chaiscript::base_class<Observer, Text>());
1326 chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1328 chaiscript::utility::add_class<Button>(*module, std::string(
"Button"),
1330 chaiscript::constructor<Button(std::shared_ptr<WrappableText> text,
VertexData vertex_data, std::shared_ptr<Skin> skin,
const unsigned int layer)>(),
1346 module->add(chaiscript::base_class<TextArea, Button>());
1347 module->add(chaiscript::base_class<Area, Button>());
1348 module->add(chaiscript::base_class<Element, Button>());
1349 module->add(chaiscript::base_class<Renderable, Button>());
1350 module->add(chaiscript::base_class<Component, Button>());
1351 module->add(chaiscript::base_class<Subject, Button>());
1352 module->add(chaiscript::base_class<Observer, Button>());
chaiscript::ModulePtr getSkinModule()
Definition: generated_registrations.h:1164
void setNumberOfQuantizedBands(const int bands) noexcept
Sets the number of quantized bands.
Definition: light.cpp:65
bool castsQuantizedBands() const noexcept
Function to see if lights cast quantized bands or are smooth.
Definition: light.cpp:61
Definition: event_type.h:19
std::string getName() const noexcept
Gets the name.
Definition: scene.cpp:65
float getIntensity() const noexcept
Gets the intensity.
Definition: light.cpp:41
glm::vec2 getNextPosition() const noexcept
Gets the next position.
Definition: sprite_move_event.h:47
void setColor(const glm::vec3 color) noexcept
Sets the color.
Definition: light.cpp:29
std::vector< std::shared_ptr< Component > > getComponents() const noexcept
Gets all components.
Definition: scene.cpp:31
chaiscript::ModulePtr getKeyRepeatEventModule()
Definition: generated_registrations.h:421
void deactivateScene(const std::string &name)
Deactivates a scene by name.
Definition: engine.cpp:74
unsigned int getId() const noexcept
Gets the identifier.
Definition: component.cpp:55
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: renderable.cpp:255
Class for shader.
Definition: shader.h:17
void setIntensity(const float intensity) noexcept
Sets the intensity.
Definition: light.cpp:37
virtual bool onUpdate(const double delta) override
Called every engine loop.
Definition: text_area.cpp:47
std::vector< std::string > getSceneNames() const noexcept
Gets the scene names.
Definition: engine.cpp:83
chaiscript::ModulePtr getMouseCursorEventModule()
Definition: generated_registrations.h:357
void setLinearAttenuation(const float linear) noexcept
Sets the linear attenuation.
Definition: light.cpp:45
chaiscript::ModulePtr getMapModule()
Definition: generated_registrations.h:788
chaiscript::ModulePtr getButtonModule()
Definition: generated_registrations.h:1325
float getConeAngle() const noexcept
Gets the cone angle.
Definition: light.cpp:77
chaiscript::ModulePtr getQuitButtonModule()
Definition: generated_registrations.h:1260
chaiscript::ModulePtr getResumeKeyInputEventModule()
Definition: generated_registrations.h:1284
bool getBool(const std::string &key)
Gets a bool from config.
Definition: config_manager.cpp:80
void setSkin(std::shared_ptr< Skin > skin) noexcept
Sets the UI skin.
Definition: element.cpp:56
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: area.cpp:78
float getCurrentFPS() const noexcept
Gets the current fps.
Definition: fps_counter.cpp:21
std::string to_string() const noexcept
Returns a string representation of the object, mostly for use in chaiscript.
Definition: scene.cpp:69
virtual void onLeftClickRelease() override
Called when element has left click released over it.
Definition: area.cpp:52
std::vector< std::string > getUniformNames() const noexcept
Gets the uniform names.
Definition: shader.cpp:74
Class for component manager.
Definition: component_manager.h:14
static std::shared_ptr< LoadCharacterEvent > create(const std::string name)
Factory function.
Definition: load_character_event.h:32
Definition: event_type.h:35
void addTexture(const unsigned int unit, const std::string uniform_name, std::shared_ptr< BaseTexture > texture_object) noexcept
Adds a texture.
Definition: renderable.cpp:63
chaiscript::ModulePtr getFontModule()
Definition: generated_registrations.h:1227
virtual void notify(std::shared_ptr< Event > event)
notify is used to tell observers of an event.
Definition: subject.cpp:13
void addEntity(std::shared_ptr< Entity > entity) noexcept
Adds an entity.
Definition: scene.cpp:39
Definition: event_type.h:29
float getHeight() const noexcept
Gets the height.
Definition: element.cpp:79
void addComponents(std::vector< std::shared_ptr< Component >> components)
Adds components.
Definition: component_manager.cpp:19
void addCharacter(const char text_char, const Character &character)
Adds a character.
Definition: font.cpp:9
void setFont(const std::shared_ptr< Font > font)
Sets the font.
Definition: text.cpp:13
chaiscript::ModulePtr getSetActiveEventModule()
Definition: generated_registrations.h:274
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: text_area.cpp:99
unsigned int count() const noexcept
Gets the number of components.
Definition: component_manager.cpp:45
void setAmbientIntensity(const float intensity) noexcept
Sets the ambient intensity.
Definition: renderable.cpp:95
void setKerning(const float amount) noexcept
Sets the kerning.
Definition: text.cpp:37
virtual void onKeyRepeat(const int key) override
Called when a key is repeated while element is in focus.
Definition: text_field.cpp:134
static std::shared_ptr< SpriteMoveEvent > create(glm::vec2 &velocity, const glm::vec2 &next_position)
SpriteMoveEvent factory function.
Definition: sprite_move_event.h:35
Definition: event_type.h:38
Definition: event_type.h:15
static std::shared_ptr< LoadMapEvent > create(const std::string name)
Factory Function.
Definition: load_map_event.h:33
chaiscript::ModulePtr getKeyDownEventModule()
Definition: generated_registrations.h:405
Definition: event_type.h:36
unsigned int getUnsignedInt(const std::string &key)
Gets an unsigned int from config.
Definition: config_manager.cpp:56
std::shared_ptr< Physics::CollisionData > getCollisionData() const noexcept
Gets the collision data.
Definition: scene.cpp:35
bool turnOn() const noexcept
Turn the lights on?
Definition: toggle_lights_event.h:36
chaiscript::ModulePtr getTextureManagerModule()
Definition: generated_registrations.h:843
void setLineSpacing(float spacing)
Sets the line spacing.
Definition: wrappable_text.cpp:24
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: element.cpp:213
virtual void onKeyDown(const int key) override
Called when a key is pressed while element is in focus.
Definition: area.cpp:66
int renderablesCount()
Returns the number of renderables currently in the system.
Definition: graphics_system.cpp:139
int addRenderable(std::shared_ptr< Graphics::Renderable > renderable)
Adds a renderable to the renderable pool.
Definition: graphics_system.cpp:120
virtual void setText(const std::string &text)
Sets the text string.
Definition: text.cpp:17
Definition: event_type.h:25
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: light.cpp:104
unsigned int getMaxInfluenceLights() const noexcept
Gets the maximum number of influencing lights.
Definition: graphics_system.cpp:220
void setVerticalAlignment(const VerticalAlignment &alignment)
Sets the vertical alignment.
Definition: wrappable_text.cpp:15
double getDouble(const std::string &key)
Gets a double from config.
Definition: config_manager.cpp:74
chaiscript::ModulePtr getWrappableTextVerticalAlignmentModule()
Definition: generated_registrations.h:142
static std::shared_ptr< ToggleFreeCameraEvent > create()
Factory function.
Definition: toggle_free_camera_event.h:27
glm::mat4 getProjectionMatrix() const noexcept
Gets the projection matrix.
Definition: camera.cpp:222
void setLightReactive(const bool reactive) noexcept
Sets if the renderable should be light reactive.
Definition: renderable.cpp:79
glm::vec2 getAnchorPoint() const noexcept
Gets the anchor point.
Definition: element.cpp:60
chaiscript::ModulePtr getLightModule()
Definition: generated_registrations.h:934
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: wrappable_text.cpp:180
virtual void addObserver(std::shared_ptr< Observer > observer)
Adds an observer.
Definition: subject.cpp:5
virtual void onCharacterTyped(const unsigned char character)
Definition: text_field.cpp:145
std::shared_ptr< BaseTexture > getTexture()
Gets the texture.
Definition: skin.cpp:18
Light::Type getType() const noexcept
Gets the type.
Definition: light.cpp:89
std::string getText() const noexcept
Gets the text.
Definition: change_text_event.h:39
static std::shared_ptr< Area > create(std::shared_ptr< Skin > skin, glm::vec4 color, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
Area factory function.
Definition: area.cpp:10
float getAmbientIntensity() const noexcept
Gets the ambient intensity.
Definition: renderable.cpp:99
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: sprite_movement.cpp:91
Character getCharacter(const char text_char)
Gets the character.
Definition: font.cpp:13
std::string getPath() const noexcept
Gets the path.
Definition: map.cpp:13
Definition: event_type.h:40
float getWidth() const noexcept
Gets the width.
Definition: element.cpp:75
std::string getText() const noexcept
Gets the text string.
Definition: text.cpp:21
chaiscript::ModulePtr getChangeTextEventModule()
Definition: generated_registrations.h:1053
std::shared_ptr< Shader > getShader()
Gets the shader.
Definition: skin.cpp:22
chaiscript::ModulePtr getCameraModule()
Definition: generated_registrations.h:904
glm::vec3 getConeDirection() const noexcept
Gets the cone direction.
Definition: light.cpp:85
std::string getName() const noexcept
Gets the name.
Definition: base_texture.cpp:90
chaiscript::ModulePtr getShaderManagerModule()
Definition: generated_registrations.h:1006
int getInt(const std::string &key)
Gets an int from config.
Definition: config_manager.cpp:50
std::string getFontPath() const noexcept
Gets the font path.
Definition: font_generator.cpp:27
bool isPointWithin(glm::vec2 point) noexcept
Determines if point is within element.
Definition: element.cpp:111
virtual void onLeftClickRelease() override
Called when element has left click released over it.
Definition: text_area.cpp:73
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: camera.cpp:257
float getTextPadding() const noexcept
Gets the text padding.
Definition: element.cpp:91
float getKerning() const noexcept
Gets the kerning.
Definition: text.cpp:41
void resetAverageFPS() noexcept
Resets FPS Average.
Definition: fps_counter.cpp:32
virtual void onKeyRepeat(const int key) override
Called when a key is repeated while element is in focus.
Definition: text_area.cpp:93
void setShader(std::shared_ptr< Shader > shader)
Sets the shader.
Definition: text.cpp:33
chaiscript::ModulePtr getEngineModule()
Definition: generated_registrations.h:290
Definition: event_type.h:33
void activateScene(const std::string &name)
Activates a scene by name.
Definition: engine.cpp:62
virtual void onScroll(const glm::dvec2 position_change) override
Called when the mouse wheel is scrolled while element is in focus.
Definition: area.cpp:75
virtual void onKeyUp(const int key) override
Called when a key is released while element is in focus.
Definition: text_field.cpp:131
virtual void onCursorEnter() override
Called when the mosue cursor goes over the element.
Definition: text_field.cpp:98
chaiscript::ModulePtr getComponentModule()
Definition: generated_registrations.h:173
virtual bool load(const std::string &filename)
Loads the texture.
Definition: base_texture.cpp:24
Definition: event_type.h:39
void addScene(std::shared_ptr< Game::Scene > scene) noexcept
Adds a scene to the engine.
Definition: engine.cpp:30
chaiscript::ModulePtr getKeyUpEventModule()
Definition: generated_registrations.h:389
glm::vec4 getColor() const noexcept
Gets the color.
Definition: text.cpp:29
chaiscript::ModulePtr getLoadMapEventModule()
Definition: generated_registrations.h:528
bool isLightReactive() const noexcept
Determines if light reactive.
Definition: renderable.cpp:83
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: text_area.cpp:103
Definition: event_type.h:42
void setWindowName(const std::string &name)
Sets the window name.
Definition: graphics_system.cpp:116
chaiscript::ModulePtr getSuspendKeyInputEventModule()
Definition: generated_registrations.h:1212
static std::shared_ptr< TextArea > create(std::shared_ptr< Skin > skin, std::shared_ptr< WrappableText > text, glm::vec4 color, glm::vec4 text_color, float padding, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
TextArea factory function.
Definition: text_area.cpp:12
virtual void onLeftClick() override
Called when element is left clicked.
Definition: text_field.cpp:76
bool getActive() const noexcept
Gets active.
Definition: set_entity_active_event.h:38
chaiscript::ModulePtr getListCharactersEventModule()
Definition: generated_registrations.h:593
void setMaxInfluenceLights(const unsigned int number) noexcept
Sets the maximum number influencing lights.
Definition: graphics_system.cpp:216
chaiscript::ModulePtr getCursorEnterEventModule()
Definition: generated_registrations.h:437
chaiscript::ModulePtr getSceneGeneratorModule()
Definition: generated_registrations.h:749
chaiscript::ModulePtr getShaderModule()
Definition: generated_registrations.h:968
chaiscript::ModulePtr getSceneModule()
Definition: generated_registrations.h:723
float getNear() const noexcept
Gets the near z plane.
Definition: camera.cpp:202
static std::shared_ptr< ToggleLightsEvent > create(const bool on)
Factory function.
Definition: toggle_lights_event.h:30
Definition: event_type.h:20
Definition: event_type.h:43
void setWidth(const float width) noexcept
Sets the width.
Definition: camera.cpp:182
virtual void onDestroy() override
Called when the engine is shutting down.
Definition: text_area.cpp:38
virtual void onLeftClick() override
Called when element is left clicked.
Definition: text_area.cpp:67
static std::shared_ptr< WindowExitEvent > create()
Factory Function.
Definition: window_exit_event.h:27
chaiscript::ModulePtr getWindowExitEventModule()
Definition: generated_registrations.h:578
unsigned int getHeight() const noexcept
Gets the height.
Definition: base_texture.cpp:20
Definition: event_type.h:32
Definition: event_type.h:22
void removeComponents(std::vector< std::shared_ptr< Component >> components)
Removes components.
Definition: component_manager.cpp:40
void setTransform(std::shared_ptr< Transform > transform)
Sets the transform.
Definition: component.cpp:39
chaiscript::ModulePtr getSetEntityActiveEventModule()
Definition: generated_registrations.h:240
void removeLight(std::shared_ptr< Light > light)
Removes a light.
Definition: graphics_system.cpp:228
void setAmbientLight(const glm::vec3 color) noexcept
Sets the ambient light.
Definition: renderable.cpp:87
unsigned int getLayerNumber() const noexcept
Gets the layer number.
Definition: toggle_layer_event.h:48
Definition: event_type.h:31
std::shared_ptr< Skin > getSkin() const noexcept
Gets the UI skin.
Definition: element.cpp:52
void clearInfluencingLights()
Clears all influencing lights.
Definition: renderable.cpp:107
Definition: event_type.h:13
Class for shader manager.
Definition: shader_manager.h:15
chaiscript::ModulePtr getSpriteMoveEventModule()
Definition: generated_registrations.h:803
chaiscript::ModulePtr getEventTypeModule()
Definition: generated_registrations.h:79
Class for vertex data.
Definition: vertex_data.h:17
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: scene.cpp:14
static std::shared_ptr< ListLayersEvent > create()
Factory function.
Definition: list_layers_event.h:26
bool getActive() const noexcept
Gets active.
Definition: set_active_event.h:38
bool textureExists(const std::string &name) const noexcept
Function to see if texture with name exists.
Definition: texture_manager.cpp:45
glm::vec3 getAmbientLight() const noexcept
Gets the ambient light.
Definition: renderable.cpp:91
void setActive(const bool active) noexcept
Sets the component active or inactive.
Definition: component.cpp:47
int getScreenPaddingInTiles() const noexcept
Gets the screen padding in tiles.
Definition: camera.cpp:178
virtual void onLeftClick() override
Called when element is left clicked.
Definition: area.cpp:44
bool isActive() const noexcept
Determines if active.
Definition: entity.cpp:48
Definition: event_type.h:17
chaiscript::ModulePtr getMouseScrollEventModule()
Definition: generated_registrations.h:325
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: sprite_movement.cpp:95
Definition: event_type.h:26
float getWidth() const noexcept
Gets the width.
Definition: camera.cpp:186
chaiscript::ModulePtr getLoadCharacterEventModule()
Definition: generated_registrations.h:643
chaiscript::ModulePtr getDebugParserModule()
Definition: generated_registrations.h:659
virtual void onKeyUp(const int key) override
Called when a key is released while element is in focus.
Definition: area.cpp:69
void setNear(const float near) noexcept
Sets the near z plane.
Definition: camera.cpp:198
bool loadTexture(const std::string &path)
Loads a texture.
Definition: texture_manager.cpp:21
virtual void setText(const std::string &text) override
Sets the text string.
Definition: wrappable_text.cpp:54
virtual void onRightClickRelease() override
Called when element has right click released over it.
Definition: text_area.cpp:77
chaiscript::ModulePtr getListMapsEventModule()
Definition: generated_registrations.h:608
Definition: event_type.h:27
Definition: event_type.h:24
A container holding a base transform, a vector of components, and a vector of entities.
Definition: scene.h:16
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: component.cpp:43
glm::vec2 getVelocity() const noexcept
Gets the velocity.
Definition: sprite_move_event.h:41
void setColor(const glm::vec4 color) noexcept
Sets the color.
Definition: element.cpp:103
std::string getStrippedMapName(const std::string path)
Strips path specification from map name.
Definition: scene_generator.cpp:668
void setAnchorPoint(const glm::vec2 anchor_point)
Sets the anchor point.
Definition: element.cpp:64
std::map< unsigned int, std::shared_ptr< BaseTexture > > getTextures() const noexcept
Gets the textures.
Definition: renderable.cpp:75
Definition: wrappable_text.h:25
void setText(std::shared_ptr< WrappableText > text)
Sets the text.
Definition: text_area.cpp:30
virtual void onCursorLeave() override
Called when the mouse cursor goes off the element.
Definition: text_area.cpp:84
void setConeDirection(const glm::vec3 direction) noexcept
Sets the cone direction.
Definition: light.cpp:81
float getLinearAttenuation() const noexcept
Gets the linear attenuation.
Definition: light.cpp:49
std::shared_ptr< Entity > getDynamicEntityByName(const std::string &name)
Gets a dynamic entity by name.
Definition: scene_generator.cpp:310
chaiscript::ModulePtr getWrappableTextModule()
Definition: generated_registrations.h:1140
Definition: event_type.h:16
void addCollisionData(std::shared_ptr< Physics::CollisionData > collision_data)
Adds a collision data.
Definition: sprite_movement.cpp:19
void addComponents(std::vector< std::shared_ptr< Component >> components)
Adds components.
Definition: scene.cpp:27
virtual void onRightClick() override
Called when element is right clicked.
Definition: text_area.cpp:70
virtual void bind(const unsigned int texture_unit)
Binds texture to opengl on the texture unit.
Definition: base_texture.cpp:69
unsigned int getWidth() const noexcept
Gets the width.
Definition: base_texture.cpp:16
virtual void onRightClickRelease() override
Called when element has right click released over it.
Definition: text_field.cpp:94
void setQuadraticAttenuation(const float quadratic) noexcept
Sets the quadratic attenuation.
Definition: light.cpp:53
chaiscript::ModulePtr getLightTypeModule()
Definition: generated_registrations.h:119
virtual void onRightClick() override
Called when element is right clicked.
Definition: area.cpp:48
Definition: event_type.h:30
float getQuadraticAttenuation() const noexcept
Gets the quadratic attenuation.
Definition: light.cpp:57
std::vector< std::string > getActiveSceneNames() const noexcept
Gets the active scene names.
Definition: engine.cpp:92
virtual void onCursorEnter() override
Called when the mosue cursor goes over the element.
Definition: text_area.cpp:81
chaiscript::ModulePtr getInputSystemModule()
Definition: generated_registrations.h:310
std::string getClassName() const noexcept
Definition: script_object.cpp:20
void setFreeCameraSpeed(const float speed) noexcept
Sets the free camera speed when in free camera mode.
Definition: camera.cpp:214
chaiscript::ModulePtr getRenderableModule()
Definition: generated_registrations.h:874
void setShader(std::shared_ptr< Shader > shader_object) noexcept
Sets the shader.
Definition: renderable.cpp:55
Definition: event_type.h:41
std::vector< std::string > getDynamicEntityNames() const noexcept
Gets all dynamic entity names.
Definition: scene_generator.cpp:319
bool turnOn() const noexcept
Turn the layer on?
Definition: toggle_layer_event.h:42
chaiscript::ModulePtr getFontGeneratorModule()
Definition: generated_registrations.h:1244
virtual void onScroll(const glm::dvec2 position_change) override
Called when the mouse wheel is scrolled while element is in focus.
Definition: text_field.cpp:142
float getAverageFPS() const noexcept
Gets the average fps.
Definition: fps_counter.cpp:25
virtual void notifyNow(std::shared_ptr< Event > event)
notifyNow is used to tell observers of an event as an interrupt.
Definition: subject.cpp:19
void setName(const std::string name) noexcept
Sets the name.
Definition: scene.cpp:61
virtual void onKeyDown(const int key) override
Called when a key is pressed while element is in focus.
Definition: text_field.cpp:106
void setHeight(const float height) noexcept
Sets the height.
Definition: element.cpp:87
chaiscript::ModulePtr getListLayersEventModule()
Definition: generated_registrations.h:513
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: entity.cpp:37
Definition: wrappable_text.h:25
Definition: wrappable_text.h:25
void setMoveQuantization(const float number_of_tiles)
Sets the move quantization.
Definition: sprite_movement.cpp:83
chaiscript::ModulePtr getBaseTextureModule()
Definition: generated_registrations.h:985
void setName(const std::string name) noexcept
Sets the name.
Definition: base_texture.cpp:86
bool loadShader(const std::string &name, const bool geometry_shader=false)
Loads a shader.
Definition: shader_manager.cpp:28
void timeToExit() noexcept
This is to signal the engine that it is time to shut down.
Definition: engine.cpp:26
void setUniform(const Uniform &uniform)
Sets the uniform.
Definition: shader.cpp:411
Definition: wrappable_text.h:20
std::list< std::shared_ptr< Component > > & getComponents() noexcept
Gets the components.
Definition: entity.cpp:33
float getFloat(const std::string &key)
Gets a float from config.
Definition: config_manager.cpp:68
int windowWidth()
Getter for the window height.
Definition: graphics_system.cpp:90
std::shared_ptr< WrappableText > getText() const noexcept
Gets the text.
Definition: text_area.cpp:34
std::map< char, Character > getCharacters() const
Gets the characters.
Definition: font.cpp:17
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: wrappable_text.cpp:184
void setConeAngle(const float angle) noexcept
Sets the cone angle.
Definition: light.cpp:73
virtual void onRightClick() override
Called when element is right clicked.
Definition: text_field.cpp:87
void setName(const std::string &name)
Sets the name.
Definition: shader.cpp:493
virtual void onRightClickRelease() override
Called when element has right click released over it.
Definition: area.cpp:56
chaiscript::ModulePtr getCursorLeaveEventModule()
Definition: generated_registrations.h:468
virtual void onCursorLeave() override
Called when the mouse cursor goes off the element.
Definition: text_field.cpp:102
glm::vec3 getColor() const noexcept
Gets the color.
Definition: light.cpp:33
std::shared_ptr< Game::Scene > findSceneByName(const std::string &name) noexcept
Finds a scene by name.
Definition: engine.cpp:34
void setTexture(const std::shared_ptr< BaseTexture > &texture)
Sets the texture.
Definition: skin.cpp:10
chaiscript::ModulePtr getAreaModule()
Definition: generated_registrations.h:1022
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: shader.cpp:500
void setHeight(const float height) noexcept
Sets the height.
Definition: camera.cpp:190
std::vector< std::shared_ptr< Entity > > getEntities() const noexcept
Gets all entities.
Definition: scene.cpp:57
virtual void onCursorLeave() override
Called when the mouse cursor goes off the element.
Definition: area.cpp:63
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: element.cpp:217
chaiscript::ModulePtr getTextAreaModule()
Definition: generated_registrations.h:1069
chaiscript::ModulePtr getCharacterTypedEventModule()
Definition: generated_registrations.h:373
float getMaxFPS() const noexcept
Gets the maximum fps.
Definition: fps_counter.cpp:17
chaiscript::ModulePtr getScriptObjectModule()
Definition: generated_registrations.h:707
Class wrapper for Tmx::Map.
Definition: map.h:11
void removeComponent(std::shared_ptr< Component > component)
Removes a component.
Definition: component_manager.cpp:31
chaiscript::ModulePtr getTextFieldModule()
Definition: generated_registrations.h:1106
std::string windowName() const noexcept
Getter for the window name.
Definition: graphics_system.cpp:110
float influenceOnComponent(const Component &component) const
Calculates a light's influence on a given component.
Definition: light.cpp:93
std::vector< std::string > getStringVector(const std::string &key)
Gets a string vector from config.
Definition: config_manager.cpp:22
void removeTexture(const unsigned int unit)
Removes a texture.
Definition: renderable.cpp:71
std::string getString(const std::string &key)
Gets a string from config.
Definition: config_manager.cpp:62
virtual void onKeyRepeat(const int key) override
Called when a key is repeated while element is in focus.
Definition: area.cpp:72
int getNumberOfQuantizedBands() const noexcept
Gets the number of quantized bands.
Definition: light.cpp:69
void setSize(float width, float height)
Sets the size.
Definition: wrappable_text.cpp:19
glm::vec4 getColor() const noexcept
Gets the color.
Definition: element.cpp:99
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: text.cpp:45
static std::shared_ptr< TextField > create(std::shared_ptr< Skin > skin, std::shared_ptr< WrappableText > default_text, std::shared_ptr< WrappableText > typed_text, glm::vec4 background_color, float padding, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
TextField factory function.
Definition: text_field.cpp:19
void setScreenPaddingInTiles(const int padding) noexcept
Sets the screen padding in tiles.
Definition: camera.cpp:174
virtual void onStart() override
Called when the engine starts and when a new scene is loaded.
Definition: text_area.cpp:42
std::shared_ptr< Shader > getShader() const noexcept
Gets the shader.
Definition: renderable.cpp:59
unsigned int getSize() const noexcept
Gets the size.
Definition: font.cpp:21
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: base_texture.cpp:94
chaiscript::ModulePtr getSubjectModule()
Definition: generated_registrations.h:483
chaiscript::ModulePtr getWrappableTextHorizontalAlignmentModule()
Definition: generated_registrations.h:130
bool isActive() const noexcept
Determines if active.
Definition: component.cpp:51
std::vector< unsigned int > getUnsignedIntVector(const std::string &key)
Gets an unsigned int vector from config.
Definition: config_manager.cpp:35
Definition: event_type.h:18
Definition: wrappable_text.h:20
chaiscript::ModulePtr getToggleLightsEventModule()
Definition: generated_registrations.h:676
chaiscript::ModulePtr getEventModule()
Definition: generated_registrations.h:499
std::shared_ptr< BaseTexture > getTexture(const std::string &name) const
Gets the texture.
Definition: texture_manager.cpp:38
chaiscript::ModulePtr getConfigManagerModule()
Definition: generated_registrations.h:623
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: scene.cpp:18
void handleEvents()
Handles queued debug parser events.
Definition: debug_parser.cpp:31
virtual bool isLoaded() const noexcept
Determines if loaded.
Definition: base_texture.cpp:82
EventType getEventType() const
Gets the event type.
Definition: event.h:27
static std::shared_ptr< SetEntityActiveEvent > create(const bool active)
Factory function.
Definition: set_entity_active_event.h:32
Definition: event_type.h:28
Definition: event_type.h:14
void setShader(const std::shared_ptr< Shader > &shader)
Sets the shader.
Definition: skin.cpp:14
void addLight(std::shared_ptr< Light > light) noexcept
Adds a light.
Definition: graphics_system.cpp:224
Definition: event_type.h:21
void addEntities(std::vector< std::shared_ptr< Entity >> entities) noexcept
Adds entities.
Definition: scene.cpp:47
virtual void onKeyUp(const int key) override
Called when a key is released while element is in focus.
Definition: text_area.cpp:90
float getOpenGLSize() const noexcept
Gets the open gl size.
Definition: font.cpp:25
virtual void onKeyDown(const int key) override
Called when a key is pressed while element is in focus.
Definition: text_area.cpp:87
void setWidth(const float width) noexcept
Sets the width.
Definition: element.cpp:83
chaiscript::ModulePtr getEntityModule()
Definition: generated_registrations.h:154
virtual std::string to_string() const noexcept
Returns a string representation of the object.
Definition: component.cpp:63
chaiscript::ModulePtr getMouseButtonDownEventModule()
Definition: generated_registrations.h:452
std::shared_ptr< Scene > createSceneFromMap(const unsigned int patch_width_tiles, const unsigned int patch_height_tiles, const Map &map)
Creates a scene from a map.
Definition: scene_generator.cpp:276
Definition: event_type.h:34
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: component_manager.cpp:10
chaiscript::ModulePtr getSpriteMovementModule()
Definition: generated_registrations.h:767
void addInfluencingLight(std::shared_ptr< Light > light) noexcept
Adds an influencing light.
Definition: renderable.cpp:103
int windowHeight()
Getter for the window width.
Definition: graphics_system.cpp:100
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: entity.cpp:9
float getHeight() const noexcept
Gets the height.
Definition: camera.cpp:194
static std::shared_ptr< SetActiveEvent > create(const bool active)
Factory function.
Definition: set_active_event.h:32
std::string getName() const noexcept
Gets the name.
Definition: shader.cpp:497
std::map< std::shared_ptr< Game::Scene >, bool > getScenes() const noexcept
Gets the scenes.
Definition: engine.cpp:57
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: renderable.cpp:259
Definition: event_type.h:37
virtual void removeObserver(std::shared_ptr< Observer > observer)
Removes an observer.
Definition: subject.cpp:9
bool isComponentWithin(const Component &component) const
Determines if component within.
Definition: camera.cpp:230
chaiscript::ModulePtr getTransformModule()
Definition: generated_registrations.h:194
void loadFont(const std::string &ttf_file, const unsigned int size, const std::string &name="")
Loads a font.
Definition: font_generator.cpp:31
chaiscript::ModulePtr getSetUniformEventModule()
Definition: generated_registrations.h:858
chaiscript::ModulePtr getElementModule()
Definition: generated_registrations.h:1181
float getFreeCameraSpeed() const noexcept
Gets the free camera speed when in free camera mode.
Definition: camera.cpp:218
chaiscript::ModulePtr getTextModule()
Definition: generated_registrations.h:1299
static std::shared_ptr< ToggleLayerEvent > create(const unsigned int layer_number, const bool on)
Factory function.
Definition: toggle_layer_event.h:36
std::string getName() const noexcept
Gets the name.
Definition: load_map_event.h:39
std::shared_ptr< Shader > getShader(const std::string &name) const
Gets the shader.
Definition: shader_manager.cpp:145
void setUniformForAllPrograms(const Uniform &u)
Sets the uniform for all programs.
Definition: shader_manager.cpp:152
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: area.cpp:82
virtual void onLeftClickRelease() override
Called when element has left click released over it.
Definition: text_field.cpp:90
chaiscript::ModulePtr getToggleFreeCameraEventModule()
Definition: generated_registrations.h:692
chaiscript::ModulePtr getGraphicsSystemModule()
Definition: generated_registrations.h:820
Definition: event_type.h:23
void setFar(const float far) noexcept
Sets the far z plane.
Definition: camera.cpp:206
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: text.cpp:119
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: text_field.cpp:153
static std::shared_ptr< ChangeTextEvent > create(const std::string &text)
ChangeTextEvent factory function.
Definition: change_text_event.h:33
chaiscript::ModulePtr getToggleLayerEventModule()
Definition: generated_registrations.h:561
float getFar() const noexcept
Gets the far z plane.
Definition: camera.cpp:210
void setActive(const bool active) noexcept
Sets entity active or inactive.
Definition: entity.cpp:41
virtual void onCursorEnter() override
Called when the mosue cursor goes over the element.
Definition: area.cpp:60
chaiscript::ModulePtr getComponentManagerModule()
Definition: generated_registrations.h:256
Definition: wrappable_text.h:20
std::shared_ptr< Font > getFont(const std::string &name) const noexcept
Gets the font.
Definition: font_generator.cpp:132
void registerModules(std::shared_ptr< chaiscript::ChaiScript > chai)
Definition: generated_registrations.h:1356
void setColor(const glm::vec4 &color)
Sets the color.
Definition: text.cpp:25
void setHorizontalAlignment(const HorizontalAlignment &alignment)
Sets the horizontal alignment.
Definition: wrappable_text.cpp:11
bool removeRenderable(const int id)
Removes a renderable from the renderable pool.
Definition: graphics_system.cpp:127
virtual void onScroll(const glm::dvec2 position_change) override
Called when the mouse wheel is scrolled while element is in focus.
Definition: text_area.cpp:96
void setClassName(const std::string &name)
Sets the class name on the scripting object.
Definition: script_object.cpp:16
void removeComponent(std::shared_ptr< Component > component)
Removes a component.
Definition: entity.cpp:23
std::string getName() const noexcept
Gets the name.
Definition: load_character_event.h:38
static std::shared_ptr< ListCharactersEvent > create()
Factory function.
Definition: list_characters_event.h:26
chaiscript::ModulePtr getFPSCounterModule()
Definition: generated_registrations.h:544
static std::shared_ptr< ListMapsEvent > create()
Factory function.
Definition: list_maps_event.h:26
chaiscript::ModulePtr getMouseButtonUpEventModule()
Definition: generated_registrations.h:341
virtual std::string className() const noexcept
Returns a string representing the class name.
Definition: component.cpp:69
void parseCommand(const std::string &command)
Parses a debug command.
Definition: debug_parser.cpp:46
void setFontPath(const std::string &font_path) noexcept
Sets the font path.
Definition: font_generator.cpp:23
void setTransform(std::shared_ptr< Transform > transform) noexcept
Sets the transform.
Definition: scene.cpp:10
void setTextPadding(const float text_padding) noexcept
Sets the text padding.
Definition: element.cpp:95
void setMovingSpeed(const float speed)
Sets the moving speed.
Definition: sprite_movement.cpp:79
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: text_field.cpp:157