Home Forum Downloads My Favorites Register FAQ Mark Forums Read

Go Back   EQInterface Forums > Developer Discussion > General authoring help / discussion
User Name
Password

Reply
 
Thread Tools Display Modes
Old 05-23-2013, 05:06 PM   #1
Sparxx
Featured Artist
 
Join Date: Aug 2002
Posts: 176
Featured Artist
Default New Windows

(warriorofmight was right) We inadverently derailed Danille's thread so I started this one to continue the discusson on creating new windows.

I have several "new" windows in my UI. You need to add code to the EQUI_TopLevelScreens.xml, and add to the window you have the button in.

Here is an example of my EQ button window. I added a new Sparxx button that when clicked will open a small "new" window that contains my UI contact and version information.







EQUI_EQMainWnd.xml

(Code I added to the window)
Code:
(Top) <Label item="EQM_SparxxUI_Yahoo_Label"> <ScreenID>EQM_SparxxUI_Yahoo_Label</ScreenID> <Font>3</Font> <Text>Yahoo IM: SparxxInterface</Text> <TextColor> <R>0</R> <G>255</G> <B>255</B> </TextColor> <Size> <CX>204</CX> <CY>15</CY> </Size> <Location> <X>5</X> <Y>93</Y> </Location> </Label> <Label item="EQM_SparxxUI_Google_Label"> <ScreenID>EQM_SparxxUI_Google_Label</ScreenID> <Font>3</Font> <Text>Google Talk: [email protected]</Text> <TextColor> <R>0</R> <G>255</G> <B>255</B> </TextColor> <Size> <CX>210</CX> <CY>15</CY> </Size> <Location> <X>5</X> <Y>78</Y> </Location> </Label> <Label item="EQM_SparxxUI_ICQ_Label"> <ScreenID>EQM_SparxxUI_ICQ_Label</ScreenID> <Font>3</Font> <Text>ICQ IM: 1555222</Text> <TextColor> <R>0</R> <G>255</G> <B>255</B> </TextColor> <Size> <CX>206</CX> <CY>15</CY> </Size> <Location> <X>5</X> <Y>63</Y> </Location> </Label> <Label item="EQM_SparxxUI_FB_Label"> <ScreenID>EQM_SparxxUI_FB_Label</ScreenID> <Font>3</Font> <Text>WWW.Facebook.Com/SparxxInterface</Text> <TextColor> <R>0</R> <G>255</G> <B>255</B> </TextColor> <Size> <CX>217</CX> <CY>15</CY> </Size> <Location> <X>5</X> <Y>48</Y> </Location> </Label> <Label item="EQM_SparxxUI_vLabel"> <ScreenID>EQM_SparxxUI_vLabel</ScreenID> <Font>3</Font> <Text>Version 14.4</Text> <TextColor> <R>255</R> <G>255</G> <B>0</B> </TextColor> <Size> <CX>218</CX> <CY>16</CY> </Size> <AlignCenter>true</AlignCenter> <Location> <X>1</X> <Y>26</Y> </Location> </Label> <Label item="EQM_SparxxUI_Label"> <ScreenID>EQM_SparxxUI_Label</ScreenID> <Font>6</Font> <Text>SparxxUI</Text> <TextColor> <R>255</R> <G>255</G> <B>0</B> </TextColor> <Size> <CX>218</CX> <CY>27</CY> </Size> <AlignCenter>true</AlignCenter> <Location> <X>1</X> <Y>1</Y> </Location> </Label> (Button) <Button item="EQW_Sparxx_Button"> <EQType>openwnd EQUI_SparxxUI</EQType> <RelativePosition>true</RelativePosition> <Location> <X>0</X> <Y>38</Y> </Location> <Size> <CX>38</CX> <CY>14</CY> </Size> <Style_VScroll>false</Style_VScroll> <Style_HScroll>false</Style_HScroll> <Style_Transparent>false</Style_Transparent> <Style_Checkbox>true</Style_Checkbox> <Text>Sparxx</Text> <TextColor> <R>0</R> <G>255</G> <B>0</B> </TextColor> <ButtonDrawTemplate> <Normal>A_BigBtnNormal</Normal> <Pressed>A_BigBtnPressed</Pressed> <Flyby>A_BigBtnFlyby</Flyby> <Disabled>A_BigBtnDisabled</Disabled> <PressedFlyby>A_BigBtnPressedFlyby</PressedFlyby> </ButtonDrawTemplate> <Font>2</Font> <TooltipReference>Opens the SparxxUI Version popup window.</TooltipReference> </Button> (Bottom) <Screen item="EQUI_SparxxUI"> <RelativePosition>true</RelativePosition> <EQType>closenotclicked</EQType> <Location> <X>600</X> <Y>600</Y> </Location> <Size> <CX>230</CX> <CY>120</CY> </Size> <Style_VScroll>false</Style_VScroll> <Style_HScroll>false</Style_HScroll> <Style_Transparent>false</Style_Transparent> <Text>Sparxx Version Info Popup Window</Text> <DrawTemplate>WDT_RoundedNoTitle</DrawTemplate> <Style_Titlebar>false</Style_Titlebar> <Style_Closebox>false</Style_Closebox> <Style_Minimizebox>false</Style_Minimizebox> <Style_Border>true</Style_Border> <Style_Sizable>false</Style_Sizable> <Font>2</Font> <Pieces>EQM_SparxxUI_Label</Pieces> <Pieces>EQM_SparxxUI_vLabel</Pieces> <Pieces>EQM_SparxxUI_FB_Label</Pieces> <Pieces>EQM_SparxxUI_ICQ_Label</Pieces> <Pieces>EQM_SparxxUI_Google_Label</Pieces> <Pieces>EQM_SparxxUI_Yahoo_Label</Pieces> </Screen>

EQUI_TopLevelScreens.xml

(Code I added to the window)
Code:
<Screens> <ScreenName>EQUI_SparxxUI</ScreenName> <InitialSettings>allbutvis_and_firstvis</InitialSettings> </Screens>
Sparxx is offline   Reply With Quote
Old 05-24-2013, 06:07 AM   #2
warriorofmight
Enhanced Imperial Golem
 
Join Date: Aug 2004
Posts: 231
Interface Author - Click to view interfaces
Default

Excellent. I see where I was going wrong and I will be playing around with this very soon.

Thanks Sparxx!
__________________

Oink! Reborn
warriorofmight is offline   Reply With Quote
Old 05-24-2013, 11:23 AM   #3
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 204
Interface Author - Click to view interfaces
Default

I apologize as well to Danille. I wasn't thinking about the specific purpose of the other thread.

2 things:

First, I played around with my custom buttons to determine the specific behaviour.

If your button is a the top left of the screen (which would imply that whatever window you are opening has plenty of room):
  1. The top left corner of the window will align with the top left corner of the button (I had incorrectly assumed it used the click x,y).

If your button is at the bottom of the screen:
  1. There is not enough room below the button to view the whole window, but there is enough room above it to view the entire window, then it will align the bottom left corner of the window to the bottom left corner of the button.
  2. If there is not enough room above the button to show the entire window, it will align the top edge of the window with the top edge of the screen and align the left edge of the window with the left edge of the button.

There doesn't seem to be any check for left and right, but it will always follow the above rules for up and down. So, if your button is on the right side of the screen, the left edges will align (and be mostly off the right side of the screen), and the vertical positioning will follow the rules.

It would be nice if you could actually control the positioning of the new window, and not just predict the postioning.

Second, I have a couple of questions for Sparxx about new windows. First, I am assuming that not only can you put basic elements (lables, etc), but you can also put dynamic items like gauges and stuff (EQType that is not locked to a specific window)? Also, just to be sure, your code example is snipped, as in you still need the basic tags (<xml>, etc) correct?
valaury3169 is offline   Reply With Quote
Old 05-24-2013, 12:29 PM   #4
Sparxx
Featured Artist
 
Join Date: Aug 2002
Posts: 176
Featured Artist
Smile

Quote:
Originally Posted by valaury3169
Second, I have a couple of questions for Sparxx about new windows. First, I am assuming that not only can you put basic elements (lables, etc), but you can also put dynamic items like gauges and stuff (EQType that is not locked to a specific window)? Also, just to be sure, your code example is snipped, as in you still need the basic tags (<xml>, etc) correct?


You can have any element inside the new window (ie: anything that has an EQType that is not proprietary to a certain window).

Yes, the code examples above are snipped from the respective XML files indicated.

Sparxx is offline   Reply With Quote
Reply



Thread Tools
Display Modes

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


All times are GMT -5. The time now is 04:13 AM.


vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI