SDLU/examples/header.hpp

32 lines
597 B
C++
Raw Permalink Normal View History

2020-05-16 10:34:20 +00:00
#pragma once
#include <iostream>
2021-04-23 13:08:51 +00:00
#include <SDLU.hpp>
class MyWindow :
public sdlu::RenderWindow
{
public:
MyWindow(Uint32 width, Uint32 height, const char* title) :
2020-05-16 18:09:21 +00:00
RenderWindow(sdlu::Vector2u(width, height), title,
2021-04-23 13:08:51 +00:00
32)
{
// Empty
}
2020-05-20 14:05:45 +00:00
private:
virtual void OnCreate()
{
std::cout << "MyWindow created!" << std::endl;
}
2020-05-20 14:05:45 +00:00
virtual bool OnResize()
{
std::cout << "MyWindow resized!" << std::endl;
return true;
}
2020-05-20 14:05:45 +00:00
virtual void OnClose()
{
std::cout << "MyWindow closed!" << std::endl;
}
};