Skip to content

Emu Default Macros

Michael edited this page Jul 5, 2020 · 3 revisions

A number of macros are defined in the file emu_init for control over the way Emu looks and behaves, mostly relating to the color of the UI elements. You are free to modify these to change the way Emu looks, e.g. to create a "night" theme, or even to route the macros to a variable elsewhere in the game to allow the user to control them.

Colors

EMU_COLOR_BACK

The background color of all elements: the interior of buttons, the background in a list, etc. The default value is 0xffffff, or pure white.

EMU_COLOR_DEFAULT

The default foreground color of all elements: the text on buttons, the border around rectangles, etc. The default value is 0x000000, or pitch black.

EMU_COLOR_DISABLED

The color of elements which have their interactive value set to false. The default value is 0xe0e0e0, a light gray.

EMU_COLOR_HOVER

The color of elements which have the mouse cursor hovering over them. The default value is 0xffe5ce, a light blue.

EMU_COLOR_INPUT_REJECT

The color of text for number values which does not successfully validate in an EmuInput box. The default value is 0x0000ff, or red.

EMU_COLOR_INPUT_WARN

The color of text for number values which is successfully validated by an EmuInput box, but is outside the allowed range. The default value is 0x3399ff, or orange.

EMU_COLOR_PROGRESS_BAR

The color of EmuProgressBar fill. The default value is 0xff9900, or a medium blue.

EMU_COLOR_RADIO_ACTIVE

The color of active EmuRadioArray options and EmuCheckbox check marks. The default value is 0x009900, or green.

EMU_COLOR_SELECTED

The color of selected entries in EmuLists, active EmuBitfieldOptions and the ring indicating characters remaining in EmuInput boxes. The default value is 0xffb8ac, or a light blue.

EMU_COLOR_WINDOWSKIN

The color of the title bar in EmuDialog boxes. The default value is 0x339900, or green. This one in particular you may wish to set to a global variable to let the user choose for themselves.

Active Dialog Shade

EMU_DIALOG_SHADE_ALPHA

The alpha (transparency) of the strength of the tint behind active dialog windows. The value ranges from0 to 1; if you wish to turn this off, set the value to 0. The default value is 0.5.

EMU_DIALOG_SHADE_COLOR

The color of the tint behind active dialog windows. The default value is 0x000000, or black.

Fonts

EMU_FONT_DEFAULT

The font used by Emu. For software interfaces, it is advisable to use a reasonably large sans-serif font for optimal clarity. The default Emu font (fnt_emu_default), for example, is 16-point Calibri Regular. The use of Arial is an international crime carrying a minimum prison sentence of 60,000 light years, followed by death.

Clicking

EMU_TIME_DOUBLE_CLICK_THRESHOLD

The maximum duration between two clicks in which a double-click may be detected, measured in milliseconds. The default value is 250, or one quarter of a second.

EMU_TIME_HOLD_THRESHOLD

The minimum amount of time a mouse button must be held down for it to count as a continuous action. Currently only used by the scroll buttons in EmuLists.