Can't get any frames to display
Hello everyone!
Before I start, I should say that I'm an experienced software developer for web applications. I'd like to think that I have a good working knowledge of XML and the LUA language seems simple enough to figure out as I go. My problem at this point, after pouring through the WoW API and XML tutorials, I can't really get a frame to display. I'm assuming it may be because there's nothing actually in the frame at the moment. I just want to get the frame to display, either on start up or through the ingame "addon screen". I'm very sure that it's something I'm going wrong :p . The addon layout at the moment is basic with a single toc file, a main_ui.xml file and a main.lua file all in the same directory. toc file: Code:
## Interface: 60200 Code:
Code:
message('HelloWorld') Thank you all :). |
You haven't told your frame what to look like. ;)
PS.- It's much, much nicer to create your frames in Lua (not an acronym, by the way). You don't need XML unless you're dealing with creating secure templates. |
Hmmm... I read a few posts on doing that and it intrigued me. To write a UI within the data layer would be great.
Do you know of any resources that I can look at for me to get started? Most of the addons I've seen still use xml, and I can't find anything on doing that. Also, I plan on having the addon be primarily within a frame that stays on the screen, sort of like MyRolePlay. I'm not sure whether that would affect how I should go about starting it. EDit: I did some specific searching for creating lua frames and I came across this tidbit: local self = CreateFrame("Frame", "FunWidget", UIParent) Would this be in the right direction for creating a frame in lua? |
In lua your frame would be
Code:
local frame = CreateFrame("Frame", "MyAddon_Frame") Code:
frame.texture = CreateTexture("$parent_Texture") If you go here you can find a list of all the widget type (start with "Frame" from the list on the right hand side) and their associated methods. |
Quote:
The reason why we need Textures and FontStrings to show frames is because they are the visual elements we see. Frames are just a set of coordinates defining a container that we can align Textures and FontStrings to. Some frame types can also react to mouse events within the screen coordinates they cover. |
Quote:
|
All times are GMT -6. The time now is 11:56 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI