Jump to content
florianmuellerch

GUI Editor: Why are RSC-Classes not predefined?

Recommended Posts

I am getting into ArmA 3 Scripting once again (after I've made some cool addons a few years ago, see this post).

 

I recently found the GUI editor, which makes it a lot easier to create dialogs. However, the classes used by the Built-In editor (like RscText, RscButton, RscSlider, etc.) are not predefined and have to be defined by myself. I have to do this by searching youtube and forums for definitions of it, because I have no idea what it can do and what it can't.

 

So, why for gods sake, is there no predefined definition of the classes used by the built in editor?

Thanks for input mates, and a nice weekend.

-PEGASUS

Share this post


Link to post
Share on other sites

CTRL+P in the GUI editor or call BIS_fnc_exportGUIBaseClasses in the debug console, both will export base classes to clipboard.

  • Like 5

Share this post


Link to post
Share on other sites
On 6.1.2017 at 5:31 PM, Larrow said:

CTRL+P in the GUI editor or call BIS_fnc_exportGUIBaseClasses in the debug console, both will export base classes to clipboard.

You serious?! Thank you very much! :-) 

Share this post


Link to post
Share on other sites

call BIS_fnc_exportGUIBaseClasses also exports the newer base defines that have all their base members present including eventHandlers.

e.g where previously you would have used RscText you can now use ctrlStatic..

RscText

class RscText
{
    deletable = 0;
    fade = 0;
    access = 0;
    type = 0;
    idc = -1;
    colorBackground[] =
    {
        0,
        0,
        0,
        0
    };
    colorText[] =
    {
        1,
        1,
        1,
        1
    };
    text = "";
    fixedWidth = 0;
    x = 0;
    y = 0;
    h = 0.037;
    w = 0.3;
    style = 0;
    shadow = 1;
    colorShadow[] =
    {
        0,
        0,
        0,
        0.5
    };
    font = "RobotoCondensed";
    SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    linespacing = 1;
    tooltipColorText[] =
    {
        1,
        1,
        1,
        1
    };
    tooltipColorBox[] =
    {
        1,
        1,
        1,
        1
    };
    tooltipColorShade[] =
    {
        0,
        0,
        0,
        0.65
    };
};

 

ctrlStatic

class ctrlDefault
{
    access = 0;
    idc = -1;
    style = ST_LEFT;
    default = 0;
    show = 1;
    fade = 0;
    blinkingPeriod = 0;
    deletable = 0;
    x = 0;
    y = 0;
    w = 0;
    h = 0;
    tooltip = "";
    tooltipMaxWidth = 0.5;
    tooltipColorShade[] = {0,0,0,1};
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {0,0,0,0};
    class ScrollBar
    {
        width = 0;
        height = 0;
        scrollSpeed = 0.06;
        arrowEmpty = "\a3\3DEN\Data\Controls\ctrlDefault\arrowEmpty_ca.paa";
        arrowFull = "\a3\3DEN\Data\Controls\ctrlDefault\arrowFull_ca.paa";
        border = "\a3\3DEN\Data\Controls\ctrlDefault\border_ca.paa";
        thumb = "\a3\3DEN\Data\Controls\ctrlDefault\thumb_ca.paa";
        color[] = {1,1,1,1};
    };
};
class ctrlDefaultText: ctrlDefault
{
    sizeEx = "4.32 * (1 / (getResolution select 3)) * pixelGrid * 0.5";
    font = "RobotoCondensedLight";
    shadow = 1;
};

class ctrlStatic: ctrlDefaultText
{
    type = CT_STATIC;
    colorBackground[] = {0,0,0,0};
    text = "";
    lineSpacing = 1;
    fixedWidth = 0;
    colorText[] = {1,1,1,1};
    colorShadow[] = {0,0,0,1};
    moving = 0;
    autoplay = 0;
    loops = 0;
    tileW = 1;
    tileH = 1;
    onCanDestroy = "";
    onDestroy = "";
    onMouseEnter = "";
    onMouseExit = "";
    onSetFocus = "";
    onKillFocus = "";
    onKeyDown = "";
    onKeyUp = "";
    onMouseButtonDown = "";
    onMouseButtonUp = "";
    onMouseButtonClick = "";
    onMouseButtonDblClick = "";
    onMouseZChanged = "";
    onMouseMoving = "";
    onMouseHolding = "";
    onVideoStopped = "";
};

Share this post


Link to post
Share on other sites
On 1/6/2017 at 10:31 AM, Larrow said:

3

Edited by mat552
snip

Share this post


Link to post
Share on other sites

Holy crap Larrow, that really is useful.

Never would have noticed up until now.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×