Added default font and exception throwing to replace some nullptr returns
This commit is contained in:
@@ -18,7 +18,7 @@ struct SDL_WindowDeleter {
|
||||
class SdlRenderer : public Renderer {
|
||||
public:
|
||||
~SdlRenderer();
|
||||
void draw_text(TextRenderDetails details, std::string text, int x, int y) override;
|
||||
void draw_text(std::optional<TextRenderDetails> details, std::string text, int x, int y) override;
|
||||
void initialize(RendererParams params) override;
|
||||
void flush() override;
|
||||
void draw_point(int x, int y, Color color) override;
|
||||
@@ -31,7 +31,6 @@ private:
|
||||
std::shared_ptr<SDL_Renderer> renderer = nullptr;
|
||||
std::unique_ptr<SdlTextureManager> texture_manager = nullptr;
|
||||
std::unique_ptr<SdlFontManager> font_manager = nullptr;
|
||||
|
||||
void render_texture(int x, int y, const std::shared_ptr<SDL_Texture>& texture, SDL_Rect *src);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user