 |

04-05-2005, 03:18 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
vertical/horizontal expand toggle
Yeah, this one is gonna be a doozy. I have a vertical group window that I made which expands/contracts automatically everytime a new GroupMemberPage shows/hides. That was the eay part.
The necessary events for GroupMember2 are:[indent]OnHide="parent.size=280,45" OnShow="parent.size=280,90"
Now say I wanted to change it to a horizontal-expanding group window at the touch of a button.
So my button would say this, I think:
[/INDENTOnPress="parent.groupmember2.onhide="parent.size=240,45" "parent.groupmember2.onshow=490,45" "{{repeats for every groupmember}} onpress=press2"
Something like that? I just wanna make sure before i write like miles of code and have it not work.
EDIT: and then, after I do all of that, I would need some code to change the location of GroupMember2 from being under Groupmember1 to the right of Groupmember1. Would that be part of PackLoc or ... *??*
EDIT2: I just noticed this thing is in UI Developer. I meant to put in under XML Help, musta clicked the wrong forum. If ya'll think its more on topic there, there go ahead an move it ;-) thanks
Darrin
Last edited by dc_roenfanz : 04-05-2005 at 03:27 PM.
|

04-05-2005, 03:56 PM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
So my suggested method for dealing with this sortta thing is to give each MemberPage a dummy OnShow for each configuration.
OnShowV="all the resize and location stuff you want to happen to this MemberPage when layout is set to vertical"
OnShowH="all the resize and location stuff you want to happen to this MemberPage when layout is set to horizontal"
Now all your ConfigH button has to do is set MemberPage#.OnShow=MemberPage#.OnShowH for each member.
Do the same type thing for OnHides.
Maybe toss in...
MemberPage.Visible=! MemberPage.Visible=!
to double toggle visibility of each member and force the window to reconfig while grouped.
|

04-05-2005, 04:19 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Zonx
So my suggested method for dealing with this sortta thing is to give each MemberPage a dummy OnShow for each configuration.
OnShowV="all the resize and location stuff you want to happen to this MemberPage when layout is set to vertical"
OnShowH="all the resize and location stuff you want to happen to this MemberPage when layout is set to horizontal"
Now all your ConfigH button has to do is set MemberPage#.OnShow=MemberPage#.OnShowH for each member.
Do the same type thing for OnHides.
Maybe toss in...
MemberPage.Visible=! MemberPage.Visible=!
to double toggle visibility of each member and force the window to reconfig while grouped.
|
As an example then:
ToggleSizeButton.OnPress=parent.groupmember2.Onshow=groupmember2.OnShowH Onpress=Press2
ToggleSizeButton.Press1=parent.groupmember2.Onshow=groupmember2.OnShowH Onpress=Press2
ToggleSizeButton.Press2=parent.groupmember2.Onshow=groupmember2.OnShowV Onpress=Press1
-------------------------------------------
GroupMember2.OnShowV="parent.size=240,90" "shift postions code here"
GroupMember2.OnHideV="parent.size=240,45" "shift postions code here"
-----
GroupMember2.OnShowH="parent.size=480,45" "shift postions code here"
GroupMember2.OnHideH="parent.size=240,45" "shift postions code here"
-----------------
All I hafta do is figure out how to shift positions. Heh.
THanks, that helps alot.
Darrin
|

04-05-2005, 05:23 PM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
Yep. Might need some quotes in there, but that's the idea.
Add the following befor your OnPress=OnPress#
GroupMember#.Visible=! GroupMember#.Visible=!
Repeate it twice for each GroupMember
This flops the visibility of each group page twice. They'll end up with the same visability they started with, but what this does is trigger each page's OnShow and OnHide. Without this, your window wont get resized untill someone joins or leaves the group.
|

04-05-2005, 05:31 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Zonx
Yep. Might need some quotes in there, but that's the idea.
Add the following befor your OnPress=OnPress#
GroupMember#.Visible=! GroupMember#.Visible=!
Repeate it twice for each GroupMember
This flops the visibility of each group page twice. They'll end up with the same visability they started with, but what this does is trigger each page's OnShow and OnHide. Without this, your window wont get resized untill someone joins or leaves the group.
|
OK, Thanks a bunch.
*spends hours typing new code*
EDIT: For the actual window shift part, should I create like a dummy GroupMember page for the "true" pages to snap too? I think that would be easiest. Im gonna go study your inventory window. See if I can ge that to work.
EDIT2: LOL.... I created the dummy pages, THEN I found this wonderful nifty thing called "location". After looking at it some, I realized that the location of a window is dependant on its top left corner (unless you pack location to somewhere else???) Guess I answered my own question there.
Correct me if'n Im wrong though
EDIT3: Once I have every OnShowV (or H) value, do I need anything in the normal OnShow? or do I leave that blank?
D
Last edited by dc_roenfanz : 04-05-2005 at 05:55 PM.
|

04-05-2005, 08:11 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Drowning in text
Bah, I dunno, I think I broke it. I gotta go to school, so I'm just gonna paste the button code and hope someone helps me fix it. I had it *inside* the Group window frame, I dunno if that matters. I didnt type any *parents* would that be the problem? I am kinda stuck here?
Code:
<Button LocalTooltip="Click HERE to switch layouts!" Location="0,196" Name="ToggleDimensions" OnPress="groupmember2.onshow=onshowh groupmember3.onshow=onshowh groupmember4.onshow=onshowh groupmember5.onshow=onshowh groupmember2.onhide=onhideh groupmember3.onhide=onhideh groupmember4.onhide=onhideh groupmember5.onhide=onhideh groupmember2.visible=! groupmember2.visible=! groupmember3.visible=! groupmember3.visible=! groupmember4.visible=! groupmember4.visible=! groupmember5.visible=! groupmember5.visible=! onpress=press2" PackLocation="right,bottom" PackLocationProp="-280/0001,-014/0001" press1="groupmember2.onshow=onshowh groupmember3.onshow=onshowh groupmember4.onshow=onshowh groupmember5.onshow=onshowh groupmember2.onhide=onhideh groupmember3.onhide=onhideh groupmember4.onhide=onhideh groupmember5.onhide=onhideh groupmember2.visible=! groupmember2.visible=! groupmember3.visible=! groupmember3.visible=! groupmember4.visible=! groupmember4.visible=! groupmember5.visible=! groupmember5.visible=! onpress=press2" press2="groupmember2.onshow=onshowv groupmember3.onshow=onshowv groupmember4.onshow=onshowv groupmember5.onshow=onshowv groupmember2.onhide=onhidev groupmember3.onhide=onhidev groupmember4.onhide=onhidev groupmember5.onhide=onhidev groupmember2.visible=! groupmember2.visible=! groupmember3.visible=! groupmember3.visible=! groupmember4.visible=! groupmember4.visible=! groupmember5.visible=! groupmember5.visible=! onpress=press1 " ScrollExtent="15,15" Size="15,15" Style="/Ehlric.ButtonStyles.options_button" Tooltip="Click HERE to switch layouts!" UserMovable="true"></Button>
Or do you think that maybe my problems are with the group member pages???
Code:
<Page BackgroundColor="#00FF00" Location="3,44" Name="GroupMember2" OnHideH="parent.size=280,44 location=279,3 " OnHideV="parent.size=280,44 location=3,44" OnShow="onshowv" OnShowH="parent.size=555,44 location=279,3" OnShowV="parent.size=280,85 location=3,44" PackLocation="left,top" PackLocationProp="0003/0001,0044/0001" ScrollExtent="273,40" Size="273,40">
Last edited by dc_roenfanz : 04-05-2005 at 10:14 PM.
Reason: fixing code ( i think)
|

04-06-2005, 01:39 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Yeah. Many many many many many many problems with this dadgummed button. I've given up for now.
Don't suppost that anyone would care to help me do this would they?
EDIT: Okay so I haven't given up. That doesnt change anything, because I still cannot get this thing to work correctly.
Question: If setting an event for a daughter page, do I hafta state it? Example: Event=daughter.PageName.property=whatever ?? Or can I just say the same thing without daughter?
I've gone in and put quote around every subcommand or whatever you call it. Dunno what exactly I'm doing here. Zonx help was phenominal, but I still am not getting it correct. Assistance would be appreciated.
Last edited by dc_roenfanz : 04-07-2005 at 01:06 AM.
|

04-07-2005, 02:20 AM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
Proper quoting using your sample...
ToggleSizeButton.OnPress='parent.groupmember2.Onshow="groupmember2.OnShowH" Onpress=Press2'
Its a good idea to put returns between separate commands. If they're all on the same line they execute in right to left. Once you've got some text in a value field, double-clicking the property pops up a window that allows returns.
The base OnShow and On Hide should have values matching whtever the default switcher button does, so it does something the first time its pushed. If for instance the first press makes the window Vertical, dupe your OnShowV and OnHideV code.
No you don't need to state an object's name when manipulating its properties or a sub object. Say you're using a page's OnShow to resize the page and move its BackDrop. The OnShow value would look like this..
size='200,300'
BackDrop.location='2,2'
The page gets resized to 200 x 300
the BackDrop inside the page gets moved to 2,2
And no, I wouldn't use dummy pages for this. My Inventory window uses a dummy page to simulate shrinking down to the right, and to give users a way to quickly set it back to their favorite spot 
|

04-07-2005, 02:53 AM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Zonx
Proper quoting using your sample...
ToggleSizeButton.OnPress='parent.groupmember2.Onshow="groupmember2.OnShowH" Onpress=Press2'
Its a good idea to put returns between separate commands. If they're all on the same line they execute in right to left. Once you've got some text in a value field, double-clicking the property pops up a window that allows returns.
The base OnShow and On Hide should have values matching whtever the default switcher button does, so it does something the first time its pushed. If for instance the first press makes the window Vertical, dupe your OnShowV and OnHideV code.
No you don't need to state an object's name when manipulating its properties or a sub object. Say you're using a page's OnShow to resize the page and move its BackDrop. The OnShow value would look like this..
size='200,300'
BackDrop.location='2,2'
The page gets resized to 200 x 300
the BackDrop inside the page gets moved to 2,2
And no, I wouldn't use dummy pages for this. My Inventory window uses a dummy page to simulate shrinking down to the right, and to give users a way to quickly set it back to their favorite spot 
|
Thanks a ton. I might be able to get it working now. HAHA.
I dont need your STINKIN HELP! MWAHAHAHAAH (jk)
D
Last edited by dc_roenfanz : 04-07-2005 at 04:03 AM.
|

05-02-2005, 07:52 AM
|
 |
A Griffon
|
|
Join Date: Dec 2004
Server: Runnyeye
Posts: 1,404
|
|
I wonder if this is of any use to you I stumbled on this when I was having problems with the placement of inventory slots only working under there proper page names when I needed a mixture of the types on display at the same time so just hideing the pages was of no use...
Here is part of the code I am taling about :
Parent.GeneralPage.InvSlot1.Location=199,0 Parent.GeneralPage.InvSlot0.Location=166,0 Parent.ExpandUp.Visible=true Visible=false"
Parent.GeneralPage.InvSlot1.Location=67,0 Parent.GeneralPage.InvSlot0.Location=34,0 Parent.ExpandDn.Visible=true Visible=false
The rest of the onpress events just shows and hides the other inv, equipment slots..
Also what I found to be much better than "show window="???" show window="???" is this :
Say the window you want to load is in the root of "mainhud" and the window that loads it is also:
Parent.Parent.MyWindow.Visible=true
I dunno about the rest of you but this seems to work much better for me, Just thought I would share this, Many of you probably already know this but some may not 
__________________
Laffs UI Mods
I can only please one person per day. Today is not your day. Tomorrow doesn't look to good either !
(Wicann on Runnyeye)
|

05-02-2005, 02:16 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Laffs
I wonder if this is of any use to you I stumbled on this when I was having problems with the placement of inventory slots only working under there proper page names when I needed a mixture of the types on display at the same time so just hideing the pages was of no use...
Here is part of the code I am taling about :
Parent.GeneralPage.InvSlot1.Location=199,0 Parent.GeneralPage.InvSlot0.Location=166,0 Parent.ExpandUp.Visible=true Visible=false"
Parent.GeneralPage.InvSlot1.Location=67,0 Parent.GeneralPage.InvSlot0.Location=34,0 Parent.ExpandDn.Visible=true Visible=false
The rest of the onpress events just shows and hides the other inv, equipment slots..
Also what I found to be much better than "show window="???" show window="???" is this :
Say the window you want to load is in the root of "mainhud" and the window that loads it is also:
Parent.Parent.MyWindow.Visible=true
I dunno about the rest of you but this seems to work much better for me, Just thought I would share this, Many of you probably already know this but some may not 
|
Is there an example of this that I can look at in UI Builder? I'm not just getting what your saying for some reason ... I DID just wake up, so thats prolly it, still...
|

05-02-2005, 02:54 PM
|
 |
A Griffon
|
|
Join Date: Dec 2004
Server: Runnyeye
Posts: 1,404
|
|
Yups take a look at the update to THIS Its the mainhud / inventory you need to be looking at, That windon contains the active quest name as well as a few inv slots what changes is the location of slots 0,1 due to them needing to be displayed in both views but only working on there propper page.... I am crap at explaining stuff best just to have a look lol and you will see what I have done.....
The actual file that holds that code is eq2ui_mainhud_ammo.xml
__________________
Laffs UI Mods
I can only please one person per day. Today is not your day. Tomorrow doesn't look to good either !
(Wicann on Runnyeye)
|

05-02-2005, 04:04 PM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Laffs
Yups take a look at the update to THIS Its the mainhud / inventory you need to be looking at, That windon contains the active quest name as well as a few inv slots what changes is the location of slots 0,1 due to them needing to be displayed in both views but only working on there propper page.... I am crap at explaining stuff best just to have a look lol and you will see what I have done.....
The actual file that holds that code is eq2ui_mainhud_ammo.xml
|
wonderful, I actually already have that DL'd, I'm thinking of tweaking the frameset to match the ReVert stuffs I'm workin on.
|
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 07:42 PM.
|
 |