Skip to content
Jakob Sinclair edited this page May 22, 2015 · 3 revisions

Screen

Screen is a class in TidyEngine that represents the SDL window itself. It also handles the SDL renderer. The destructor handles the destroying of the window and renderer so don't worry about that.

Public functions

int getWidth() returns the width of the window that is stored in the Screen object.
int getHeight() returns the height of the window that is stored in the Screen object.
const char getTitle()* returns the title of the window that is stored in the Screen object. SDL_Window getWindow()* returns a pointer, that is stored in the screen object, to the actual window itself.
SDL_Renderer getRenderer()* returns a pointer, that is stored in the screen object, to the actual renderer itself.
bool createNewWindow(int width, int height, const char title)* creates a new window and a renderer for that window. Returns true if no errors where found.

Clone this wiki locally