You could probably do this, I commented the changes.
PHP Code:
function AskQuestion(title, question) {
this.ans = false;
new GuiWindowCtrl("QUESTION_WINDOW") {
profile = GuiBlueWindowProfile;
clientrelative = true;
clientextent = "222,99";
canclose = false;
canmaximize = false;
canminimize = false;
canmove = true;
canresize = true;
closequery = false;
destroyonhide = false;
// added visible = true so it shows for new messages
visible = true;
text = title;
x = 1093;
y = 646;
new GuiButtonCtrl("QUESTION_YES") {
profile = GuiBlueButtonProfile;
text = "Yes";
width = 116;
y = 69;
// catch the buttonclick event and send it to onButtonClick
thiso.catchEvent(this, "onAction", "onButtonClick");
}
new GuiButtonCtrl("QUESTION_NO") {
profile = GuiBlueButtonProfile;
text = "No";
width = 107;
x = 115;
y = 69;
// catching the buttonclick event and send it to onButtonClick
thiso.catchEvent(this, "onAction", "onButtonClick");
}
new GuiScrollCtrl("QUESTION_SCROLL") {
profile = GuiBlueScrollProfile;
height = 68;
hscrollbar = "dynamic";
vscrollbar = "dynamic";
width = 225;
new GuiMLTextCtrl("QUESTION_MULTILINE") {
profile = GuiBlueMLTextProfile;
height = 34;
horizsizing = "width";
text = question;
width = 200;
}
}
}
// wait until the window is hidden
waitfor(QUESTION_WINDOW, "onHide");
return this.ans;
}
function onButtonClick(obj) {
this.ans = obj.text != "No";
QUESTION_WINDOW.hide();
}
Seems like
déj* vu.