View Single Post
05-06-21, 04:29 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Maybe your looking for something more like:

Lua Code:
  1. local f = CreateFrame("Frame", "SomeOnEnterFrame")
  2. f:SetSize(200, 200)
  3. f:SetPoint("TOPLEFT")
  4. f.t = f:CreateTexture()
  5. f.t:SetAllPoints()
  6. f.t:SetTexture("abc")
  7. f.t:SetAlpha(0.4)
  8. f:SetScript("OnUpdate", function(self)
  9.     if MouseIsOver(self) then
  10.         if not self.BigSize then
  11.             self.BigSize = true
  12.             self:SetSize(400, 400)
  13.         end
  14.     else
  15.         if self.BigSize then
  16.             self.BigSize = nil
  17.             self:SetSize(200, 200)
  18.         end
  19.     end
  20. end)
Depending on what else you want to do with the frame.

The setting of BigSize could also include whatever you wanted to do OnEnter/OnLeave.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote