Skip to content

Commit

Permalink
Goggles - Add draw overlay setting (acemod#10484)
Browse files Browse the repository at this point in the history
* Update fnc_applyGlassesEffect.sqf

* Update initSettings.inc.sqf

* Update stringtable.xml

* Update fnc_applyGlassesEffect.sqf

* Update stringtable.xml

---------

Co-authored-by: Grim <[email protected]>
  • Loading branch information
SpicyBagpipes and LinkIsGrim authored Nov 15, 2024
1 parent 02fc3a0 commit 760e956
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/goggles/functions/fnc_applyGlassesEffect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (_postProcessTintAmount != 0 && {GVAR(UsePP)} && GVAR(effects) in [1, 2]) the
private _imagePath = getText (_config >> ["ACE_Overlay", "ACE_OverlayCracked"] select GETBROKEN);
private _angle = getNumber (_config >> "ACE_Overlay_Angle");

if (_imagePath != "") then {
if ((_imagePath != "") && GVAR(drawOverlay)) then {
GVAR(GogglesLayer) cutRsc ["RscACE_Goggles", "PLAIN", 1, false, false];
private _overlay = (GLASSDISPLAY displayCtrl IDC_GOGGLES_OVERLAY);
_overlay ctrlSetText _imagePath;
Expand Down
8 changes: 8 additions & 0 deletions addons/goggles/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@
false, // default value
0 // isGlobal
] call CBA_fnc_addSetting;

[
QGVAR(drawOverlay), "CHECKBOX",
LSTRING(DrawOverlay),
localize LSTRING(SettingsName),
true,
0
] call CBA_fnc_addSetting;
3 changes: 3 additions & 0 deletions addons/goggles/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,8 @@
<Chinesesimp>着色 + 效果</Chinesesimp>
<Turkish>Ton + Efektler</Turkish>
</Key>
<Key ID="STR_ACE_Goggles_SettingDrawOverlay">
<English>Show Goggles Overlay</English>
</Key>
</Package>
</Project>

0 comments on commit 760e956

Please sign in to comment.