|
12-12-2010, 08:35 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Align to another window
Greetings,
Is there a way to have window B auto align to window A if window A is moved?
If window A is player window and window B is effects:
If i move the player window, to have the effects window always aligned to the player window right side?
Thanks,
Draven
|
12-12-2010, 09:12 PM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
Yes, via OnMove code in Window A that moves Window B. Basically OnMove="WindowB.Left = WindowA.Left+WindowA.Width+1 WindowB.Top=WindowA.Top ".
Last edited by gm9 : 12-12-2010 at 09:21 PM.
|
12-12-2010, 10:06 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Greetings,
Thanks GM9, its a bit more complex than VG's UI but very understandable. I'll be able to work-in some of my ideas now ... at a later date
Thanks,
Draven
Last edited by Draven_Caine : 12-12-2010 at 10:14 PM.
|
12-19-2010, 09:27 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Greetings,
Ok i got the code working, not as dynamic as yours but my player window is a set size so it works.
Is there a way to set a window size to the number of icons in it. This is for the detrimental effects.
Like if there is one row of icons set the window width to 25 width, if there are 2 rows set the width to 50 width?
Thanks,
Draven
|
12-20-2010, 03:32 AM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
Don't think there is a way. Better off just setting the sorting order with the available options.
|
01-01-2011, 02:49 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Quote:
Originally Posted by gm9
Yes, via OnMove code in Window A that moves Window B. Basically OnMove="WindowB.Left = WindowA.Left+WindowA.Width+1 WindowB.Top=WindowA.Top ".
|
A few issues I ran into. - How do it get it to subtract?
- It seems that if you add a variable of plus or minus to the code it doesn't behave in the UI builder, this might be just a UI builder issue though.
Thanks,
Draven
Last edited by Draven_Caine : 01-01-2011 at 02:52 PM.
|
01-01-2011, 06:34 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
UIBuilder doesn't like math calculations that result in numbers higher than... 10? I think....
Something like that. it returns the numbers with large 1e10 type values that break the code.
In-game will work fine though.
|
01-01-2011, 07:00 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Ahh, that makes sense, thanks Drumstix.
Do you happen to know how to subtract with GM9's code from this thread, it doesn't seem to work for me, in or out of game.
Thanks,
Draven
|
01-02-2011, 01:15 AM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
What do you mean? Post your code.
Subtraction is as easy as addition.. just replace + with -
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:30 AM.
|
|