ScummVM GUI Framework Overview

ScummVM GUI is based around a Floating Layout system of widgets. Widget layouts are described by the “theme” whereas widget behaviours and how the layouts are interpreted is hard-coded.

Widgets

Widgets are the basic building block of the GUI. They have functionality for being drawn to the screen, to detect mouse input, and handle interaction commands. Different widgets are derived from the base Widget class.

Following are few of the relevant widgets currently available in the framework :
Graphics Widget : Display images
Button Widget : Simple button
Static Text Widget : Simple drawable text
Container Widget : A blank area for placing other widgets / composition of widgets.
Pic Button Widget : A button with an embedded image.

Theme Engine

The theme engine interprets the .STX theme files, and is responsible for loading in common graphical assets like cursor, and button icons, as well as specifying how the widgets will be layout, and implements their rendering. The syntax for .STX files can be found at: https://wiki.scummvm.org/index.php?title=GUI_Themes/STX_Syntax

The theme will store variables like the minimum padding between two grid items, the height and width of the thumbnail, and background color of the thumbnail, etc.

The current structure (subject to change) of the grid system is :

Two classes GridWidget and GridItemWidget will be derived from the ContainerWidget. GridWidget will hold several GridItemsWidgets, which in turn will hold 4 widgets each, a Thumbnail and Platform Icon (GraphicsWidgets), and a Title and Language (StaticTextWidgets).

Leave a comment

Your email address will not be published. Required fields are marked *