View Single Post
07-22-23, 10:43 AM   #9
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,894
You can extract all the game UI code to peruse it at your leasure. The layout of the template itself is in ReputationFrame.xml.

In the code above, to make the frame created by the template a child of another frame, replace UIParent with the parent frame. eg.
Lua Code:
  1. local RepFrame = CreateFreame("Frame", 'nkttennesseeRepFrame", UIParent)
  2. RepFrame.RepX = CreateFrame("Button", "$parentRepX", RepFrame, "ReputationBarTemplate")

Once you extracted the code you can look in ReputationFrame.lua and see what's happening in the OnEnter/OnLeave code. You can either hook you bars OnEnter/OnLeave scripts to do something after that or replace one ot both of them:
Lua Code:
  1. RepFrame.RepX:SetScript("OnEnter", function(self) ... end)
  2. RepFrame.RepX:SetScript("OnLeave", function(self) ... end)

For the last, it probably something in the template OnLoad code expecting a particular sizing of the .container element. You could override that after the bar is created.

The other possabilty is just creating the bars/fontstrings etc. from scratch which wouldn't contain all the template bits you're not interested in.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 07-22-23 at 10:46 AM.
  Reply With Quote