-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1329 from BrettMayson/rename
Item Rename Framework
- Loading branch information
Showing
6 changed files
with
273 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ PREP(preload3DEN); | |
PREP(preloadCurator); | ||
|
||
PREP(openItemContextMenu); | ||
|
||
PREP(getInventoryItemData); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include "script_component.hpp" | ||
/* ---------------------------------------------------------------------------- | ||
Internal Function: cba_ui_fnc_getInventoryItemData | ||
Description: | ||
Returns item data from inventory display control | ||
Parameters: | ||
_control - RscDisplayInventory control <CONTROL> | ||
_index - Item index <NUMBER> | ||
Returns: | ||
_classname, _container, _containerType | ||
Examples: | ||
(begin example) | ||
[_groundContainer, 5] call cba_ui_fnc_getInventoryItemData; | ||
(end) | ||
Author: | ||
commy2, SynixeBrett | ||
---------------------------------------------------------------------------- */ | ||
|
||
params ["_control", "_index"]; | ||
|
||
private _unit = call CBA_fnc_currentUnit; | ||
|
||
private _container = objNull; | ||
private _containerType = _control getVariable QGVAR(containerType); | ||
switch _containerType do { | ||
case "GROUND": { | ||
_container = GVAR(CurrentGroundItemHolder); | ||
}; | ||
case "CARGO": { | ||
_container = GVAR(CurrentContainer); | ||
}; | ||
case "UNIFORM_CONTAINER": { | ||
_container = uniformContainer _unit; | ||
}; | ||
case "VEST_CONTAINER": { | ||
_container = vestContainer _unit; | ||
}; | ||
case "BACKPACK_CONTAINER": { | ||
_container = backpackContainer _unit; | ||
}; | ||
}; | ||
|
||
// Reports classname for every item type except backpacks (https://feedback.bistudio.com/T183096) | ||
private _classname = _control lbData _index; | ||
|
||
[_classname, _container, _containerType] |
Oops, something went wrong.