// // Window.hpp // gui // // Created by Bob Polis at 2020-10-14 // Copyright (c) 2020 SwiftCoder. All rights reserved. // #ifndef __WINDOW_H_ #define __WINDOW_H_ #include #include #include #include class Window { public: Window(const char* title); SDL_Window* get_window() const { return _w.get(); } void set_size(int w, int h); void update() const; void load_image(); private: std::string _path; std::unique_ptr _w {nullptr, SDL_DestroyWindow}; std::unique_ptr _r {nullptr, SDL_DestroyRenderer}; std::unique_ptr _t {nullptr, SDL_DestroyTexture}; }; #endif // __WINDOW_H_