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

Medical/Repair 3den Toolbox State Fix (Bug fix for #4902) #4905

Merged
merged 4 commits into from
Feb 18, 2017
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
7 changes: 3 additions & 4 deletions addons/medical/CfgEden.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Cfg3DEN {
};
};
class GVAR(isMedicControl): Title {
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
attributeSave = "(missionnamespace getvariable ['ace_isMedic_temp',0]) - 1;";
attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);";
attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1";
class Controls: Controls {
class Title: Title{};
class Value: ctrlToolbox {
Expand All @@ -22,7 +22,6 @@ class Cfg3DEN {
rows = 1;
columns = 4;
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)};
onToolboxSelChanged = "missionnamespace setvariable ['ace_isMedic_temp',_this select 1];";
};
};
};
Expand All @@ -36,7 +35,7 @@ class Cfg3DEN {
control = QGVAR(isMedicControl);
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
tooltip = CSTRING(Attributes_isMedic_Description);
expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
expression = QUOTE(if (_value > -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
typeName = "NUMBER";
condition = "objectBrain";
defaultValue = "-1";
Expand Down
5 changes: 2 additions & 3 deletions addons/repair/CfgEden.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Cfg3DEN {
};
};
class GVAR(isEngineerControl): Title {
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
attributeSave = "(missionnamespace getvariable ['ace_isEng_temp',0]) - 1;";
attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);";
attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1";
class Controls: Controls {
class Title: Title{};
class Value: ctrlToolbox {
Expand All @@ -22,7 +22,6 @@ class Cfg3DEN {
rows = 1;
columns = 4;
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_specialist)};
onToolboxSelChanged = "missionnamespace setvariable ['ace_isEng_temp',_this select 1];";
};
};
};
Expand Down