#pragma once #include #include #include #include #if !defined(PLATFORM_IOS) && !defined(PLATFORM_TVOS) #include #endif #include "uielement.hpp" #include "file.hpp" class GFXBuffer; namespace ui { class Screen { public: Screen() {} Screen(const file::Path path); void process_event(const std::string& type, std::string data = ""); void process_mouse(const int x, const int y); void calculate_sizes(); std::vector elements; UIElement* find_element(const std::string& id); using CallbackFunction = std::function; std::map listeners; bool blurs_background = false; void add_listener(const std::string& id, std::function callback); Extent extent; bool view_changed = false; GFXBuffer* glyph_buffer = nullptr; GFXBuffer* instance_buffer = nullptr; GFXBuffer* elements_buffer = nullptr; std::string script_path; #if !defined(PLATFORM_IOS) && !defined(PLATFORM_TVOS) sol::environment env; #endif }; }