EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 12-12-2010, 08:35 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default 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
Reply With Quote
  #2  
Unread 12-12-2010, 09:12 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Yes, via OnMove code in Window A that moves Window B. Basically OnMove="WindowB.Left = WindowA.Left+WindowA.Width+1 WindowB.Top=WindowA.Top ".
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.

Last edited by gm9 : 12-12-2010 at 09:21 PM.
Reply With Quote
  #3  
Unread 12-12-2010, 10:06 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

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.
Reply With Quote
  #4  
Unread 12-19-2010, 09:27 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

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
Reply With Quote
  #5  
Unread 12-20-2010, 03:32 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Don't think there is a way. Better off just setting the sorting order with the available options.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #6  
Unread 01-01-2011, 02:49 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

Quote:
Originally Posted by gm9 View Post
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.
Reply With Quote
  #7  
Unread 01-01-2011, 06:34 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

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.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #8  
Unread 01-01-2011, 07:00 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

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
Reply With Quote
  #9  
Unread 01-02-2011, 01:15 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

What do you mean? Post your code.

Subtraction is as easy as addition.. just replace + with -
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #10  
Unread 01-03-2011, 05:06 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

Quote:
Originally Posted by Drumstix42 View Post
What do you mean? Post your code.

Subtraction is as easy as addition.. just replace + with -
The - doesn't seem to take affect but i just didn't auto-align the window since one of the users of the UI wanted to move them separately.

Thanks though,
Draven
Reply With Quote
  #11  
Unread 01-04-2011, 10:02 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

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.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #12  
Unread 04-17-2011, 12:00 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

Greetings,
I am reviving this old thread because:
  1. Its my thread
  2. It is also the same issue, just a diffrent window.

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
Reply With Quote
  #13  
Unread 04-17-2011, 08:47 PM
TalTal TalTal is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 1,095
Default

Quote:
Originally Posted by Draven_Caine View Post
Greetings,
I am reviving this old thread because:
  1. Its my thread
  2. It is also the same issue, just a diffrent window.

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
Something like

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

Last edited by TalTal : 04-17-2011 at 08:51 PM.
Reply With Quote
  #14  
Unread 04-21-2011, 09:11 AM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

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:
  • OnTextChanged="Parent.Parent.OnscreenMessage.Top=Parent.Parent.Effects.Top+89 Parent.Parent.OnscreenMessage.Left=Parent.Parent.Effects.Left+90"
Now to align the AchievementCompleted to the effects window:
  • OnTextChanged="Parent.Parent.AchievementCompleted.Top=/MainHUD.Effects.Top+89
    Parent.Parent.AchievementCompleted.Left=/MainHUD.Effects.Left+90"
should have the same code but it doesnt work. Now I think this has something to do with having to do up to the "Root" when coming back to the /MainHUD.

Any help would be appreciated.
Draven
Reply With Quote
  #15  
Unread 04-21-2011, 10:05 AM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

Quote:
OnTextChanged="Parent.Parent.AchievementCompleted.Top=/MainHUD.Effects.Top+89
Parent.Parent.AchievementCompleted.Left=/MainHUD.Effects.Left+90"
Unless something has change you can't address object the way you are trying to in the bolded code.

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.
__________________
Landiin's EQ2MAP Updater Discussion Download

Last edited by Landiin : 04-21-2011 at 10:13 AM.
Reply With Quote
  #16  
Unread 04-21-2011, 11:19 AM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

Quote:
Originally Posted by Landiin View Post
Unless something has change you can't address object the way you are trying to in the bolded code.

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.
Ok but how do i go from the Journal tree to the MainHUD tree?

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
Reply With Quote
  #17  
Unread 04-21-2011, 12:48 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by Draven_Caine View Post
Ok but how do i go from the Journal tree to the MainHUD tree?
Read what Landiin wrote, for your purposes there is no MainHUD tree, it's all in the same tree.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #18  
Unread 04-21-2011, 01:35 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

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
Reply With Quote
  #19  
Unread 04-21-2011, 06:04 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

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.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #20  
Unread 04-21-2011, 08:45 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

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
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:12 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI