WoWInterface - View Single Post - How to use LineMixin?
View Single Post
05-02-18, 03:01 PM   #3
nUI Maintainer
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,460
Thought I had found it .. but nada ..

It's in the taxi map frame. It looks like they have the code part there but it's not exactly the same, but maybe you have to have a Line object as well as a texture object .. but this is just theorising from browsing through those files.


This xml line being what I suspect you have to use

<Line parentKey="Fill" atlas="_UI-Taxi-Line-horizontal" alpha="0" alphaMode="ADD" />

Will test it out and see

Edit: Yes thats it ..

In my xml file I have this and for simplicity I threw the code in here too

        <Frame name="DraggingFrame" inherits = "DraggableFrameTemplate, TooltipTemplate"   parent="UIParent" frameStrata="LOW">
		<Size x="200" y="300"/>
			<Anchor point="CENTER" x = "150" y = "100" />
            <Layer level="BACKGROUND">
                <Texture parentKey="Background" > 
                        <Anchor point="TOPLEFT" x = "1" y = "-1"/>
                        <Anchor point="BOTTOMRIGHT" x = "-1" y = "1"/>
            <Layer level="BACKGROUND" textureSubLevel="-2">
                <Line parentKey="Fill" atlas="_UI-Taxi-Line-horizontal" alpha="1" />
                self.Fill.line = CreateFromMixins(LineMixin)

This draws a line from the top left to the bottom right

Edit2: Grr nevermind .. this is just using the Line's natural drawing mechanism and not the drawline function at all .. as soon as I add that function I get a can't get parent problem, so maybe it's not ready to be used in its entirety yet.

Last edited by Xrystal : 05-02-18 at 03:14 PM.
  Reply With Quote