diff --git a/CHANGELOG.md b/CHANGELOG.md index b1e52bd8..482e9ad1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ + # 8.1.0 ## ADDED - Attribute can now be disabled by adding additional optional pbo files to the main folder (ADD WIKI LINK HERE) -- Custom marker color attribute -- Shortcut to open ACE Arsenal if ACE is loaded + +- Shortcut to open ACE Arsenal if ACE is loaded (CTRL + SHIFT + L) - Improved Capture Frame UI - Added none transparent background @@ -12,6 +15,9 @@ - Added collapse and expand tree control buttons - Added button to open https://ui.perfetto.dev/ in default browser (Profiling.exe only) +## CHANGED +- Minimap is now hidden when arsenal is opened + # 8.0.2 ## CHANGED - Allow Unit Traits To Be Set To 0 diff --git a/addons/main/GUI/customizeMenuStrip.hpp b/addons/main/GUI/customizeMenuStrip.hpp deleted file mode 100644 index 67d3364d..00000000 --- a/addons/main/GUI/customizeMenuStrip.hpp +++ /dev/null @@ -1,107 +0,0 @@ -class ENH_CustomizeMenuStrip -{ - idd = IDD_CUSTOMIZE_MENU_STRIP; - onLoad = "_this call ENH_fnc_menuStrip_customize"; - class ControlsBackground - { - DISABLE_BACKGROUND - class Background: ctrlStaticBackground - { - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W); - y = QUOTE(WINDOW_TOPAbs + CTRL_DEFAULT_H); - w = QUOTE(WINDOW_W_ATTRIBUTES * GRID_W); - h = QUOTE(WINDOW_HAbs - 3 * CTRL_DEFAULT_H); - }; - class Header: ctrlStaticTitle - { - text = "$STR_ENH_MAIN_MENUSTRIPENTRIES"; - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W); - y = QUOTE(WINDOW_TOPAbs); - w = QUOTE(WINDOW_W_ATTRIBUTES * GRID_W); - h = QUOTE(CTRL_DEFAULT_H); - }; - class Footer: ctrlStaticFooter - { - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W); - y = QUOTE(WINDOW_TOPAbs + WINDOW_HAbs - 3 * CTRL_DEFAULT_H - 2 * GRID_H); - w = QUOTE(WINDOW_W_ATTRIBUTES * GRID_W); - h = QUOTE(CTRL_DEFAULT_H + 2 * GRID_H); - }; - }; - class Controls - { - // We want this group so that MouseMoving event handlers reports x coords from 0 to 1 - class Group: ctrlControlsGroupNoScrollbars - { - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W + 1 * GRID_W); - y = QUOTE(WINDOW_TOPAbs + CTRL_DEFAULT_H + GRID_H); - w = QUOTE(WINDOW_W_ATTRIBUTES * GRID_W - 2 * GRID_W); - h = QUOTE(WINDOW_HAbs - 7 * CTRL_DEFAULT_H + GRID_H); - class Controls - { - class TreeView: ctrlTree - { - idc = IDC_CUSTOMIZE_MENU_STRIP_TREE; - idcSearch = IDC_CUSTOMIZE_MENU_STRIP_SEARCH; - w = QUOTE(WINDOW_W_ATTRIBUTES * GRID_W - 2 * GRID_W); - h = QUOTE(WINDOW_HAbs - 7 * CTRL_DEFAULT_H); - borderSize = 0; - colorBorder[] = {0, 0, 0, 0}; - colorBackground[] = {COLOR_TAB_RGBA}; - colorLines[] = {1, 1, 1, 1}; - }; - }; - }; - class Hint: ctrlStructuredText - { - idc = IDC_CUSTOMIZE_MENU_STRIP_SEARCH; - text = "$STR_ENH_MAIN_MENUSTRIPENTRIES_TOOLTIP"; - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W + 1 * GRID_W); - y = QUOTE(WINDOW_TOPAbs + WINDOW_HAbs - 5 * CTRL_DEFAULT_H - 3 * GRID_H); - w = QUOTE(WINDOW_W_ATTRIBUTES * GRID_W - 2 * GRID_W); - h = QUOTE(2 * CTRL_DEFAULT_H); - colorBackground[] = {COLOR_TAB_RGBA}; - }; - class Search: ctrlEdit - { - idc = IDC_CUSTOMIZE_MENU_STRIP_SEARCH; - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W + GRID_W); - y = QUOTE(WINDOW_TOPAbs + WINDOW_HAbs - 3 * CTRL_DEFAULT_H - GRID_H); - w = QUOTE(40 * GRID_W); - h = QUOTE(CTRL_DEFAULT_H); - }; - class ButtonSearch: ctrlButtonSearch - { - idc = IDC_CUSTOMIZE_MENU_STRIP_BUTTON_SEARCH; - TEXT = TEXTURE_SEARCH_START; - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W + 41 * GRID_W); - y = QUOTE(WINDOW_TOPAbs + WINDOW_HAbs - 3 * CTRL_DEFAULT_H - GRID_H); - w = QUOTE(5 * GRID_W); - h = QUOTE(CTRL_DEFAULT_H); - }; - class ButtonCollapseAll: ctrlButtonCollapseAll - { - idc = IDC_CUSTOMIZE_MENU_STRIP_BUTTON_COLLAPSE_ALL; - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W + 46 * GRID_W); - y = QUOTE(WINDOW_TOPAbs + WINDOW_HAbs - 3 * CTRL_DEFAULT_H - GRID_H); - w = QUOTE(5 * GRID_W); - h = QUOTE(CTRL_DEFAULT_H); - }; - class ButtonExpandAll: ctrlButtonExpandAll - { - idc = IDC_CUSTOMIZE_MENU_STRIP_BUTTON_EXPAND_ALL; - x = QUOTE(CENTER_X - 0.5 * WINDOW_W_ATTRIBUTES * GRID_W + 51 * GRID_W); - y = QUOTE(WINDOW_TOPAbs + WINDOW_HAbs - 3 * CTRL_DEFAULT_H - GRID_H); - w = QUOTE(5 * GRID_W); - h = QUOTE(CTRL_DEFAULT_H); - }; - class ButtonSave: ctrlButtonClose - { - text = "$STR_EDITOR_MENU_FILE_SAVE"; - x = QUOTE(CENTER_X + 0.5 * WINDOW_W_ATTRIBUTES * GRID_W - 26 * GRID_W); - y = QUOTE(WINDOW_TOPAbs + WINDOW_HAbs - 3 * CTRL_DEFAULT_H - GRID_H); - w = QUOTE(25 * GRID_W); - h = QUOTE(CTRL_DEFAULT_H); - }; - }; -}; diff --git a/addons/main/cfg3DEN.hpp b/addons/main/cfg3DEN.hpp index e9867454..1d6da7ef 100644 --- a/addons/main/cfg3DEN.hpp +++ b/addons/main/cfg3DEN.hpp @@ -78,7 +78,7 @@ class Cfg3DEN #include "controls\introText.hpp" #include "controls\largerEditMulti.hpp" #include "controls\mapIndicators.hpp" - #include "controls\markerColor.hpp" + // #include "controls\markerColor.hpp" #include "controls\missionEndingCasualties.hpp" #include "controls\sliderMulti120.hpp" #include "controls\sliderMultiZero.hpp" diff --git a/addons/main/cfgFunctions.hpp b/addons/main/cfgFunctions.hpp index 344ca4e3..f0bf5724 100644 --- a/addons/main/cfgFunctions.hpp +++ b/addons/main/cfgFunctions.hpp @@ -35,8 +35,6 @@ class CfgFunctions class debugOptions_init; class dynamicSkill_onAttributeLoad; class dynamicSkill_onAttributeSave; - class markerColor_onAttributeLoad; - class markerColor_onAttributeSave; class establishingShot_onAttributeLoad; class establishingShot_onAttributeSave; class groupMarker_onAttributeLoad; @@ -44,14 +42,16 @@ class CfgFunctions class groupMarker_onLoad; class holdAction_onAttributeLoad; class holdAction_onAttributeSave; + class inputList_add; class inputList_onAttributeLoad; class inputList_onAttributeSave; - class inputList_add; class inputList_remove; class introText_onAttributeLoad; class introText_onAttributeSave; class mapIndicators_onAttributeLoad; class mapIndicators_onAttributeSave; + // class markerColor_onAttributeLoad; + // class markerColor_onAttributeSave; class missionEndingCasualties_initDebriefingCombo; class missionEndingCasualties_onAttributeLoad; class missionEndingCasualties_onAttributeSave; @@ -154,7 +154,6 @@ class CfgFunctions class entityList_addTooltips; class favoritesList; class locationList_enhanced; - class menuStrip_customize; }; #ifdef ISDEV class Internal diff --git a/addons/main/config.cpp b/addons/main/config.cpp index 4751c867..3aa822f6 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -15,7 +15,6 @@ #include "GUI\attributeSearch.hpp" #include "GUI\briefingEditor.hpp" #include "GUI\CfgSentencesBrowser.hpp" -#include "GUI\customizeMenuStrip.hpp" #include "GUI\ESE.hpp" #include "GUI\exportGUIDefines.hpp" #include "GUI\functionsViewer.hpp" diff --git a/addons/main/functions/interface/fn_menuStrip_customize.sqf b/addons/main/functions/interface/fn_menuStrip_customize.sqf deleted file mode 100644 index f389aa55..00000000 --- a/addons/main/functions/interface/fn_menuStrip_customize.sqf +++ /dev/null @@ -1,203 +0,0 @@ -#include "\x\enh\addons\main\script_component.hpp" - -// This is where the checkbox of the first level starts -#define TV_X_START 6.5 * GRID_W - -// That's the amount we need to move to the right with each level that we go deeper -#define INDENT_SIZE_X 4.2 * GRID_W - -// With of the checkbox icon -#define CHECKBOX_WIDTH 3 * GRID_W - -#define SELECT_TEXTURE [TEXTURE_CHECKED, TEXTURE_UNCHECKED, TEXTURE_PARTIALLY_CHECKED] select _state - -disableSerialization; - -params ["_display"]; - -private _level = 0; -private _path = []; -private _pathTemp = []; -private _menuStripItems = configFile >> "Display3DEN" >> "Controls" >> "MenuStrip" >> "Items"; -private _ctrlTV = CTRL(IDC_CUSTOMIZE_MENU_STRIP_TREE); - -private _fnc_addChildren = -{ - params ["_config", "_path"]; - private _children = getArray (_config >> "items"); - - private _countChildren = count _children; - - { - if (_x != "Separator") then - { - // Check if item is a root item - if (_x in getArray (_menuStripItems >> "items")) then - { - _path = []; - _level = 0; - }; - - private _indexItem = _ctrlTV tvAdd [_path, getText (_menuStripItems >> _x >> "text")]; - - _pathTemp = _path + [_indexItem]; - - private _state = ENH_MenuStrip_Customization_HashMap getOrDefault [_x, 0]; - - _ctrlTV tvSetPicture [_pathTemp, SELECT_TEXTURE]; - _ctrlTV tvSetData [_pathTemp, _x]; - _ctrlTV tvSetTooltip [_pathTemp, _x]; - - if (getArray (_menuStripItems >> _x >> "items") isNotEqualTo []) then - { - _path pushBack _indexItem; - _level = _level + 1; - [_menuStripItems >> _x, _path] call _fnc_addChildren; - } - else - { - // Go one level back on the last child with no children - if (_forEachIndex == _countChildren - 1) then - { - _path deleteAt [-1]; - _level = 0 - }; - }; - }; - } forEach _children; -}; - -ENH_MenuStrip_Customization_HashMap = profileNamespace getVariable ["ENH_MenuStrip_Customization_HashMap", createHashMap]; - -[ - configFile >> "Display3DEN" >> "Controls" >> "MenuStrip" >> "Items", - _path -] call _fnc_addChildren; - -_display displayAddEventHandler ["Unload", -{ - profileNamespace setVariable ["ENH_MenuStrip_Customization_HashMap", ENH_MenuStrip_Customization_HashMap]; - saveProfileNamespace; - ENH_MenuStrip_Customization_HashMap = nil; -}]; - -_ctrlTV setVariable ["fnc_toggleChildren", -{ - params ["_ctrlTV", "_parentPath", "_state"]; - - private _childrenCount = _ctrlTV tvCount _parentPath; - - for "_i" from 0 to _childrenCount - 1 do - { - _ctrlTV tvSetValue [_parentPath + [_i], _state]; - - ENH_MenuStrip_Customization_HashMap set [_ctrlTV tvData _parentPath + [_i], _state]; - - _ctrlTV tvSetPicture [_parentPath + [_i], SELECT_TEXTURE]; - - [_ctrlTV, _parentPath + [_i], _state] call (_ctrlTV getVariable ["fnc_toggleChildren", {}]); - }; -}]; - -_ctrlTV setVariable -[ - "ColorHighlight", - [ - profileNamespace getVariable ["GUI_BCG_RGB_R", 0.77], - profileNamespace getVariable ["GUI_BCG_RGB_G", 0.51], - profileNamespace getVariable ["GUI_BCG_RGB_B", 0.08], - 1 - ] -]; - -// Update selection when mouse is moving -_ctrlTV ctrlAddEventHandler ["TreeMouseMove", -{ - params ["_ctrlTV", "_path"]; - - _ctrlTV tvSetCurSel _path; -}]; - -// Save cursor position -_ctrlTV ctrlAddEventHandler ["MouseMoving", -{ - params ["_ctrlTV", "_xPos"]; - - _ctrlTV setVariable ["CursorPosX", _xPos]; -}]; - -_ctrlTV ctrlAddEventHandler ["MouseButtonDown", -{ - params ["_ctrlTV"]; - - private _path = tvCurSel _ctrlTV; - private _cursorPosX = _ctrlTV getVariable ["CursorPosX", 0]; - - private _indentCount = count _path - 1; - - private _ctrlTreeWidth = ctrlPosition _ctrlTV select 2; - - private _checkboxStart = _indentCount * INDENT_SIZE_X + TV_X_START; - private _inCheckboxArea = _cursorPosX >= _checkboxStart && {_cursorPosX <= (_checkboxStart + CHECKBOX_WIDTH )}; - - if _inCheckboxArea then - { - // Get state of parent - // 0 = Visible - // 1 = Hidden - // 2 = Children partially visible/hidden - - // Switch state - private _state = [1, 0] select (_ctrlTV tvValue _path); //TODO: Fix that - _ctrlTV tvSetValue [_path, _state]; - - // Store value for later use - ENH_MenuStrip_Customization_HashMap set [_ctrlTV tvData _path, _state]; - - _ctrlTV tvSetPicture [_path, SELECT_TEXTURE]; - - [_ctrlTV, _path, _state] call (_ctrlTV getVariable ["fnc_toggleChildren", {}]); - }; -}]; - -// Handle search button -CTRL(IDC_CUSTOMIZE_MENU_STRIP_SEARCH) ctrlAddEventHandler ["EditChanged", -{ - params ["_ctrlEdit", "_newText"]; - - private _image = [TEXTURE_SEARCH_END, TEXTURE_SEARCH_START] select (_newText == ""); - - ctrlParent _ctrlEdit displayCtrl IDC_CUSTOMIZE_MENU_STRIP_BUTTON_SEARCH ctrlSetText _image; -}]; - -// Handle search button -CTRL(IDC_CUSTOMIZE_MENU_STRIP_BUTTON_SEARCH) ctrlAddEventHandler ["ButtonClick", -{ - params ["_ctrlButton"]; - - //Change search button icon and clear edit control to reset tree view filter - ctrlParent _ctrlButton displayCtrl IDC_CUSTOMIZE_MENU_STRIP_SEARCH ctrlSetText ""; - _ctrlButton ctrlSetText TEXTURE_SEARCH_START; -}]; - -// Collapse -CTRL(IDC_CUSTOMIZE_MENU_STRIP_BUTTON_COLLAPSE_ALL) ctrlAddEventHandler ["ButtonClick", -{ - params ["_ctrlButton"]; - - tvCollapseAll (ctrlParent _ctrlButton displayCtrl IDC_CUSTOMIZE_MENU_STRIP_TREE); -}]; - -// Expand -CTRL(IDC_CUSTOMIZE_MENU_STRIP_BUTTON_EXPAND_ALL) ctrlAddEventHandler ["ButtonClick", -{ - params ["_ctrlButton"]; - - tvExpandAll (ctrlParent _ctrlButton displayCtrl IDC_CUSTOMIZE_MENU_STRIP_TREE); -}]; - -// Add 3rd checkbox status - -/* -When an item status changes, get the parent with path [x]. Save this path and loop through all children and grand children .... and find the first two that don't have the -save status. That means 3rd state should be applied to path [x]*/