View Single Post
11-23-14, 01:48 AM   #4
Zireko
An Aku'mai Servant
Join Date: Nov 2014
Posts: 38
Originally Posted by Phanx View Post
Unless you're really in love with XML from some prior programming experience, I'd suggest writing your addon in Lua only. It's much less verbose, and reduces the need for you to learn two separate syntaxes:
It's not that I'm more interested in xml. It's simply the fact most tutorials and information I find is in xml and not lua. I would really like it much more to do it in lua code strictly but most of the learning information focuses deeply on xml instead of lua. But I've got the code working pretty good right now however the mini map and chat window sometime fall behind my image that I'm using. I'm using <Layer level="BACKGROUND"> which I thought was the furthest background you can get but for some reasone when I move the mini map or chat system around my addon is layred infront of it and not in the deepst background. It would be helpfull if you could show me how to fix this in xml and how to code it in lua instead of xml. Here is my current xml code.

XML
Lua Code:
  1. <Ui xmlns="http://www.blizzard.com/wow/ui/"
  2.                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.                    xsi:schemaLocation="http://www.blizzard.com/wow/ui/
  4.                   ..\..\FrameXML\UI.xsd">
  5.     <Frame name="barAWindow" parent="UIParent" movable="true" alpha="0.8">
  6.         <Size x="1800" y="300"/>
  7.             <Anchors>
  8.                 <Anchor point="CENTER"/>
  9.             </Anchors>
  10.             <Layers>
  11.                 <Layer level="BACKGROUND">
  12.                     <Texture file="Interface\AddOns\ZBar\ZBarImgs\barA.blp" setAllPoints="true"/>
  13.                 </Layer>
  14.             </Layers>
  15.     <Scripts>
  16.         <OnMouseDown>
  17.             self:StartMoving()
  18.         </OnMouseDown>
  19.         <OnMouseUp>
  20.             self:StopMovingOrSizing()
  21.         </OnMouseUp>
  22.     </Scripts>
  23.     </Frame>
  24. </Ui>
  Reply With Quote