Thread Tools Display Modes
11-03-18, 03:32 PM   #1
Daywrecker
A Murloc Raider
Join Date: Nov 2018
Posts: 5
Need help with my own personal Interface / Addon

I am using 2 macros to move MultiBarBottomRight to the Center of the screen just under my character.
/run MultiBarBottomRight:ClearAllPoints();
MultiBarBottomRight:SetPoint("CENTER",0,200);
UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomRight"] = nil;

/run MultiBarBottomRight:Show()
/run MultiBarBottomRight:SetScale(1.2);
/run SetCVar ("nameplateSelfTopInset", .54)
/run SetCVar ("nameplateSelfBottomInset", .40)

This looks something like this:



However the bar keeps vanishing, sometimes moving between doorways, sometimes when attacking players.

I do not have this problem if I turn on "Interface > ActionBars > Bottom Right Bar" but that then looks untidy:



Please help!

Last edited by Daywrecker : 11-05-18 at 05:38 AM.
  Reply With Quote
11-03-18, 09:48 PM   #2
tonyis3l33t
A Cyclonian
 
tonyis3l33t's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 47
you need something to reapply the positioning .... and :Show() on certain (or maybe all) events.

something like

Code:
local function MoveFrame()

  MultiBarBottomRight:ClearAllPoints()
  MultiBarBottomRight:SetPoint("CENTER",0,200)
  UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomRight"] = nil
  MultiBarBottomRight:Show()

end

MultiBarBottomRight:HookScript("OnEvent", MoveFrame)
MultiBarBottomRight:SetScale(1.2)
MultiBarBottomRight:Show()
not tested... the 2nd :Show() should make it show at logon if you put all that code in a simple .lua file
  Reply With Quote
11-04-18, 04:07 AM   #3
Daywrecker
A Murloc Raider
Join Date: Nov 2018
Posts: 5
Thank you ever so much. I have no experience coding with Lua or WoW addons but with your help I've progressed.

I wanted to put the function into a macro to emulate the setup that Tournament Arena players are required to abide where they are not allowed any addons. So instead of using a .lua I am putting them in a macro.

I'm trying:

/run MultiBarBottomRight:HookScript("OnHide", function(f) f:Show() end)

Macro1:

/run MultiBarBottomRight:ClearAllPoints();
/run MultiBarBottomRight:SetPoint("CENTER",0,200) UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomRight"] = nil;
/run MultiBarBottomRight:HookScript("OnHide", function(f) f:Show() end)

Macro2:

/run MultiBarBottomRight:Show()
/run MultiBarBottomRight:SetScale(1.2);
/run SetCVar ("nameplateSelfTopInset", .54)
/run SetCVar ("nameplateSelfBottomInset", .40)

This vanishes during combat. It seems that when the 3 second buff Subterfuge falls off MultiBarBottomRight vanishes.

"MultiBarBottomRight:Show()" will not function during combat so this will not work.

Last edited by Daywrecker : 11-04-18 at 05:55 AM.
  Reply With Quote
11-04-18, 07:08 AM   #4
tonyis3l33t
A Cyclonian
 
tonyis3l33t's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 47
I'm digging in the code a bit here

https://github.com/tomrus88/Blizzard...ActionBars.lua

There are a few functions you might be able to hook in there to force your action bar to show again after its hidden.


MultiActionBar_Update()
UIParent_ManageFramePositions()
InterfaceOptions_UpdateMultiActionBars()
InterfaceOptionsActionBarsPanelPickupActionKeyDropDown_OnEvent()

etc.... gotta afk a bit tho


I'm also thinking overwrite the value set when you click the checkbox in interface options

https://github.com/tomrus88/Blizzard...ionsPanels.lua


also i very much like the idea of building a custom UI solely using code chunks small enough to use as macros...

Last edited by tonyis3l33t : 11-04-18 at 08:09 AM.
  Reply With Quote
11-04-18, 12:02 PM   #5
Daywrecker
A Murloc Raider
Join Date: Nov 2018
Posts: 5
Thanks for the Github link, that's just what I am after. I will do some exploring.
  Reply With Quote
11-04-18, 05:16 PM   #6
Daywrecker
A Murloc Raider
Join Date: Nov 2018
Posts: 5
So I have read that Blizzard merged all bars into StatusTrackingManager.lua
https://github.com/tomrus88/Blizzard...ingManager.lua
I will pull this apart and try and work out how to get my 2 macro version working.

For the mean time I have created a 6 macro version:



Here are the macros:

/run MultiBarBottomRight:Show()
/run MultiBarBottomRight:ClearAllPoints()
/run MultiBarBottomRight:SetPoint("CENTER",0,200)
/run UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomRight"] = nil
/run MultiBarBottomRight:SetPoint = function() end

/run MultiBarBottomRight:SetScale(1.2)
/run SetCVar ("nameplateSelfTopInset", .54)
/run SetCVar ("nameplateSelfBottomInset", .40)
/run MultiBarBottomRight:HookScript("OnEvent", function(f) f:Show() end)

/run MainMenuBarArtFrameBackground:ClearAllPoints()
/run MainMenuBarArtFrameBackground:UnregisterAllEvents()
/run MainMenuBarArtFrameBackground:Hide()
/run MainMenuBarArtFrame.PageNumber:Hide()
/run ActionBarDownButton:Hide()

/run ActionBarUpButton:Hide()
/run ActionButton1:ClearAllPoints()
/run ActionButton1:SetPoint("CENTER",-232,-7)
/run UIPARENT_MANAGED_FRAME_POSITIONS["ActionButton1"] = nil
/run ActionButton1.SetPoint = function() end

/run MultiBarBottomLeft:ClearAllPoints()
/run MultiBarBottomLeft:SetPoint("CENTER",0,37)
/run UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomLeft"] = nil
/run MultiBarBottomLeft.SetPoint = function() end

/run MainMenuBarArtFrame.LeftEndCap:Hide();MainMenuBarArtFrame.RightEndCap:Hide()
/run MainMenuBarArtFrameBackground.BackgroundLarge:Hide()
/run StanceButton1:ClearAllPoints()
/run StanceButton1:SetPoint("CENTER", 140, -2)
  Reply With Quote
11-04-18, 09:33 PM   #7
tonyis3l33t
A Cyclonian
 
tonyis3l33t's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 47
very nice progress, thanks for sharing the code!
  Reply With Quote
11-05-18, 05:42 AM   #8
Daywrecker
A Murloc Raider
Join Date: Nov 2018
Posts: 5
Of course and thank you so much for your help, I really didn't know where to begin to look for the Blizzard code. That, your code and your suggestions were very helpful.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need help with my own personal Interface / Addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off