Thread: rmod Layouts
View Single Post
Old 04/03/08, 5:32 PM   #114 (permalink)
Auralin
Von Kaiser
 
Draenei Priest
 
Feathermoon
Zork,
Thanks so much.
I got it working, I have my bags and my character bar in the bottom left hand side of the screen and its set to fade on mouse over.
So heres the code if you want the same thing on your UI.
-------------
--bags fade
-------------

    local f = CreateFrame("Frame","bag_holder",UIParent)
    f:SetFrameStrata("BACKGROUND")
    f:SetWidth(300)
    f:SetHeight(30)
    f:SetBackdrop({
      bgFile = "", 
      edgeFile = "", 
      tile = true, tileSize = 16, edgeSize = 16, 
      insets = { left = 0, right = 0, top = 0, bottom = 0 }
    })
    f:SetBackdropColor(0,0,0,1)
    f:ClearAllPoints()  
    f:SetPoint("BOTTOM",UIParent,"BOTTOM",-230,0);
    f:SetPoint("LEFT",-0,0)
    f:Show()
    
    
      MainMenuBarBackpackButton:ClearAllPoints()  
      MainMenuBarBackpackButton:SetParent(f)
      MainMenuBarBackpackButton:SetPoint("BOTTOMRIGHT",bag_holder,"TOPRIGHT",-270,-40)
      
      CharacterMicroButton:ClearAllPoints()
      CharacterMicroButton:SetParent(f)
      CharacterMicroButton:SetPoint("BOTTOMRIGHT",bag_holder,"TOPRIGHT",-185,-36)
      
      CharacterBag0Slot:SetParent(f)
      CharacterBag1Slot:SetParent(f)
      CharacterBag2Slot:SetParent(f)
      CharacterBag3Slot:SetParent(f)
      KeyRingButton:SetParent(f)
      
      TalentMicroButton:SetParent(f)
      SpellbookMicroButton:SetParent(f)
      QuestLogMicroButton:SetParent(f)
      SocialsMicroButton:SetParent(f)
      MainMenuMicroButton:SetParent(f)
      HelpMicroButton:SetParent(f)
      LFGMicroButton:SetParent(f)
      
  local counter = .5 
  local function fOnUpdate(_,elapsed)
    counter = counter + elapsed
      if counter > .5 then counter = 0
       if MouseIsOver(f) then
         f:SetAlpha(1)
           else
         f:SetAlpha(0)
       end
      end
    end

    
  addon:SetScript("OnUpdate",fOnUpdate)
I hope this bit of code will help someone else out. Put this in your rBars file and make sure you have your bags and character buttons set to show or this won't work.
 
User is offline.
Reply With Quote