ScummVM API documentation
GUI::ThemeEngine Class Reference

Classes

struct  Renderer
 
struct  ThemeDescriptor
 

Public Types

enum  TextAlignVertical { kTextAlignVInvalid, kTextAlignVBottom, kTextAlignVCenter, kTextAlignVTop }
 Vertical alignment of the text.
 
enum  WidgetBackground {
  kWidgetBackgroundNo, kWidgetBackgroundPlain, kWidgetBackgroundBorder, kWidgetBackgroundBorderSmall,
  kWidgetBackgroundEditText, kWidgetBackgroundSlider, kThumbnailBackground, kGridItemBackground,
  kGridItemHighlight
}
 Widget background type. More...
 
enum  DialogBackground {
  kDialogBackgroundMain, kDialogBackgroundSpecial, kDialogBackgroundPlain, kDialogBackgroundTooltip,
  kDialogBackgroundDefault, kDialogBackgroundNone
}
 Dialog background type.
 
enum  State { kStateDisabled, kStateEnabled, kStateHighlight, kStatePressed }
 State of the widget to be drawn. More...
 
enum  TextInversionState { kTextInversionNone, kTextInversion, kTextInversionFocus }
 Text inversion state of the text to be draw. More...
 
enum  ScrollbarState {
  kScrollbarStateNo, kScrollbarStateUp, kScrollbarStateDown, kScrollbarStateSlider,
  kScrollbarStateSinglePage
}
 
enum  FontStyle {
  kFontStyleBold = 0, kFontStyleNormal = 1, kFontStyleItalic = 2, kFontStyleFixedNormal = 3,
  kFontStyleFixedBold = 4, kFontStyleFixedItalic = 5, kFontStyleTooltip = 6, kFontStyleConsole = 7,
  kFontStyleLangExtra = 8, kFontStyleMax
}
 Font style selector. More...
 
enum  FontColor {
  kFontColorFormatting = -1, kFontColorNormal = 0, kFontColorAlternate = 1, kFontColorOverride = 2,
  kFontColorMax
}
 Font color selector. More...
 
enum  ShadingStyle { kShadingNone, kShadingDim, kShadingLuminance }
 Function used to process areas other than the current dialog. More...
 
enum  AutoScaleMode { kAutoScaleNone = 0, kAutoScaleStretch = 1, kAutoScaleFit = 2, kAutoScaleNinePatch = 3 }
 AlphaBitmap scale mode selector. More...
 
enum  GraphicsMode { kGfxDisabled = 0, kGfxStandard, kGfxAntialias }
 
typedef State WidgetStateInfo
 

Public Member Functions

 ThemeEngine (Common::String id, GraphicsMode mode)
 
 ~ThemeEngine ()
 
void setBaseResolution (int w, int h, float s)
 
bool init ()
 
void clearAll ()
 
void refresh ()
 
void enable ()
 
void showCursor ()
 
void hideCursor ()
 
void disable ()
 
const Graphics::PixelFormat getPixelFormat () const
 
void applyScreenShading (ShadingStyle shading)
 
void drawToBackbuffer ()
 
void drawToScreen ()
 
void updateScreen ()
 
void copyBackBufferToScreen ()
 
Common::Rect swapClipRect (const Common::Rect &newRect)
 
const Common::Rect getClipRect ()
 
void disableClipRect ()
 
void addDirtyRect (Common::Rect r)
 
DrawData parseDrawDataId (const Common::String &name) const
 
TextData getTextData (DrawData ddId) const
 
TextColor getTextColor (DrawData ddId) const
 
TextColorDatagetTextColorData (TextColor color) const
 
void addDrawStep (const Common::String &drawDataId, const Graphics::DrawStep &step)
 
bool addDrawData (const Common::String &data, bool cached)
 
bool addFont (TextData textId, const Common::String &language, const Common::String &file, const Common::String &scalableFile, const int pointsize)
 
void storeFontNames (TextData textId, const Common::String &language, const Common::String &file, const Common::String &scalableFile, const int pointsize)
 
bool loadExtraFont (FontStyle style, Common::Language lang)
 
bool addTextColor (TextColor colorId, int r, int g, int b)
 
bool addBitmap (const Common::String &filename, const Common::String &scalablefile, int widht, int height)
 
bool addTextData (const Common::String &drawDataId, TextData textId, TextColor id, Graphics::TextAlign alignH, TextAlignVertical alignV)
 
ThemeEvalgetEvaluator ()
 
Graphics::VectorRendererrenderer ()
 
bool supportsImages () const
 
bool ownCursor () const
 
Graphics::ManagedSurfacegetImageSurface (const Common::String &name) const
 
bool createCursor (const Common::String &filename, int hotspotX, int hotspotY)
 
void restoreBackground (Common::Rect r)
 
const Common::StringgetThemeName () const
 
const Common::StringgetThemeId () const
 
int getGraphicsMode () const
 
FONT MANAGEMENT METHODS
TextData fontStyleToData (FontStyle font) const
 
const Graphics::FontgetFont (FontStyle font=kFontStyleBold) const
 
int getFontHeight (FontStyle font=kFontStyleBold) const
 
int getStringWidth (const Common::U32String &str, FontStyle font=kFontStyleBold) const
 
int getCharWidth (uint32 c, FontStyle font=kFontStyleBold) const
 
int getKerningOffset (uint32 left, uint32 right, FontStyle font=kFontStyleBold) const
 
WIDGET DRAWING METHODS
void drawWidgetBackground (const Common::Rect &r, WidgetBackground background)
 
void drawButton (const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state=kStateEnabled, uint16 hints=0)
 
void drawDropDownButton (const Common::Rect &r, uint32 dropdownWidth, const Common::U32String &str, WidgetStateInfo buttonState, bool inButton, bool inDropdown, bool rtl=false)
 
void drawManagedSurface (const Common::Point &p, const Graphics::ManagedSurface &surface)
 
void drawSlider (const Common::Rect &r, int width, WidgetStateInfo state=kStateEnabled, bool rtl=false)
 
void drawCheckbox (const Common::Rect &r, int spacing, const Common::U32String &str, bool checked, WidgetStateInfo state=kStateEnabled, bool override=false, bool rtl=false)
 
void drawRadiobutton (const Common::Rect &r, int spacing, const Common::U32String &str, bool checked, WidgetStateInfo state=kStateEnabled, bool rtl=false)
 
void drawTab (const Common::Rect &r, int tabHeight, const Common::Array< int > &tabWidths, const Common::Array< Common::U32String > &tabs, int active, bool rtl, ThemeEngine::TextAlignVertical alignV)
 
void drawScrollbar (const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState scrollState)
 
void drawPopUpWidget (const Common::Rect &r, const Common::U32String &sel, int deltax, WidgetStateInfo state=kStateEnabled, bool rtl=false)
 
void drawCaret (const Common::Rect &r, bool erase)
 
void drawLineSeparator (const Common::Rect &r)
 
void drawDialogBackground (const Common::Rect &r, DialogBackground type)
 
void drawText (const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state=kStateEnabled, Graphics::TextAlign align=Graphics::kTextAlignCenter, TextInversionState inverted=kTextInversionNone, int deltax=0, bool useEllipsis=true, FontStyle font=kFontStyleBold, FontColor color=kFontColorNormal, bool restore=true, const Common::Rect &drawableTextArea=Common::Rect(0, 0, 0, 0))
 
void drawChar (const Common::Rect &r, byte ch, const Graphics::Font *font, FontColor color=kFontColorNormal, TextInversionState inverted=ThemeEngine::kTextInversionNone)
 
void drawFoldIndicator (const Common::Rect &r, bool expanded)
 

Static Public Member Functions

static GraphicsMode findMode (const Common::String &cfg)
 
static const char * findModeConfigName (GraphicsMode mode)
 
static void listUsableThemes (Common::List< ThemeDescriptor > &list)
 

Static Public Attributes

static const char *const kImageLogo
 ScummVM logo used in the launcher.
 
static const char *const kImageLogoSmall
 ScummVM logo used in the GMM.
 
static const char *const kImageSearch
 Search tool image used in the launcher.
 
static const char *const kImageGroup
 Select Group image used in the launcher.
 
static const char *const kImageEraser
 Clear input image used in the launcher.
 
static const char *const kImageDelButton
 Delete characters in the predictive dialog.
 
static const char *const kImageList
 List image used in save/load chooser selection.
 
static const char *const kImageGrid
 Grid image used in save/load chooser selection.
 
static const char *const kImageStopButton
 Stop recording button in recorder onscreen dialog.
 
static const char *const kImageEditButton
 Edit recording metadata in recorder onscreen dialog.
 
static const char *const kImageSwitchModeButton
 Switch mode button in recorder onscreen dialog.
 
static const char *const kImageFastReplayButton
 Fast playback mode button in recorder onscreen dialog.
 
static const char *const kImageStopSmallButton
 Stop recording button in recorder onscreen dialog (for 320xY)
 
static const char *const kImageEditSmallButton
 Edit recording metadata in recorder onscreen dialog (for 320xY)
 
static const char *const kImageSwitchModeSmallButton
 Switch mode button in recorder onscreen dialog (for 320xY)
 
static const char *const kImageFastReplaySmallButton
 Fast playback mode button in recorder onscreen dialog (for 320xY)
 
static const int kDirtyRectangleThreshold = 1
 
static const Renderer _rendererModes []
 
static const uint _rendererModesSize
 
static const GraphicsMode _defaultRendererMode
 

Protected Types

enum  { MAX_CURS_COLORS = 255 }
 
typedef Common::HashMap< Common::String, Graphics::ManagedSurface * > ImagesMap
 

Protected Member Functions

bool ready () const
 
void loadTheme (const Common::String &themeid)
 
void setGraphicsMode (GraphicsMode mode)
 
bool loadThemeXML (const Common::String &themeId)
 
bool loadDefaultXML ()
 
void unloadTheme ()
 
void unloadExtraFont ()
 
const Graphics::FontloadScalableFont (const Common::String &filename, const int pointsize, Common::String &name)
 
const Graphics::FontloadFont (const Common::String &filename, Common::String &name)
 
Common::String genCacheFilename (const Common::String &filename) const
 
const Graphics::FontloadFont (const Common::String &filename, const Common::String &scalableFilename, const int pointsize, const bool makeLocalizedFont)
 
void updateDirtyScreen ()
 
void drawDD (DrawData type, const Common::Rect &r, uint32 dynamic=0, bool forceRestore=false)
 
void drawDDText (TextData type, TextColor color, const Common::Rect &r, const Common::U32String &text, bool restoreBg, bool elipsis, Graphics::TextAlign alignH=Graphics::kTextAlignLeft, TextAlignVertical alignV=kTextAlignVTop, int deltax=0, const Common::Rect &drawableTextArea=Common::Rect(0, 0, 0, 0))
 
void debugWidgetPosition (const char *name, const Common::Rect &r)
 

Protected Attributes

OSystem_system
 
Graphics::VectorRenderer_vectorRenderer
 
GUI::ThemeParser_parser
 
GUI::ThemeEval_themeEval
 
Graphics::ManagedSurface _screen
 
Graphics::ManagedSurface _backBuffer
 
DrawLayer _layerToDraw
 
int _bytesPerPixel
 
GraphicsMode _graphicsMode
 
int16 _baseWidth
 
int16 _baseHeight
 
float _scaleFactor
 
bool _needScaleRefresh = false
 
const Graphics::Font_font
 
WidgetDrawData * _widgets [kDrawDataMAX]
 
TextDrawData * _texts [kTextDataMAX]
 
TextColorData_textColors [kTextColorMAX]
 
Common::Array< LangExtraFont_langExtraFonts
 
ImagesMap _bitmaps
 
Graphics::PixelFormat _overlayFormat
 
Graphics::PixelFormat _cursorFormat
 
Common::List< Common::Rect_dirtyScreen
 
bool _initOk
 Class and renderer properly initialized.
 
bool _themeOk
 Theme data successfully loaded.
 
bool _enabled
 Whether the Theme is currently shown on the overlay.
 
Common::String _themeName
 Name of the currently loaded theme.
 
Common::String _themeId
 
Common::Path _themeFile
 
Common::Archive_themeArchive
 
Common::SearchSet _themeFiles
 
bool _useCursor
 
int _cursorHotspotX
 
int _cursorHotspotY
 
uint32 _cursorTransparent
 
byte * _cursor
 
uint _cursorWidth
 
uint _cursorHeight
 
byte _cursorPal [3 *MAX_CURS_COLORS]
 
byte _cursorPalSize
 
Common::Rect _clip
 

Member Enumeration Documentation

◆ WidgetBackground

Widget background type.

Enumerator
kWidgetBackgroundNo 

No background at all.

kWidgetBackgroundPlain 

Simple background, this may not include borders.

kWidgetBackgroundBorder 

Same as kWidgetBackgroundPlain just with a border.

kWidgetBackgroundBorderSmall 

Same as kWidgetBackgroundPlain just with a small border.

kWidgetBackgroundEditText 

Background used for edit text fields.

kWidgetBackgroundSlider 

Background used for sliders.

kThumbnailBackground 

Background used for thumbnails.

kGridItemBackground 

Default Background used for grid items.

kGridItemHighlight 

Highlight Background used for grid items.

◆ State

State of the widget to be drawn.

Enumerator
kStateDisabled 

Indicates that the widget is disabled, that does NOT include that it is invisible.

kStateEnabled 

Indicates that the widget is enabled.

kStateHighlight 

Indicates that the widget is highlighted by the user.

kStatePressed 

Indicates that the widget is pressed, currently works for buttons.

◆ TextInversionState

Text inversion state of the text to be draw.

Enumerator
kTextInversionNone 

Indicates that the text should not be drawn inverted.

kTextInversion 

Indicates that the text should be drawn inverted, but not focused.

kTextInversionFocus 

Indicates that the text should be drawn inverted, and focused.

◆ FontStyle

Font style selector.

Enumerator
kFontStyleBold 

A bold font. This is also the default font.

kFontStyleNormal 

A normal font.

kFontStyleItalic 

Italic styled font.

kFontStyleFixedNormal 

Fixed size font.

kFontStyleFixedBold 

Fixed size bold font.

kFontStyleFixedItalic 

Fixed size italic font.

kFontStyleTooltip 

Tiny console font.

kFontStyleConsole 

Debug console font.

kFontStyleLangExtra 

Language specific font for ingame dialogs (e. g. the SCUMM pause/restart dialogs)

◆ FontColor

Font color selector.

Enumerator
kFontColorFormatting 

Use color from formatting.

kFontColorNormal 

The default color of the theme.

kFontColorAlternate 

Alternative font color.

kFontColorOverride 

Color of overwritten text.

◆ ShadingStyle

Function used to process areas other than the current dialog.

Enumerator
kShadingNone 

No special post processing.

kShadingDim 

Dimming unused areas.

kShadingLuminance 

Converting colors to luminance for unused areas.

◆ AutoScaleMode

AlphaBitmap scale mode selector.

Enumerator
kAutoScaleNone 

Use image dimensions.

kAutoScaleStretch 

Stretch image to full widget size.

kAutoScaleFit 

Scale image to widget size but keep aspect ratio.

kAutoScaleNinePatch 

9-patch image

◆ GraphicsMode

Graphics mode enumeration. Each item represents a set of BPP and Renderer modes for a given surface.

Enumerator
kGfxDisabled 

No GFX.

kGfxStandard 

Standard (aliased) renderer.

kGfxAntialias 

Optimized AA renderer.

Constructor & Destructor Documentation

◆ ThemeEngine()

GUI::ThemeEngine::ThemeEngine ( Common::String  id,
GraphicsMode  mode 
)

Default constructor

◆ ~ThemeEngine()

GUI::ThemeEngine::~ThemeEngine ( )

Default destructor

Member Function Documentation

◆ getPixelFormat()

const Graphics::PixelFormat GUI::ThemeEngine::getPixelFormat ( ) const
inline

Query the set up pixel format.

◆ applyScreenShading()

void GUI::ThemeEngine::applyScreenShading ( ShadingStyle  shading)

Draw full screen shading with the supplied style

This is used to dim the inactive dialogs so the active one stands out.

◆ drawToBackbuffer()

void GUI::ThemeEngine::drawToBackbuffer ( )

Sets the active drawing surface to the back buffer.

All drawing from this point on will be done on that surface. The back buffer surface needs to be copied to the screen surface in order to become visible.

◆ drawToScreen()

void GUI::ThemeEngine::drawToScreen ( )

Sets the active drawing surface to the screen.

All drawing from this point on will be done on that surface.

◆ updateScreen()

void GUI::ThemeEngine::updateScreen ( )

The updateScreen() method is called every frame. It copies dirty rectangles in the Screen surface to the overlay.

◆ copyBackBufferToScreen()

void GUI::ThemeEngine::copyBackBufferToScreen ( )

Copy the entire backbuffer surface to the screen surface

◆ swapClipRect()

Common::Rect GUI::ThemeEngine::swapClipRect ( const Common::Rect newRect)

Set the clipping rect to be used by the widget drawing methods defined below.

Widgets are not drawn outside of the clipping rect. Widgets that overlap the clipping rect are drawn partially.

Parameters
newRectThe new clipping rect
Returns
The previous clipping rect

◆ disableClipRect()

void GUI::ThemeEngine::disableClipRect ( )

Set the clipping rect to allow rendering on the whole surface.

◆ addDirtyRect()

void GUI::ThemeEngine::addDirtyRect ( Common::Rect  r)

Actual implementation of a dirty rect handling. Dirty rectangles are queued on a list, merged and optimized when possible and are later used for the actual drawing.

Parameters
rArea of the dirty rect.

◆ parseDrawDataId()

DrawData GUI::ThemeEngine::parseDrawDataId ( const Common::String name) const

Returns the DrawData enumeration value that represents the given string in the DrawDataDefaults enumeration. It's slow, but called sparsely.

Returns
The drawdata enum value, or -1 if not found.
Parameters
nameThe representing name, as found on Theme Description XML files.
See also
kDrawDataDefaults[]

◆ addDrawStep()

void GUI::ThemeEngine::addDrawStep ( const Common::String drawDataId,
const Graphics::DrawStep step 
)

Interface for ThemeParser class: Parsed DrawSteps are added via this function. There is no return type because DrawSteps can always be added, unless something goes horribly wrong. The specified step will be added to the Steps list of the given DrawData id.

Parameters
drawDataIdThe representing DrawData name, as found on Theme Description XML files.
stepThe actual DrawStep struct to be added.

◆ addDrawData()

bool GUI::ThemeEngine::addDrawData ( const Common::String data,
bool  cached 
)

Interface for the ThemeParser class: Parsed DrawData sets are added via this function. The goal of the function is to initialize each DrawData set before their DrawSteps can be added, hence this must be called for each DD set before addDrawStep() can be called for that given set.

Parameters
dataThe representing DrawData name, as found on Theme Description XML files.
cachedWhether this DD set will be cached beforehand.

◆ addFont()

bool GUI::ThemeEngine::addFont ( TextData  textId,
const Common::String language,
const Common::String file,
const Common::String scalableFile,
const int  pointsize 
)

Interface for the ThemeParser class: Loads a font to use on the GUI from the given filename.

Parameters
textIdIdentifier name for the font.
languageWildcard for the language(s) to use.
fileFilename of the non-scalable font version.
scalableFileFilename of the scalable version. (Optional)
pointsizePoint size for the scalable font. (Optional)

◆ storeFontNames()

void GUI::ThemeEngine::storeFontNames ( TextData  textId,
const Common::String language,
const Common::String file,
const Common::String scalableFile,
const int  pointsize 
)

Store language specific font names for ingame GUI dialogs which might require a different language than the current GUI setting

Parameters
textId,language,file,scalableFile,pointsizeAll exactly the same as with addFont()

◆ loadExtraFont()

bool GUI::ThemeEngine::loadExtraFont ( FontStyle  style,
Common::Language  lang 
)

Load language specific font for ingame use

Parameters
stylefont style associated with the font file
langlanguage associated with the font file
Returns

◆ addTextColor()

bool GUI::ThemeEngine::addTextColor ( TextColor  colorId,
int  r,
int  g,
int  b 
)

Interface for the ThemeParser class: adds a text color value.

Parameters
colorIdIdentifier for the color type.
rRed color component
gGreen color component
bBlue color component

◆ addBitmap()

bool GUI::ThemeEngine::addBitmap ( const Common::String filename,
const Common::String scalablefile,
int  widht,
int  height 
)

Interface for the ThemeParser class: Loads a bitmap file to use on the GUI. The filename is also used as its identifier.

Parameters
filenameName of the bitmap file.
filenameName of the scalable (SVG) file, could be empty
width,heightDefault image dimensions

◆ addTextData()

bool GUI::ThemeEngine::addTextData ( const Common::String drawDataId,
TextData  textId,
TextColor  id,
Graphics::TextAlign  alignH,
TextAlignVertical  alignV 
)

Adds a new TextStep from the ThemeParser. This will be deprecated/removed once the new Font API is in place. FIXME: Is that so ???

◆ ready()

bool GUI::ThemeEngine::ready ( ) const
inlineprotected

Returns if the Theme is ready to draw stuff on screen. Must be called instead of just checking _initOk, because this checks if the renderer is initialized AND if the theme is loaded.

◆ loadTheme()

void GUI::ThemeEngine::loadTheme ( const Common::String themeid)
protected

Load the them from the file with the specified name.

◆ setGraphicsMode()

void GUI::ThemeEngine::setGraphicsMode ( GraphicsMode  mode)
protected

Changes the active graphics mode of the GUI; may be used to either initialize the GUI or to change the mode while the GUI is already running.

◆ createCursor()

bool GUI::ThemeEngine::createCursor ( const Common::String filename,
int  hotspotX,
int  hotspotY 
)

Interface for the Theme Parser: Creates a new cursor by loading the given bitmap and sets it as the active cursor.

Parameters
filenameFile name of the bitmap to load.
hotspotXX Coordinate of the bitmap which does the cursor click.
hotspotYY Coordinate of the bitmap which does the cursor click.

◆ restoreBackground()

void GUI::ThemeEngine::restoreBackground ( Common::Rect  r)

Wrapper for restoring data from the Back Buffer to the screen. The actual processing is done in the VectorRenderer.

Parameters
rArea to restore.

◆ loadThemeXML()

bool GUI::ThemeEngine::loadThemeXML ( const Common::String themeId)
protected

Loads the given theme into the ThemeEngine.

Parameters
themeIdTheme identifier.
Returns
true if the theme was successfully loaded.

◆ loadDefaultXML()

bool GUI::ThemeEngine::loadDefaultXML ( )
protected

Loads the default theme file (the embedded XML file found in ThemeDefaultXML.cpp). Called only when no other themes are available.

◆ unloadTheme()

void GUI::ThemeEngine::unloadTheme ( )
protected

Unloads the currently loaded theme so another one can be loaded.

◆ unloadExtraFont()

void GUI::ThemeEngine::unloadExtraFont ( )
protected

Unload the language specific font loaded via loadExtraFont()

◆ updateDirtyScreen()

void GUI::ThemeEngine::updateDirtyScreen ( )
protected

Dirty Screen handling function. Draws all the dirty rectangles in the list to the overlay.

◆ drawDD()

void GUI::ThemeEngine::drawDD ( DrawData  type,
const Common::Rect r,
uint32  dynamic = 0,
bool  forceRestore = false 
)
protected

Draws a GUI element according to a DrawData descriptor.

Only calls with a DrawData layer attribute matching the active layer are actually drawn to the active surface.

These functions are called from all the Widget drawing methods.

◆ debugWidgetPosition()

void GUI::ThemeEngine::debugWidgetPosition ( const char *  name,
const Common::Rect r 
)
protected

DEBUG: Draws a white square and writes some text next to it.

◆ listUsableThemes()

static void GUI::ThemeEngine::listUsableThemes ( Common::List< ThemeDescriptor > &  list)
static

Lists all theme files useable.

Member Data Documentation

◆ kDirtyRectangleThreshold

const int GUI::ThemeEngine::kDirtyRectangleThreshold = 1
static

Constant value to expand dirty rectangles, to make sure they are fully copied

◆ _vectorRenderer

Graphics::VectorRenderer* GUI::ThemeEngine::_vectorRenderer
protected

Global system object. Vector Renderer object, does the actual drawing on screen

◆ _parser

GUI::ThemeParser* GUI::ThemeEngine::_parser
protected

XML Parser, does the Theme parsing instead of the default parser

◆ _themeEval

GUI::ThemeEval* GUI::ThemeEngine::_themeEval
protected

Theme getEvaluator (changed from GUI::Eval to add functionality)

◆ _screen

Graphics::ManagedSurface GUI::ThemeEngine::_screen
protected

Main screen surface. This is blitted straight into the overlay.

◆ _backBuffer

Graphics::ManagedSurface GUI::ThemeEngine::_backBuffer
protected

Backbuffer surface. Stores previous states of the screen to blit back

◆ _layerToDraw

DrawLayer GUI::ThemeEngine::_layerToDraw
protected

Filter the submitted DrawData descriptors according to their layer attribute

This is used to selectively draw the background or foreground layer of the dialogs.

◆ _bytesPerPixel

int GUI::ThemeEngine::_bytesPerPixel
protected

Bytes per pixel of the Active Drawing Surface (i.e. the screen)

◆ _graphicsMode

GraphicsMode GUI::ThemeEngine::_graphicsMode
protected

Current graphics mode

◆ _font

const Graphics::Font* GUI::ThemeEngine::_font
protected

Font info.

◆ _widgets

WidgetDrawData* GUI::ThemeEngine::_widgets[kDrawDataMAX]
protected

Array of all the DrawData elements than can be drawn to the screen. Must be full so the renderer can work.

◆ _texts

TextDrawData* GUI::ThemeEngine::_texts[kTextDataMAX]
protected

Array of all the text fonts that can be drawn.

◆ _textColors

TextColorData* GUI::ThemeEngine::_textColors[kTextColorMAX]
protected

Array of all font colors available.

◆ _langExtraFonts

Common::Array<LangExtraFont> GUI::ThemeEngine::_langExtraFonts
protected

Extra font file names for languages like Japanese, Korean or Chinese for use in ingame dialogs (like the SCUMM pause/restart dialogs)

◆ _dirtyScreen

Common::List<Common::Rect> GUI::ThemeEngine::_dirtyScreen
protected

List of all the dirty screens that must be blitted to the overlay.


The documentation for this class was generated from the following file: