SDLU/examples/header.hpp

32 lines
597 B
C++
Raw Normal View History

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