EQ2Interface.com
Search Downloads


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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Unread 01-05-2005, 12:28 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default Script troubles

Having a bit of trouble getting this script to work. I'm making a chat window where, if you hide the Titlebar, it will also hide the channel button and input bar, and stretch the chat display and scrollbar to cover up where they were. (And go back if you re-display the titlebar.)

I've got it working as expected when you show/hide the titlebar, but the problem is when you load the game.

The script (edited for clarity):
(Full, Normal, ScrollFull, and ScrollNormal are invisible elements that resize with the window.)
Code:
<Page Name="WC_Titlebar" 

OnHide="
parent.defaultChannelButton.visible=false 
parent.defaultChannelBkg.visible=false 
parent.ChatInput.visible=false 
parent.ChatDisplay.size=parent.Full.size 
parent.ChatScroll.size=parent.ScrollFull.size" 

OnShow="
parent.defaultChannelButton.visible=true 
parent.defaultChannelBkg.visible=true 
parent.ChatInput.visible=true 
parent.ChatDisplay.size=parent.Normal.size 
parent.ChatScroll.size=parent.ScrollNormal.size" 

visible="true"/>
Load the mod, set all the windows how you want them, log out.

When you log back in:
If WC_Titlebar.visible="true", then all the windows with the titlebar showing have the chat bar, as expected. But the ones with the titlebar hidden have the chat bar hidden, but the chatdisplay and scrollbar are set to the size in the XML file, instead of stretching to the size of the window.

If WC.Titlebar.visible="false", then regardless of a window's titlebar setting, the input bar is hidden, but the chat display and scrollbar are stretched to the window size how they are supposed to be.

So basically:
Visible=false: OnHide executes on ALL chat windows whether they're supposed to or not, but it fits the elements to the window correctly.
Visible=true: OnHide executed only when it's supposed to, but doesn't fit the elements to the size of the window like it's supposed to.


Attaching the file here, feel free to mess with it. I've tried moving the commands around and having the thing automatically show or hide itself on load, but still can't get it to work correctly on log-in.

Hopefully someone else here can see a way that I've overlooked.
Attached Files
File Type: zip eq2ui_mainhud_mainchat.zip (1.3 KB, 529 views)
__________________
If it ain't broke, it needs more features!
Reply With Quote
 



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 10:15 PM.


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