#pragma once #include "page.h" #include "text_cache.h" #include #include // Text-entry page for the Kiosk's System Name (a human-readable label for this // License Key). Saves locally first, then syncs in the background so the UI is // never blocked on the network. class SystemNamePage : 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(); void submit(); void pollSyncResult(); AppState* state_ = nullptr; std::string storedValue_; std::string input_; std::string statusMessage_; bool statusIsError_ = false; TTF_Font* fontTitle_ = nullptr; TTF_Font* fontHeader_ = nullptr; TTF_Font* fontBody_ = nullptr; TTF_Font* fontSmall_ = nullptr; CachedText titleText_; CachedText storedText_; CachedText valueText_; CachedText statusText_; CachedText hintText_; };