Arma 3 Scripting

SafeZone

Topic · Markdown · JSON · original wiki page

In Arma: Cold War Assault, user interface Displays were drawn always in 4:3 aspect ratio. Since then, many other aspect ratios became common and interface has to be compatible with them. Currently, interface is base on following variables:

Coordinate Systems

Games now contains following two coordinate systems, both of them starting in their top left corner and going bottom right (see picture on right).

Sample configs

Control with following size will cover whole screen (middle screen in case of TripleHead):

x = safeZoneX;
y = safeZoneY;
w = safeZoneW;
h = safeZoneH;

Following proportions will cover all screens in TripleHead:

x = safeZoneXAbs;
y = safeZoneY;
w = safeZoneWAbs;
h = safeZoneH;

Creates centered control with 80% width and height:

x = safeZoneX + 0.1 * safeZoneW;
y = safeZoneY + 0.1 * safeZoneH;
w = safeZoneW * 0.8;
h = safeZoneH * 0.8;

Creates control with absolute width and height, moved 10% from top left screen corner:

x = safeZoneX + 0.1 * safeZoneW;
y = safeZoneY + 0.1 * safeZoneH;
w = 0.2;
h = 0.3;

Creates the same as above, but aligned to bottom right corner:

x = safeZoneX + safeZoneW - 0.2;
y = safeZoneY + safeZoneH - 0.3;
w = 0.2;
h = 0.3;

Creates a control that spans the horizontal and is centered on the vertical according to the control's aspect ratio (useful for fullscreen images that shouldn't be stretched but letterboxed). 2 is the aspect ratio:

x = safeZoneX;
y = safeZoneY + ((safeZoneH - (safeZoneW / 2 * (4/3))) / 2);
w = safeZoneW;
h = safeZoneH / 2 * (4/3);

User Interface Editor

User Interface Editor helps with display creation, enabling designer to place controls in simple WYSIWYG editor and export it afterwards to config format.

Aspect Ratio and Interface Size combinations

Video Options