From b45a7e24138f578cef72f72e5a7a9f737ffbb4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20E=C4=9Fitmen?= Date: Tue, 24 Oct 2017 16:39:15 +0300 Subject: [PATCH] Add custom combo box control (#5661) --- addons/pylons/functions/fnc_showDialog.sqf | 2 +- addons/pylons/menu.hpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index 5379b1b2f9..3633d40a14 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -57,7 +57,7 @@ if (["ace_fastroping"] call EFUNC(common,isModLoaded) && {_hasFRIES > 1}) then { GVAR(comboBoxes) = []; { - private _combo = _display ctrlCreate ["ctrlCombo", -1]; + private _combo = _display ctrlCreate [QGVAR(CtrlCombo), -1]; private _picturePos = ctrlPosition (_display displayCtrl ID_PICTURE_AIRCRAFT); private _uiPos = getArray (_x >> "UIposition"); _combo ctrlSetPosition [ diff --git a/addons/pylons/menu.hpp b/addons/pylons/menu.hpp index 8161f4d8a5..85ca6b1c95 100644 --- a/addons/pylons/menu.hpp +++ b/addons/pylons/menu.hpp @@ -1,3 +1,11 @@ +// combo box that looks good + doesn't get cut off +class RscCombo; +class GVAR(CtrlCombo): RscCombo { + arrowEmpty = "\a3\3DEN\Data\Controls\ctrlCombo\arrowEmpty_ca.paa"; + arrowFull = "\a3\3DEN\Data\Controls\ctrlCombo\arrowFull_ca.paa"; + colorSelectBackground[] = {"(profileNamespace getVariable ['GUI_BCG_RGB_R', 0.13])","(profileNamespace getVariable ['GUI_BCG_RGB_G', 0.54])","(profileNamespace getVariable ['GUI_BCG_RGB_B', 0.21])",1}; +}; + class IGUIBack; class RscCheckBox; class RscListBox;