tomato/src/screen.hpp

16 lines
283 B
C++
Raw Normal View History

2023-07-26 12:24:18 +02:00
#pragma once
2023-07-30 15:10:26 +02:00
#include <SDL3/SDL.h>
2023-07-26 12:24:18 +02:00
struct Screen {
virtual ~Screen(void) = default;
2023-07-30 15:10:26 +02:00
// return true if handled
virtual bool handleEvent(SDL_Event& e) { return false; }
2023-07-26 12:24:18 +02:00
// return nullptr if not next
// sets bool quit to true if exit
virtual Screen* poll(bool& quit) = 0;
};