Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use custom OK button to fix ui bug #1028

Merged
merged 1 commit into from
Nov 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions addons/settings/fnc_initDisplayGameOptions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,4 @@ _ctrlButtonExport ctrlAddEventHandler ["ButtonClick", {
(_display displayCtrl IDC_BTN_CONFIGURE_ADDONS) ctrlAddEventHandler ["ButtonClick", {_this call FUNC(gui_configure)}];

// ----- scripted OK button
(_display displayCtrl 999) ctrlAddEventHandler ["ButtonClick", {
call FUNC(gui_saveTempData);
ctrlParent (_this select 0) closeDisplay IDC_OK;
}];
(_display displayCtrl 999) ctrlAddEventHandler ["ButtonClick", {call FUNC(gui_saveTempData)}];
10 changes: 10 additions & 0 deletions addons/settings/fnc_openSettingsMenu.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ _ctrlConfigureAddons call FUNC(gui_configure);
_ctrlConfigureAddons ctrlEnable false;
_ctrlConfigureAddons ctrlShow false;

// replace BI's broken OK button with our own to fix https://github.com/CBATeam/CBA_A3/issues/1027
private _ctrlScriptedOK = _dlgSettings displayCtrl 999;
_ctrlScriptedOK ctrlEnable false;
_ctrlScriptedOK ctrlShow false;

private _ctrlConfirm = _dlgSettings ctrlCreate ["RscButtonMenuOK", IDC_CANCEL];
_ctrlConfirm ctrlSetPosition ctrlPosition _ctrlScriptedOK;
_ctrlConfirm ctrlCommit 0;
_ctrlConfirm ctrlAddEventHandler ["ButtonClick", {call FUNC(gui_saveTempData)}];

// then switch right to missions tab if in 3den
if (ctrlIDD _display isEqualTo 313) then {
private _ctrlMissionButton = _dlgSettings displayCtrl IDC_BTN_MISSION;
Expand Down