diff --git a/sdlpp/Makefile b/sdlpp/Makefile index a2779c0..e08cd29 100644 --- a/sdlpp/Makefile +++ b/sdlpp/Makefile @@ -28,7 +28,7 @@ SDLPPLIBRARY = libsdlpp.dll LIBRARYFLAGS = endif -OBJECTFILES = sdlpp_circlecolider.${OBJEXT} sdlpp_circlerenderer.${OBJEXT} sdlpp_collision.${OBJEXT} sdlpp_common.${OBJEXT} sdlpp_font.${OBJEXT} sdlpp_linerenderer.${OBJEXT} sdlpp_rectcolider.${OBJEXT} sdlpp_rectrenderer.${OBJEXT} sdlpp_renderer.${OBJEXT} sdlpp_renderobject.${OBJEXT} sdlpp_scene.${OBJEXT} sdlpp_textrenderer.${OBJEXT} sdlpp_texture.${OBJEXT} sdlpp_window.${OBJEXT} +OBJECTFILES = sdlpp_circlecolider.${OBJEXT} sdlpp_circlerenderer.${OBJEXT} sdlpp_collision.${OBJEXT} sdlpp_common.${OBJEXT} sdlpp_font.${OBJEXT} sdlpp_linerenderer.${OBJEXT} sdlpp_rectcolider.${OBJEXT} sdlpp_rectrenderer.${OBJEXT} sdlpp_renderer.${OBJEXT} sdlpp_renderobject.${OBJEXT} sdlpp_scene.${OBJEXT} sdlpp_textrenderer.${OBJEXT} sdlpp_texture.${OBJEXT} sdlpp_window.${OBJEXT} sdlpp_fontconfiguration.${OBJEXT} all: ${SDLPPLIBRARY} diff --git a/sdlpp/sdlpp_fontconfiguration.cpp b/sdlpp/sdlpp_fontconfiguration.cpp new file mode 100644 index 0000000..351d25b --- /dev/null +++ b/sdlpp/sdlpp_fontconfiguration.cpp @@ -0,0 +1,35 @@ +#include "sdlpp_fontconfiguration.hpp" + +namespace SDLPP { +FontConfiguration::FontConfiguration( std::shared_ptr< Font > font, const std::string &color, + const std::string &outline_color, double outline_size ) { + _font = font; + _color = color; + _outline_color = outline_color; + _outline_size = outline_size; +} + +const std::shared_ptr< Font > &FontConfiguration::getFont() { + return _font; +} + +const std::string &FontConfiguration::getColor() { + return _color; +} + +const std::string &FontConfiguration::getOutlineColor() { + return _outline_color; +} + +const double &FontConfiguration::getOutlineSize() { + return _outline_size; +} + +void FontConfiguration::setColor( const std::string &color ) { + _color = color; +} + +void FontConfiguration::setOutlineColor( const std::string &outline_color ) { + _outline_color = outline_color; +} +} diff --git a/sdlpp/sdlpp_fontconfiguration.hpp b/sdlpp/sdlpp_fontconfiguration.hpp index d3bb44e..5e2d7b8 100644 --- a/sdlpp/sdlpp_fontconfiguration.hpp +++ b/sdlpp/sdlpp_fontconfiguration.hpp @@ -10,36 +10,13 @@ class SDLPPSCOPE FontConfiguration { public: FontConfiguration() = delete; FontConfiguration( std::shared_ptr< Font > font, const std::string &color, - const std::string &outline_color, double outline_size ) { - _font = font; - _color = color; - _outline_color = outline_color; - _outline_size = outline_size; - } - - const std::shared_ptr< Font > &getFont() { - return _font; - } - - const std::string &getColor() { - return _color; - } - - const std::string &getOutlineColor() { - return _outline_color; - } - - const double &getOutlineSize() { - return _outline_size; - } - - void setColor( const std::string &color ) { - _color = color; - } - - void setOutlineColor( const std::string &outline_color ) { - _outline_color = outline_color; - } + const std::string &outline_color, double outline_size ); + const std::shared_ptr< Font > &getFont(); + const std::string &getColor(); + const std::string &getOutlineColor(); + const double &getOutlineSize(); + void setColor( const std::string &color ); + void setOutlineColor( const std::string &outline_color ); private: std::shared_ptr< Font > _font;