Skip to content

ItemContextMenu - New Function: removeItemContextMenuOption#1763

Merged
PabstMirror merged 8 commits intoCBATeam:masterfrom
OverlordZorn:remove-contextmenu-option
Jun 17, 2025
Merged

ItemContextMenu - New Function: removeItemContextMenuOption#1763
PabstMirror merged 8 commits intoCBATeam:masterfrom
OverlordZorn:remove-contextmenu-option

Conversation

@OverlordZorn
Copy link
Copy Markdown
Contributor

@OverlordZorn OverlordZorn commented Jun 6, 2025

When merged this pull request will:

New Function

  • fnc_removeItemContextMenuOption.sqf
    • will remove ContextMenuOption based on class and identifier.
  • fnc_getItemContextMenuOptionIDs.sqf
    • will return identifiers based on Item.

Modified Functions

  • fnc_addItemContextMenuOption.sqf
    • New optional Parameter: "_ident"
    • GVAR(ItemContextMenuOptions) is now a hashmap instead of a cba namespace.
    • Individual "options" are now stored as hashmap with the _ident as the key while previous data array is now the value.
    • Returns "_ident" on completion
  • fnc_openItemContextMenu.sqf
    • Adapted to handle hashmaps instead of the namespace and array.

ToDo

  • make _ident available to the statement execution
  • ID Getter Function ?

Help Needed

  • I tried to get the "_ident" variable be handed over into the statement execution but wasnt able to. the inner workings there is witchcraft to me

OverlordZorn and others added 3 commits June 6, 2025 18:51
@PabstMirror PabstMirror added this to the 3.18.4 milestone Jun 17, 2025
@PabstMirror PabstMirror merged commit 32d1909 into CBATeam:master Jun 17, 2025
4 checks passed
@OverlordZorn OverlordZorn deleted the remove-contextmenu-option branch June 18, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants