Skip to content

Commit

Permalink
Array return gets formatted as multi-line string
Browse files Browse the repository at this point in the history
  • Loading branch information
DartRuffian committed Mar 14, 2024
1 parent 5e1771a commit 101b26c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions addons/arsenal/functions/fnc_handleStats.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ private _fnc_handleStats = {
if (_showText) then {
_textStatementResult = [_configEntry, _itemCfg] call _textStatement;

if !(_textStatementResult isEqualtype "") then {
_textStatementResult = str _textStatementResult;
if (_textStatementResult isEqualType []) then {
_textStatementResult = _textStatementResult joinString endl;
} else {
if !(_textStatementResult isEqualtype "") then {
_textStatementResult = str _textStatementResult;
};
};

_statsTextCtrl ctrlSetText _textStatementResult;
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/ui/RscAttributes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class GVAR(display) {
w = QUOTE(45 * GRID_W);
h = QUOTE(4 * GRID_H);
};
class statsText1: RscText {
class statsText1: RscTextMulti {
idc = IDC_statsText1;
shadow = 0;
fade = 1;
Expand Down

0 comments on commit 101b26c

Please sign in to comment.