How to use LineMixin?
Does anyone know how to use the LineMixin? I tried messing around with it but I'm not sure how to properly mix it with a texture.
Lua Code:
|
You could try this in your lua file..
Code:
object.line = CreateFromMixins(LineMixin) Obviously replace object with the appropriate parent window object. EDIT: .. Hmm, not as easy as I thought .. Its now sounding like the line is the texture but not 100% sure |
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. https://www.townlong-yak.com/framexm...taProvider.xml 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 Code:
<UI> 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. |
d'oh ...
Just realised what they meant by mixing with a texture .. xml... <Texture parentKey="Background" mixin = "LineMixin"> And then I removed the CreateFromMixins line from the code element... it fixes the GetParent error but now getting problems figuring out what values will work. Edit: Well no errors at all now - here is my xml file now Code:
<UI> |
Finally got a working version.
Lua Code:
|
sweet, made similar changes to my test frame and it works too. Better keep it in case i forget when i need/want it rofl
|
LineMixin is the old way of making lines. Lines are actually a real widget type you can create using
Lua Code:
XML Code:
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. |
rofl, I had that working easy .. I didn't know Line came after LineMixin. Googling came up with nothing apart from this post and the api file itself on github.
|
All times are GMT -6. The time now is 03:25 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI