Added protected OnEvent functions for inheritance
This commit is contained in:
parent
0611493afd
commit
10d19f7f58
6 changed files with 98 additions and 18 deletions
|
@ -1,2 +1,30 @@
|
|||
#pragma once
|
||||
#include "SDLU.hpp"
|
||||
#include "SDLU.hpp"
|
||||
#include <iostream>
|
||||
|
||||
class MyWindow :
|
||||
public sdlu::RenderWindow
|
||||
{
|
||||
public:
|
||||
MyWindow(Uint32 width, Uint32 height, const char* title) :
|
||||
RenderWindow(sdlu::Vector2u(width, height), title, NULL, NULL)
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
};
|
||||
|
||||
void sdlu::RenderWindow::OnCreate()
|
||||
{
|
||||
std::cout << "Window was Created!" << std::endl;
|
||||
}
|
||||
|
||||
bool sdlu::RenderWindow::OnResize()
|
||||
{
|
||||
std::cout << "Window was Resized!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
void sdlu::RenderWindow::OnClose()
|
||||
{
|
||||
std::cout << "Window was Closed!" << std::endl;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue