mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Disable OK button before role is selected
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
* Disable auto join in your mission's description.ext using defValueParam1 = 31;
|
||||
* Must be executed from RscDisplayMultiplayerSetup onLoad
|
||||
*/
|
||||
private ["_timer","_dialog","_time","_infoText","_roleSelect","_timerStart","_paramDisplay","_paramCtrl","_valueText","_test","_paramButton"];
|
||||
private ["_timer","_dialog","_time","_OKButton","_infoText","_roleSelect","_timerStart","_paramDisplay","_paramCtrl","_valueText","_test","_paramButton"];
|
||||
disableSerialization;
|
||||
|
||||
_dialog = ((_this select 0) select 0);
|
||||
_OKButton = _dialog displayCtrl 1;
|
||||
_OKButton ctrlEnable False;
|
||||
|
||||
waitUntil {ctrlShown (_dialog displayCtrl 109)};
|
||||
disableUserInput True;
|
||||
|
||||
@@ -17,16 +20,18 @@ _valueText = _paramCtrl lbText 1;
|
||||
(findDisplay 146) CloseDisplay 2;
|
||||
_test = count (toArray _valueText);
|
||||
disableUserInput false;
|
||||
_OKButton ctrlEnable True;
|
||||
|
||||
_paramButton = _dialog displayCtrl 128;
|
||||
_paramButton ctrlShow false;
|
||||
|
||||
if (_test > 3 || _test < 1) exitWith {};
|
||||
|
||||
_time = diag_tickTime;
|
||||
_infoText = _dialog displayCtrl 300;
|
||||
_roleSelect = _dialog displayCtrl 109;
|
||||
_paramButton = _dialog displayCtrl 128;
|
||||
_roleSelect ctrlEnable False;
|
||||
_infoText ctrlShow true;
|
||||
_paramButton ctrlShow false;
|
||||
_timerStart = parseNumber _valueText;
|
||||
|
||||
while {(diag_tickTime - _time) <= _timerStart} do {
|
||||
@@ -40,4 +45,4 @@ while {(diag_tickTime - _time) <= _timerStart} do {
|
||||
_infoText ctrlShow false;
|
||||
_infoText ctrlSetBackgroundColor [0,0,0,0];
|
||||
_infoText ctrlSetTextColor [0,0,0,0];
|
||||
ctrlActivate (_dialog displayCtrl 1);
|
||||
ctrlActivate _OKButton;
|
||||
Reference in New Issue
Block a user