Merge pull request #866 from acemod/interfix

imenu: remove shadow, fix caching
This commit is contained in:
commy2 2015-04-26 12:42:17 +02:00
commit 71f29466d7
4 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ _ctrl = _this select 0;
_index = _this select 1;
_text = _this select 2;
if (_text != Str(ARR_SELECT(GVAR(ParsedTextCached),_index,""))) then {
if (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")) then {
GVAR(ParsedTextCached) set [_index, _text];
_ctrl ctrlSetStructuredText parseText _text;
};

View File

@ -30,6 +30,7 @@ if (_menuType == 0) then {
GVAR(keyDownTime) = diag_tickTime;
GVAR(openedMenuType) = _menuType;
GVAR(lastTimeSearchedActions) = -1000;
GVAR(ParsedTextCached) = [];
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) ||
visibleMap ||

View File

@ -77,6 +77,7 @@ if (GVAR(openedMenuType) >= 0) then {
GVAR(startHoverTime) = diag_tickTime;
GVAR(lastPath) = _hoverPath;
GVAR(expanded) = false;
GVAR(ParsedTextCached) = [];
} else {
if(!GVAR(expanded) && diag_tickTime-GVAR(startHoverTime) > 0.25) then {
GVAR(expanded) = true;

View File

@ -32,9 +32,9 @@ if(_icon == "") then {
};
_text = if (GVAR(UseListMenu)) then {
format ["<img image='%1' color='%2' align='left'/><t color='%3' size='0.80' shadow='2' shadowColor='%4' shadowOffset='0.06'>%5</t>", _icon, _iconColor, _textColor, _shadowColor, _text]
format ["<img image='%1' color='%2' align='left'/><t color='%3' size='0.80' shadow='1' shadowColor='%4' shadowOffset='0.06'>%5</t>", _icon, _iconColor, _textColor, _shadowColor, _text]
} else {
format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center' shadow='2' shadowColor='%4' shadowOffset='0.06'>%5</t>", _icon, _iconColor, _textColor, _shadowColor, "ace_breakLine" callExtension _text];
format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center' shadow='1' shadowColor='%4' shadowOffset='0.06'>%5</t>", _icon, _iconColor, _textColor, _shadowColor, "ace_breakLine" callExtension _text];
};
//_ctrl ctrlSetStructuredText parseText _text;