35 lines
980 B
C++
35 lines
980 B
C++
#pragma once
|
|
|
|
#include "page.h"
|
|
#include "text_cache.h"
|
|
#include <SDL3_ttf/SDL_ttf.h>
|
|
#include <string>
|
|
|
|
// Shown when the user tries to open Play or the Proclamation list while the
|
|
// stored license has not been confirmed valid. ESC pops back to the main
|
|
// screen. A generic message page for other guard conditions can reuse this.
|
|
class LicenseBlockedPage : public Page {
|
|
public:
|
|
void onPush(AppState& state) override;
|
|
void onResume(AppState& state) override;
|
|
void onPause(AppState& state) override;
|
|
void onPop(AppState& state) override;
|
|
void handleEvent(const SDL_Event& event) override;
|
|
void update(float dt) override;
|
|
void render(SDL_Renderer* renderer) override;
|
|
|
|
private:
|
|
void createFonts();
|
|
void destroyFonts();
|
|
void destroyTextures();
|
|
|
|
AppState* state_ = nullptr;
|
|
|
|
TTF_Font* fontMessage_ = nullptr;
|
|
TTF_Font* fontPrompt_ = nullptr;
|
|
|
|
CachedText messageText_;
|
|
CachedText infoText_;
|
|
CachedText promptText_;
|
|
};
|