Skip to content

Commit

Permalink
Added parameter to open on a parent display
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorAU committed Apr 5, 2019
1 parent 75cd6d0 commit 72cf653
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
9 changes: 7 additions & 2 deletions addon/systems/displayGuiMessage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ params [
["_title","",[""]],
["_code",{},[{}]],
["_button1","",[""]],
["_button2",0,[""]]
["_button2",0,[""]],
["_parentDisplay",displayNull,[displayNull]]
];

createDialog QUOTE(DISPLAY_NAME);
if (!isNull _parentDisplay) then {
_parentDisplay createDisplay QUOTE(DISPLAY_NAME);
} else {
createDialog QUOTE(DISPLAY_NAME);
};

private _return = {
params ["_display","_confirmed"];
Expand Down
9 changes: 7 additions & 2 deletions addon/systems/displayListbox.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ params [
["_title","",[""]],
["_code",{},[{}]],
["_button1","",[""]],
["_button2",0,[""]]
["_button2",0,[""]],
["_parentDisplay",displayNull,[displayNull]]
];

createDialog QUOTE(DISPLAY_NAME);
if (!isNull _parentDisplay) then {
_parentDisplay createDisplay QUOTE(DISPLAY_NAME);
} else {
createDialog QUOTE(DISPLAY_NAME);
};

private _return = {
params ["_display","_confirmed"];
Expand Down
9 changes: 7 additions & 2 deletions addon/systems/displaySlider.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ params [
["_formatVal",{},[{}]],
["_code",{},[{}]],
["_button1","",[""]],
["_button2",0,[""]]
["_button2",0,[""]],
["_parentDisplay",displayNull,[displayNull]]
];

createDialog QUOTE(DISPLAY_NAME);
if (!isNull _parentDisplay) then {
_parentDisplay createDisplay QUOTE(DISPLAY_NAME);
} else {
createDialog QUOTE(DISPLAY_NAME);
};

private _return = {
params ["_display","_confirmed"];
Expand Down
9 changes: 7 additions & 2 deletions addon/systems/displayText.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ params [
["_title","",[""]],
["_code",{},[{}]],
["_button1","",[""]],
["_button2",0,[""]]
["_button2",0,[""]],
["_parentDisplay",displayNull,[displayNull]]
];

createDialog ([QUOTE(DISPLAY_NAME),QUOTE(JOIN(DISPLAY_NAME,Multi))] select _multiLine);
if (!isNull _parentDisplay) then {
_parentDisplay createDisplay ([QUOTE(DISPLAY_NAME),QUOTE(JOIN(DISPLAY_NAME,Multi))] select _multiLine);
} else {
createDialog ([QUOTE(DISPLAY_NAME),QUOTE(JOIN(DISPLAY_NAME,Multi))] select _multiLine);
};

private _return = {
params ["_display","_confirmed"];
Expand Down

0 comments on commit 72cf653

Please sign in to comment.