WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   combat log unlock undock move lock (https://www.wowinterface.com/forums/showthread.php?t=54118)

Uitat 08-04-16 08:43 AM

combat log unlock undock move lock
 
im looking to undock and move the combat log ever so slightly just so my other scripts can finish the move

i know how to set pos for the log, but for the life of me i cant find any readings of how to undock chatFrame2 from chatFrame1


Lua Code:
  1. ChatFrame1:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',1955 ,45)
  2. ChatFrame1:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",1445 ,265)
  3.    
  4. ChatFrame2:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',955 ,45)
  5. ChatFrame2:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",445 ,265)

these are not the actual positions, just the scripts that will run in a function the numbers are just for placeholding

Uitat 08-04-16 09:22 AM

figured a way out
 
i set to shown just to make sure it didn't accidentally get hidden

then i asked it to undock

then in a local frame which fires only on player enters world itrolls out the imprtant placement and scaling sh** for the UI

Lua Code:
  1. SetChatWindowShown(2, 1)
  2. SetChatWindowDocked(2, 0)
  3. SetCVar("useuiScale", 1);
  4. SetCVar("displaySpellActivationOverlays", 0);
  5. SetCVar("uiScale", 0.64);
  6. local aspect = CreateFrame("frame", nil, UIParent)
  7. aspect:RegisterEvent("PLAYER_ENTERING_WORLD")
  8. aspect:SetScript("OnEvent", function(self, event)              
  9.     UIParent:SetScale(0.6) -- DO NOT CHANGE THIS
  10.     ChatFrame2:ClearAllPoints()
  11.     ChatFrame1:ClearAllPoints()
  12.     ChatFrame1:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',1955 ,45)
  13.     ChatFrame1:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",1445 ,265)
  14.     ChatFrame2:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',955 ,45)
  15.     ChatFrame2:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",445 ,265)   
  16.     aspect:UnregisterAllEvents()
  17. end)

spanky0312 08-24-20 06:03 AM

Quote:

Originally Posted by Uitat (Post 317427)
i set to shown just to make sure it didn't accidentally get hidden

then i asked it to undock

then in a local frame which fires only on player enters world itrolls out the imprtant placement and scaling sh** for the UI

Lua Code:
  1. SetChatWindowShown(2, 1)
  2. SetChatWindowDocked(2, 0)
  3. SetCVar("useuiScale", 1);
  4. SetCVar("displaySpellActivationOverlays", 0);
  5. SetCVar("uiScale", 0.64);
  6. local aspect = CreateFrame("frame", nil, UIParent)
  7. aspect:RegisterEvent("PLAYER_ENTERING_WORLD")
  8. aspect:SetScript("OnEvent", function(self, event)              
  9.     UIParent:SetScale(0.6) -- DO NOT CHANGE THIS
  10.     ChatFrame2:ClearAllPoints()
  11.     ChatFrame1:ClearAllPoints()
  12.     ChatFrame1:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',1955 ,45)
  13.     ChatFrame1:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",1445 ,265)
  14.     ChatFrame2:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',955 ,45)
  15.     ChatFrame2:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",445 ,265)   
  16.     aspect:UnregisterAllEvents()
  17. end)


Sorry for necro but gotta comment on this, exactly what I am looking for :) Thanks!

spanky0312 08-24-20 06:27 AM

In case anyone interested my code, with hiding tweaks like Backgrounds/borders, chat tab button.


Lua Code:
  1. --[[Show Chat/Combat Log & Undock]]--
  2. SetChatWindowShown(2, 1)
  3. SetChatWindowDocked(2, 0)
  4.  
  5. --[[Only Load Script When Entering World]]--
  6. local aspect = CreateFrame("frame", nil, UIParent)
  7. aspect:RegisterEvent("PLAYER_ENTERING_WORLD")
  8. aspect:SetScript("OnEvent", function(self, event)    
  9.  
  10. --[[Set Chat Frame Position & Size]]--
  11. ChatFrame1:ClearAllPoints()
  12. ChatFrame1:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',5 ,5)
  13. ChatFrame1:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",392 ,225)
  14.  
  15. --[[Texture Tweaks]]--
  16. ChatFrame1Background:Hide()
  17. ChatFrame1ButtonFrame:Hide()
  18. ChatFrame1RightTexture:Hide()
  19. ChatFrame1LeftTexture:Hide()
  20. ChatFrame1TopTexture:Hide()
  21. ChatFrame1BottomTexture:Hide()
  22.  
  23. ChatFrame1Tab:Hide()
  24. ChatFrame1TabLeft:Hide()
  25. ChatFrame1TabMiddle:Hide()
  26. ChatFrame1TabRight:Hide()
  27. ChatFrame1TabText:Hide()
  28. ChatFrame1TabHighlightLeft:Hide()
  29. ChatFrame1TabHighlightMiddle:Hide()
  30. ChatFrame1TabHighlightRight:Hide()
  31. ChatFrame1TabSelectedLeft:Hide()
  32. ChatFrame1TabSelectedMiddle:Hide()
  33. ChatFrame1TabSelectedRight:Hide()
  34.  
  35. GeneralDockManager:Hide()
  36.  
  37. --[[Set Combat Log Position & Size]]--
  38. ChatFrame2:ClearAllPoints()
  39. ChatFrame2:SetPoint('BOTTOMLEFT','UIParent','BOTTOMLEFT',426 ,5)
  40. ChatFrame2:SetPoint("TOPRIGHT","UIParent","BOTTOMLEFT",812 ,225)
  41.  
  42. --[[Texture Tweaks]]--
  43. ChatFrame2Background:Hide()
  44. ChatFrame2ButtonFrame:Hide()
  45. ChatFrame2RightTexture:Hide()
  46. ChatFrame2LeftTexture:Hide()
  47. ChatFrame2TopTexture:Hide()
  48. ChatFrame2BottomTexture:Hide()
  49.  
  50. ChatFrame2Tab:Hide()
  51. ChatFrame2TabLeft:Hide()
  52. ChatFrame2TabMiddle:Hide()
  53. ChatFrame2TabRight:Hide()
  54. ChatFrame2TabText:Hide()
  55. ChatFrame2TabHighlightLeft:Hide()
  56. ChatFrame2TabHighlightMiddle:Hide()
  57. ChatFrame2TabHighlightRight:Hide()
  58. ChatFrame2TabSelectedLeft:Hide()
  59. ChatFrame2TabSelectedMiddle:Hide()
  60. ChatFrame2TabSelectedRight:Hide()
  61.  
  62. CombatLogQuickButtonFrame_CustomTexture:Hide()
  63.  
  64. --[[Ending Script]]--
  65.  aspect:UnregisterAllEvents()
  66. end)


All times are GMT -6. The time now is 02:29 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI