@@ -8,4 +8,56 @@ function addon:initBattlefieldMap()
88 addon :registerFrame (BattlefieldMapFrame , BATTLEFIELD_MINIMAP , db .BattlefieldMapFrame )
99 lib :RegisterResizable (BattlefieldMapFrame )
1010 lib :HideByDefault (BattlefieldMapFrame )
11+
12+ -- Unsure if taint or secret issues can spread, only change these if they're not their default
13+ if BattlefieldMapOptions .locked ~= true then BattlefieldMapOptions .locked = true end
14+ if BattlefieldMapOptions .position ~= nil then BattlefieldMapOptions .position = nil end
15+
16+ -- BattlefieldMapTab needs to be changed, base UI uses an old system to drag the battlefield map by dragging the tab while unlocked
17+ BattlefieldMapTab :SetParent (BattlefieldMapFrame )
18+ BattlefieldMapTab :ClearAllPoints ()
19+ BattlefieldMapTab :SetUserPlaced (false )
20+ BattlefieldMapTab :SetPoint (" BOTTOMLEFT" , BattlefieldMapFrame , " TOPLEFT" , 30 , 5 )
21+ BattlefieldMapTab :RegisterForDrag ()
22+ BattlefieldMapTab :HookScript (" OnClick" , function (self , button )
23+ if button ~= " RightButton" then return end
24+ -- Watch Blizzard_BattlefieldMap.lua for changes
25+ MenuUtil .CreateContextMenu (self , function (owner , rootDescription )
26+ rootDescription :SetTag (" MENU_BATTLEFIELD_MAP" );
27+
28+ do
29+ -- Show battlefield players
30+ local function IsSelected ()
31+ return BattlefieldMapOptions .showPlayers ;
32+ end
33+
34+ local function SetSelected ()
35+ BattlefieldMapOptions .showPlayers = not BattlefieldMapOptions .showPlayers ;
36+ BattlefieldMapFrame :UpdateUnitsVisibility ();
37+ end
38+ rootDescription :CreateCheckbox (SHOW_BATTLEFIELDMINIMAP_PLAYERS , IsSelected , SetSelected );
39+ end
40+
41+ -- EME change here: disable the lock/unlock frame (in addition to disabile its dragability)
42+ do
43+ -- Battlefield minimap lock
44+ local function IsSelected ()
45+ -- return BattlefieldMapOptions.locked;
46+ return false
47+ end
48+
49+ -- local function SetSelected()
50+ -- BattlefieldMapOptions.locked = not BattlefieldMapOptions.locked;
51+ -- end
52+ rootDescription :CreateCheckbox (" EditModeExpanded: use Edit Mode to move this!" , IsSelected , nop )
53+ end
54+
55+ do
56+ -- Opacity
57+ rootDescription :CreateButton (BATTLEFIELDMINIMAP_OPACITY_LABEL , function ()
58+ self :ShowOpacity ();
59+ end );
60+ end
61+ end );
62+ end )
1163end
0 commit comments