Quantcast
WoWInterface - View Single Post - How to use LineMixin?
View Single Post
05-02-18, 09:21 PM   #7
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 929
LineMixin is the old way of making lines. Lines are actually a real widget type you can create using
Lua Code:
  1. local line = frame:CreateLine(...)
or to modify your xml:
XML Code:
  1. <UI>
  2.     <Frame name="DrawFrame" parent="UIParent" frameStrata="LOW">
  3.         <Size x="300" y="300"/>
  4.         <Anchors>
  5.             <Anchor point="CENTER" />
  6.         </Anchors>
  7.         <Layers>
  8.             <Layer level="BACKGROUND">
  9.                 <Texture parentKey="Background" setAllPoints="true">
  10.                     <Color r="0" g="0" b="0" a=".70"/>
  11.                 </Texture>
  12.             </Layer>
  13.             <Layer level="OVERLAY" textureSubLevel="7">
  14.                 <Line parentKey="Fill" file="Interface\TAXIFRAME\UI-Taxi-Line" thickness="64">
  15.                     <Color r="1" g="0" b="0"/>
  16.                     <StartAnchor relativePoint="CENTER"/>
  17.                     <EndAnchor relativePoint="CENTER" x="-300" y="300"/>
  18.                 </Line>
  19.             </Layer>
  20.         </Layers>
  21.     </Frame>
  22. </UI>

The methods are similar to the mixin, so it should be easy to switch to. The main difference is that the Set(Start|End)Point methods can accept relative points and relative frames like the normal SetPoint method.
__________________
Knowledge = Power; Be OP


Last edited by Gethe : 05-02-18 at 09:29 PM.
  Reply With Quote