Fixed error in OnXXXX functions
This commit is contained in:
parent
0292a167c0
commit
587454e708
5 changed files with 61 additions and 17 deletions
|
@ -24,4 +24,17 @@ namespace sdlu
|
|||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
void RenderWindow::OnCreate()
|
||||
{
|
||||
}
|
||||
|
||||
bool RenderWindow::OnResize()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void RenderWindow::OnClose()
|
||||
{
|
||||
}
|
||||
}
|
|
@ -43,11 +43,30 @@ namespace sdlu
|
|||
* @param[in] title The title of the create window
|
||||
*/
|
||||
RenderWindow(Vector2u dimension, const std::string& title,
|
||||
Uint32 windowFlags);
|
||||
Uint32 windowFlags = SDL_WINDOW_SHOWN);
|
||||
|
||||
RenderWindow(const RenderWindow& other) = delete;
|
||||
RenderWindow(const RenderWindow&& other) = delete;
|
||||
|
||||
virtual ~RenderWindow();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Function called after Window creation
|
||||
*/
|
||||
virtual void OnCreate();
|
||||
|
||||
/**
|
||||
* @brief Function called after resize event
|
||||
*
|
||||
* @return True if the resize event should not be returned via
|
||||
* PollEvent()
|
||||
*/
|
||||
virtual bool OnResize();
|
||||
|
||||
/**
|
||||
* @brief Function called after closing the window
|
||||
*/
|
||||
virtual void OnClose();
|
||||
};
|
||||
}
|
|
@ -237,4 +237,17 @@ namespace sdlu
|
|||
size.x, size.y, 32, 8 * size.x, SDL_PIXELFORMAT_RGBA32);
|
||||
this->SetMouseCursor(surface, clickspot);
|
||||
}
|
||||
|
||||
void Window::OnCreate()
|
||||
{
|
||||
}
|
||||
|
||||
bool Window::OnResize()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Window::OnClose()
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue