Back to menu

Themes

By default, blueMSX comes with two themes :
- the classic theme (only for small and large window modes)
- the DIGIblue Suite-X theme (only for large window mode).

Last theme is built with customisable skins (see the contents of the Themes subdirectory) , so it means that you can also create new themes to give a personal feeling to blueMSX !

Some tools such as the Mixer or the Controllers/Keyboard Editor are also built with a theme.

Elements of a theme


Each theme is a combination of graphics, controls, triggers and actions.

The first thing to do when creating a theme is to create graphics that will serve as support for different things that happen in the emulator.

You must also imagine an great introduction picture that will be used when the emulator is in stop mode, waiting for the running of a MSX machine. In the DIGIblue theme, it's the monitorpanel.bmp file. Another picture is required for the fullscreen mode (see the fullscreen-bk.bmp file).

The middle of the picture is reserved for the screen of the emulated machine, it's very important to take this in account to determine the position of the different graphics that compose the theme.

Different types of graphics are used in a theme : fonts (for texts), icons, leds, buttons, ...

The main tool for the good working of a theme is the theme.xml file, it contains all the required controls, triggers and actions.

Some controls are described below. On the page "controls", you'll find all the other controls; most of them can be associated with triggers and actions.

The theme.xml file

Each theme configuration file contains a main block called "bluemsxtheme".
The field has one attribute, name, which overrides the concerned directory name

example
: <bluemsxtheme name="DIGIblue SUITE-X">

The "bluemsxtheme" block can contain one to four different sub-blocks.
At the beginning of each sub-block, it's very important to determine the theme mode or the name of the special window.

examples :
<theme mode="normal">
<theme mode="fullscreen">
<window name="blueMSX Keyboard Editor">

If more than 1 page is used by the theme, then you must precise the type; to enable or disable the theme or window frame, you can give the value 1 or 0 to the "frame" attribute

examples
:

<theme mode="normal" type="multipage" frame="0">
<window name="blueMSX Keyboard Editor" type="multipage" frame="0" handler="keyboard-config">

The "handler" attribute is only used for special windows that are implemented as plugins like the mixer or the keyboard editor.

For each page of the theme, you must precise

- the dimensions and the name of the page ; example : <page width="800" height="614" name="EmuAndStatus">

- the position of the menu and the colors used for the menu ; example : <menu x="20" y="3" bgcolor="bdbdbd" focuscolor="6995ba"/>

- the starting coordinates x and y of the theme window ; examples : <emuwindow x="10" y="65"/> or <emuwindow x="0" y="0"/>

To define a section of a page, you must use "block" and precise the starting coordinates x and y of the concerned block

example :
<block x="0" y="64">
include here all the commands for this block
</block>

Clip regions


You can determine clip regions in the theme that you are creating.

They work like the windows media player which means that the windows frame is visible if you put the mouse where it is supposed to be and then it hides when the mouse is moved away.

The clip region can be of any shape. Just add as many corners as needed, by precising the coordinates x, y of each corner.

example : <clipregion>
ooooooooooo<point x="17" y="27"/>
ooooooooooo<point x="786" y="27"/>
ooooooooooo<point x="786" y="655"/>
ooooooooooo<point x="799" y="655"/>
ooooooooooo<point x="799" y="725"/>
ooooooooooo<point x="0" y="725"/>
ooooooooooo<point x="0" y="655"/>
ooooooooooo<point x="17" y="655"/>
oooooooo</clipregion>

With the value 0 for the attribute "frame", you don't need to use the clipregion tags unless you want a more complex clip region of course.

What happens internally is that if frame="0", the defined clip region will be used if it is present.
If there is no clip region, a default clip region will be used that is the size of the theme.

A clip region can correspond to the window of a tool like the mixer or the keyboard editor. To make this window draggable, use grabimages.

Using of native Windows fonts


The native windows fonts work like this :

- You need to provide a background image in src.

This image is the boundary of the text and the main reason why it is required is for redrawing purposes.
Since the text is drawn transparent, the background has to be refreshed before the text is drawn.

- You need to specify type="native" in the font directive

- To set the color of the text, specify the fgcolor

The width attribute is ignored with native fonts (the type and fgcolor are ignored with the other fonts)

example :

<text x="118" y="553" src="ICONS/ROMNAMEBG.bmp" type="native" fgcolor="99bb99" trigger="text-runningname"/>

Back to menu