Posted by payne on Thu, 16 Oct 2014 05:41:13
Hello! Please bare with me as I am not very familiar with creating addons, and I am having a very BASIC problem which Ive researched for days and haven't found an answer for. Honestly, its almost embarrassing for me to have to post here but I have run out of options.
All I am trying to do (as I am getting familiar with the language) is have a frame with a red background pop up when I log into WoW. As of right now, I don't want any buttons or anything on it, I just want to know why nothing is coming up at all! I added a script to the .lua to have it print a message when I loot a body, which works. However, this frame is not coming up at all. Here is the xml code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Script file="ASK.lua"/> <Frame name="ASKFrame" parent="UIParent" toplevel="true" enableMouse="true"> <Size x="400" y="400"/> </Size> <Anchors> <Anchor point="CENTER" relativePoint="CENTER" relativeTo="UIParent"/> </Anchors> <Layers> <Layer level="BACKGROUND"> <Size x="200" y="200"/> </Size> <Color r="1.0" g="0.0" b="0.0" a="0.5"/> <Anchors> <Anchor point="CENTER"> </Anchors> </Layer> </Layers> </Frames> </Ui>
Please help! :)
Posted by derrff on Thu, 13 Nov 2014 20:20:26
I am newer to Add-on coding but I do have real-world programming experience. From what it looks like this is easy! You simply need to place a call to your frames OnLoad() function. The syntax is simple: "framename"_OnLoad().
Posted by jnwhiteh on Fri, 26 Dec 2014 10:47:41
You can load the addon and then play with it using /run and /dump. For example /dump MyFrameName:Show() to see if its shown, then you can change anchors, sizes, etc and figure out what is goin gon.