CBA_A3
CBA_A3 copied to clipboard
Item Context Menu - Add icon for items that have context menu options
Is your enhancement related to a problem? Currently it is difficult to tell which items have context menu items on them without prior knowledge
Solution you'd like: Having say, a white dot or arrow at the corner of items could help identifying which items have context menu items, as currently unless you know about it being there it is very difficult to tell.
Quick mock-up:
Alternatives you've considered: N/A
How is this supposed to work? The listboxes don't have support for arbitrary icons in Arma. Unless you find a method, this is not viable.
Still not liking feature requests on an issue tracker.
I'd imagine it would work similarly to the DLC banners, or magazine capacity.
Ok, how does that work :) ?
Unsure as of yet, but there's RscDisplayInventory_DLCTemplate
that GroundContainer uses
Config snippet
class RscDisplayInventory_DLCTemplate
{
class controls
{
class DlcBg
{
idc = 101;
text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayInventory\InventoryStripe_ca.paa";
color[] = {1,1,1,1};
x = 0;
y = 0;
w = "1.8 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "1.8 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class DlcIcon
{
idc = 100;
text = "";
color[] = {1,1,1,1};
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
y = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
w = "1 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
class GroundContainer: RscListBox
{
class DLCTemplate: RscDisplayInventory_DLCTemplate
{
class Controls;
};
};
I don't see how this helps at all. How to turn that on or off?
Not feasible, unless someone finds a way to do something like this.
2 big problems
- Scanning for all actions on all times might take a noticeable amount of time (unqiue items * all actions). Normally you just check for actions on the single item you click on.
- The list is updated by the engine if someone else puts an item into your backpack, we'd have to handle it (need code always running, not just on open)
tested how to show it has actions
sleep 1; // some delay needed
for "_index" from 1 to ((lbSize _uniformItems) - 1) do {
_uniformItems lbSetText [_index, str _index]; // worked on mags but not items
_uniformItems lbSetTooltip [_index, format ["Double click for actions<br/>" + "real tooltip...."]]; // no Effect
_uniformItems lbSetColor [_index, [1,0,1,1]]; // works
};
moving item to ground and then back to uniform would cause everything to reset
The second issue could possibly be handled by player "loadout" eventhandler.
You could create an overlay control over the container listbox, and use the new ctrlSetScrollValues
and ctrlScrollValues
commands to mirror.
Rechecking I'd imagine might be doable with some degree of caching.
Very useful feature, tbh.
Caching will be a pretty good solution, as loadouts doesn't change completely all the time, so most of invetory changes will cause only a few real config reads. Basically we don't need all actions now, just any 1 non-disabled per item to mark item as interactive. Plus items in non-active containers may be skipped until container is opened.
As alternative: bind some key to inventory display, on press/hold - start scanning all items for actions and draw icons. From user side it will be like 'show interactive' mode, which may be used when needed.