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 |
Yes, via OnMove code in Window A that moves Window B. Basically OnMove="WindowB.Left = WindowA.Left+WindowA.Width+1 WindowB.Top=WindowA.Top ".
|
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 |
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 |
Don't think there is a way. Better off just setting the sorting order with the available options.
|
Quote:
Thanks, Draven |
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. |
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 |
What do you mean? Post your code.
Subtraction is as easy as addition.. just replace + with - |
Quote:
Thanks though, Draven |
It's usually best to do one math thing at a time, the engine seems to read from right to left in calculations and such, might just be a parsing/spacing error. I've used both addition/subtraction a bit in the interface, so it definitely works.
|
Greetings,
I am reviving this old thread because:
I have the window that "You have gained a skill" window auto-aligned to my effects window (bottom, center). Now the issue is my effects window has a frame on it, this alignment works until the frame is turned on, or vise-versa. How do I tell it if the frame is used use the effects top alignment + 100, if the frame isnt used, align to the effects window +50 for example? Thanks, Draven |
Quote:
COND = Window.Frame.Visible TOPA = Window.Top + 100 TOPB = Window.Top + 50 NEWTOP = COND ? TOPA : TOPB Windowb.Top = NEWTOP and of course this would be in a button or directly in the onshow of windowb, so it would trigger onshow of windowb. Silat |
OK I got it working last night since I had a break from work.
The only issue I ran into was I am using this code for 2 windows to align them to Window A (effects window) To align the OnscreenMessage to the effects window:
Any help would be appreciated. Draven |
Quote:
Once a window is created in display memory it becomes a child of _HUD. You do not need to worry about nodes like MainHud unless you are working with windows that are not in the display memory. Basically the way the tree looks for windows that are in display memory is: _HUD |- Experience |- Map Hope this helps. |
Quote:
This doesnt work either. OnTextChanged="Parent.Parent.AchievementCompleted.Top=Parent.Parent.Parent.MainH UD.Effects.Top+89 Parent.Parent.AchievementCompleted.Left=Parent.Parent.Parent.MainHUD.Effects.Lef t+90" I need to go from the text field in the Journals/AchievementCompleted/TextField --> MainHUD.Effects. Now the problem I see is I cant use "Root" as a parent the same way i have been in other windows. Basiclly I am telling the AchievementCompleted window when the text field changes set the top to what the effects window top is plus 89. Thanks, Draven |
Quote:
|
Still doesnt make sense for what I am trying to do.
After the UI is loaded, all windows are: _hud --Map --AcheievementCompleted --Effects --Maintained Is this correct, or no? If this is the case I see how to do it if this is incorrect, I am still at square one. Thanks, Draven |
Example:
Inventory |- Broker MainHUD |- Persona When loaded into game Broker and Persona are both located under the same Parent page, instead of different ones. So you don't have to navigate up the tree as far. Only one parent level past a window's main page. |
Oh awsome,
Thanks Druxskix that is much clearer. I got it working so its like effects, OnscreenMessege and Acheievement are all under MainHUD (behaviour like). Thanks again everyone, Draven |
All times are GMT -5. The time now is 10:24 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI