View Single Post
09-27-20, 05:12 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Lua Code:
  1. local testButton = CreateFrame("Button", nil, WorldMapFrame, "UIPanelButtonTemplate")
  2. testButton:SetPoint("CENTER", 0, 0)
  3. testButton:SetFrameStrata("FULLSCREEN")
  4. testButton:SetWidth(230)
  5. testButton:SetHeight(80)
  6.  
  7. testButton:SetText("Click to hide world map!")
  8.  
  9. testButton:SetScript("OnClick", function()
  10.     if InCombatLockdown() then
  11.       WorldMapFrame:Hide()
  12.     else
  13.       HideUIPanel(WorldMapFrame)
  14.     end
  15.   end)

Open the map, enter combat with target dummy, press the button. press esc. twice (first clears the dummy), game menu opens.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote