WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Problem with EnableMouse() and RaidPullout frame (https://www.wowinterface.com/forums/showthread.php?t=59678)

bambinek 09-23-23 03:35 PM

Problem with EnableMouse() and RaidPullout frame
 
The FrameName:EnableMouse(false) function that makes frame of your choosing uninteractive doesn't work with RaidPullout1 (old dragged raid frames)...

But I don't know if it's whether I simply don't have the right frame name (I think I tried every single one from framestack) or the frame is simply protected from being click-through - which would be a shame..

Pic rel:




And some code I found that was supposed to help (it didn't).

Lua Code:
  1. local FrameCollection = {};
  2. function GetChildrenTree(RaidPullout1) --- Walk the frame hierarchy recursively adding children.
  3.         if Frame:GetChildren() then
  4.            for _,child in pairs({Frame:GetChildren()}) do
  5.                 if child:IsMouseEnabled() then
  6.                     tinsert(FrameCollection,child);
  7.                 end
  8.                 GetChildrenTree(child);
  9.             end
  10.         end
  11.     end
  12.     GetChildrenTree(ParentFrame);
  13.    
  14.     -- check lock status and enable/disable mouse.
  15.     if ParentFrame:IsVisible() then
  16.         if Config.Locked then
  17.             ParentFrame:EnableMouse(false);
  18.            for _,childframe in pairs (FrameCollection) do
  19.                 childframe:EnableMouse(false);
  20.             end
  21.         else
  22.             ParentFrame:EnableMouse(true);
  23.             for _,childframe in pairs (FrameCollection) do
  24.                 childframe:EnableMouse(true);
  25.             end        
  26.         end
  27.     end

A fellow lua dev couldn't help me, said he wasn't familiar with idiosyncrasies because he never used these frames.


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

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI