EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 04-05-2005, 03:18 PM
dc_roenfanz's Avatar
dc_roenfanz dc_roenfanz is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Unkown
Posts: 588
Default 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.
Reply With Quote
  #2  
Unread 04-05-2005, 03:56 PM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

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.
Reply With Quote
  #3  
Unread 04-05-2005, 04:19 PM
dc_roenfanz's Avatar
dc_roenfanz dc_roenfanz is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Unkown
Posts: 588
Default

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
Reply With Quote
  #4  
Unread 04-05-2005, 05:23 PM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

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.
Reply With Quote
  #5  
Unread 04-05-2005, 05:31 PM
dc_roenfanz's Avatar
dc_roenfanz dc_roenfanz is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Unkown
Posts: 588
Default

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.
Reply With Quote
  #6  
Unread 04-05-2005, 08:11 PM
dc_roenfanz's Avatar
dc_roenfanz dc_roenfanz is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Unkown
Posts: 588
Default 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)
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 01:35 PM.


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