Create a new addon and add the example below to config.cpp.
Example_Dialog1 contains a working dialog with a listbox and two buttons. In Example_Dialog2 I expect the dialog to be the exact same, except the background box is white instead of black. However when tested using createDialog you can see this is not the result.
Also worth checking the config viewer to see that the inherited control subclasses are listed correctly.
====***Example Below***====
class RscButtonMenuCancel;
class RscButtonMenuOK;
class RscListbox;
class RscText;
class Example_RscBaseDialog
{
idd = -1;
movingEnable = true;
onLoad = "\
[] spawn {\
while {dialog} do {\
if !(alive player) then {\
closeDialog 0;\
};\
};\
};\
";
};
class Example_Dialog1: Example_RscBaseDialog
{
class controls
{
class BackgroundBox: RscText
{
x = safezoneX+safezoneW*0.4;
y = safezoneY+safezoneH*0.325;
w = 0.2*safezoneW;
h = 0.165*safezoneH;
colorBackground[] = {0,0,0,0.7};
};
class Listbox: RscListbox
{
idc = 101;
x = safezoneX+safezoneW*0.405;
y = safezoneY+safezoneH*0.33;
w = 0.19*safezoneW;
h = 0.155*safezoneH;
colorBackground[] = {0,0,0,0.5};
};
class ButtonCancel: RscButtonMenuCancel
{
action = "closeDialog 0;";
x = safezoneX+safezoneW*0.44;
y = safezoneY+safezoneH*0.495;
w = 0.05*safezoneW;
h = 0.025*safezoneH;
};
class ButtonOK: RscButtonMenuOK
{
x = safezoneX+safezoneW*0.51;
y = safezoneY+safezoneH*0.495;
w = 0.05*safezoneW;
h = 0.025*safezoneH;
};
};
};
class Example_Dialog2: Example_Dialog1
{
class controls: controls
{
class BackgroundBox: BackgroundBox
{
colorBackground[] = {1,1,1,0.7};
};
};
};