Skip to content

Commit 78aee07

Browse files
committed
fix Menu not rendering correctly
1 parent 0617c14 commit 78aee07

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

addons/Streamator/Spectator/Menu/fn_addMenuItem.sqf

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ if (isNil QGVAR(menuEntries)) then {
2525
GVAR(menuEntries) set ["MAIN", []];
2626
};
2727

28-
private _entry = GVAR(menuEntries) get [_path, []];
28+
_path = toUpper _path;
29+
30+
private _entry = GVAR(menuEntries) getOrDefault [_path, []];
2931

3032
if ((_entry findIf {(_x select 0) == _dik}) != -1) exitWith {
3133
["Menu Item %1/%2 reused Keybinding %3", _path, _name, call compile (keyName _dik)] call BIS_fnc_error;

addons/Streamator/Spectator/Menu/fn_executeEntry.sqf

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
1515
*/
1616
params ["_path", "_keyCode"];
17-
private _entries = GVAR(menuEntries) get [_path, []];
17+
18+
_path = toUpper _path;
19+
20+
private _entries = GVAR(menuEntries) getOrDefault [_path, []];
1821
{
1922
_x params ["_dik", "", "_onUse", "_onRender", "", "_args"];
2023
if (_dik == _keyCode) then {

addons/Streamator/Spectator/Menu/fn_renderMenu.sqf

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
1515
*/
1616
params [["_path", "", [""]], ["_mainPrefixText", ""]];
17+
18+
_path = toUpper _path;
19+
1720
if (_path isEqualTo "") then {
1821
"MAIN" call FUNC(renderMenu);
1922
};
20-
private _entry = GVAR(menuEntries) get [_path, []];
23+
private _entry = GVAR(menuEntries) getOrDefault [_path, []];
2124
if (_entry isEqualTo []) exitWith {
2225
"MAIN" call FUNC(renderMenu);
2326
};

0 commit comments

Comments
 (0)