25 #include <SDL2/SDL_ttf.h> 27 #include "../Display.h" 29 #include "../UiViewModel.h" 31 #if defined(_WIN32) && defined(HR_ENGINE_SHARED) 33 # define MR_DllDeclare __declspec( dllexport ) 35 # define MR_DllDeclare __declspec( dllimport ) 38 # define MR_DllDeclare 72 void AttachView(
Button &model)
override;
74 void AttachView(
FillBox &model)
override;
76 void AttachView(
Label &model)
override;
77 void AttachView(
Picture &model)
override;
78 void AttachView(
RuleLine &model)
override;
80 void AttachView(
Slider &model)
override;
82 void AttachView(
Wallpaper &model)
override;
85 std::shared_ptr<TypeCase> MakeTypeCase(
const UiFont &font)
override;
87 std::shared_ptr<SdlTexture> LoadRes(std::shared_ptr<
Res<Texture>> res);
92 void OnDesktopModeChanged(
int width,
int height)
override;
93 void OnDisplayConfigChanged()
override;
95 void Screenshot()
override;
98 void ApplyVideoMode();
109 TTF_Font *LoadTtfFont(
const UiFont &font,
bool uiScale =
true);
113 void DrawUiTexture(SDL_Texture *texture,
const Vec2 &relPos,
115 void DrawUiTexture(SDL_Texture *texture,
const Vec2 &relPos,
Draws a single texture.
Definition: Picture.h:52
A horizontal or vertical line.
Definition: RuleLine.h:54
Paints a texture across the entire screen.
Definition: Wallpaper.h:53
Describes a font used for the UI.
Definition: UiFont.h:44
Base class for loadable textures.
Definition: Res.h:94
loadedFonts_t loadedFonts
Definition: SdlDisplay.h:127
Base class for widgets that contain other widgets.
Definition: BaseContainer.h:63
A static text label.
Definition: Label.h:51
MR_UInt32 uiLayoutFlags_t
Definition: UiLayoutFlags.h:53
int GetScreenHeight() const
Definition: SdlDisplay.h:102
#define MR_DllDeclare
Definition: SdlDisplay.h:38
A slider for selecting values from a range.
Definition: Slider.h:52
VideoServices::VideoBuffer * legacyDisplay
Definition: SdlDisplay.h:123
Paints a solid color over the whole screen with adjustable opacity.
Definition: ScreenFade.h:51
Base class for display managers.
Definition: Display.h:73
Icon for a keycap (keyboard key or gamepad button(.
Definition: KeycapIcon.h:43
std::pair< std::string, int > loadedFontKey
Definition: SdlDisplay.h:125
Video framebuffer for legacy (8-bit, palettized) rendering.
Definition: VideoBuffer.h:54
VideoServices::VideoBuffer & GetLegacyDisplay() const override
Retrieve the legacy (8-bit) framebuffer.
Definition: SdlDisplay.h:91
std::map< loadedFontKey, TTF_Font * > loadedFonts_t
Definition: SdlDisplay.h:126
int width
Definition: SdlDisplay.h:122
A colored rectangle, that's all.
Definition: FillBox.h:51
A text widget where the contents may change often (i.e., updated every few frames, or even every frame).
Definition: ActiveText.h:49
Base class for clickable areas.
Definition: ClickRegion.h:49
SDL_Window * window
Definition: SdlDisplay.h:120
SDL_Renderer * renderer
Definition: SdlDisplay.h:121
One of the predefined icons from the symbol font.
Definition: SymbolIcon.h:49
Definition: Announcement.h:24
std::string windowTitle
Definition: SdlDisplay.h:119
SDL_Renderer * GetRenderer() const
Definition: SdlDisplay.h:105
int GetScreenWidth() const
Definition: SdlDisplay.h:101
SDL-based software rendering.
Definition: SdlDisplay.h:60
SDL_Window * GetWindow() const
Definition: SdlDisplay.h:104