Ok so, i've checked around for a while and i finally found a tutorial about "dialogs" (http://www.ofpec.com/tutorials/index...ion=show&id=82). I've play and tested around with it, but now there's a big problem: the dialog just won't show up.
This is the init.sqf
Code:
_ok = createDialog "SampleDialog";
waitUntil { !dialog }; // hit ESC to close it
hint "Dialog closed.";!"
And this is my Description.ext
Code:
class SampleDialog {
idd = -1;
movingEnable = false;
controlsBackground[] = {};
controls[] = {
ButtonControl,
HintButton
};
objects[] = {};
class ButtonControl {
idc = -1;
type = 1;
style = 2;
moving = false;
x = 0.45;
y = 0.9;
h = 0.05;
w = 0.1;
font = "Zeppelin32";
sizeEx = 0.025;
action = "player setDamage 1;";
text = "Close";
default = false;
colorText[] = {1,0,0,1};
colorFocused[] = {0,1,0,1};
colorShadow[] = {0.8,0.8,0.8,1};
colorBorder[] = {0.5,0.5,0.5,1};
colorBackground[] = {0,1,1,1};
colorBackgroundActive[] = {0,1,0,1};
colorDisabled[] = {1,0,0,1};
colorBackgroundDisabled[] = {0.5,0.5,0.5,1};
borderSize = 0.015;
offsetX = 0.005;
offsetY = 0.005;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
soundEnter[] = {"",0,1}; // NoSound
soundPush[] = {"",0,1}; // NoSound
soundClick[] = {"",0,1}; // NoSound
soundEscape[] = {"",0,1}; // NoSound
};
class HintButton : ButtonControl {
x = 0.6;
text = "Hint";
action = "hint 'Hint from second button!';";
};
};
But soon as i start the game, the "Dialog Closed" popup shows out. I read about that sometime the dialog close itself if there is a "closeDialog" function in the action field, but this is not the case. I don't really know what i'm doing wrong, please help!