Home Forum Downloads My Favorites Register FAQ Mark Forums Read

Go Back   EQInterface Forums > Developer Discussion > XML modification help.
User Name
Password

Reply
 
Thread Tools Display Modes
Old 10-26-2013, 08:49 PM   #1
Roochie
A Ghoul
 
Join Date: Oct 2013
Posts: 10
Default Buttons that can open/close pages

Hello, im attempting my first ui and i came across a probelm with tabs that im trying to figure out. I need to have a button that can open/close pages. TabIcon simply wont work for what i have in mind. I've been reading/writing code all day so i may have missed something, but im not sure i understand how tabs work.

For all the other elements, i've been able to figure out stuff when i need to. the code is relatively simply. but when it comes to tabs/pages i cant even figure out how to turn off the background. when i put <Style_Border>false</Style_Border> it crashes. also in SIDL.xml, when it defines the 'page' element, it has a <TabText> and <TabTextColor>, yet when i try to use these, the game crashes.

All that to say, im not really sure i understand them correctly. But if i could just learn how to make these buttons then i'll be set.

Another thing that i dont really understand is how to set a button's action. can you even do that?
Roochie is offline   Reply With Quote
Old 10-26-2013, 09:48 PM   #2
Chakarum
A Shissar Disciple
 
Join Date: Nov 2002
Posts: 133
Interface Author - Click to view interfaces
Default

TabText and TabTextColor, if I remember correctly, are only used when creating a DrawTemplate. If you are trying to change the text that appears on a tab, just use the Text element.

Button actions are entirely dependent upon their assigned EQType unless if a window-specific button, in which case it depends on its ScreenID.

If you check out my version of Thangor's Inventory, I actually created a DrawTemplate to remove the borders and text, and different DrawTemplates for each tab to use icons.
Chakarum is offline   Reply With Quote
Old 10-28-2013, 12:36 AM   #3
Roochie
A Ghoul
 
Join Date: Oct 2013
Posts: 10
Default

Quote:
Originally Posted by Chakarum
TabText and TabTextColor, if I remember correctly, are only used when creating a DrawTemplate. If you are trying to change the text that appears on a tab, just use the Text element.

Button actions are entirely dependent upon their assigned EQType unless if a window-specific button, in which case it depends on its ScreenID.

If you check out my version of Thangor's Inventory, I actually created a DrawTemplate to remove the borders and text, and different DrawTemplates for each tab to use icons.


interesting, could you give just a simply 3 or so lines of code to show the draw template with no border?

Also, im having a super hard time understanding how to set the location of the main chat window.

when i say <Location>
<x>0</x>
<y>0</y>
</Location>

the chat appears on the top-left of the screen as one would expect. however when i say
<x>1</x>
<y>0</y>

the chat appears pushed into the top-right corner of the window. any x-coordinate above 1 does the same thing as 1. what the heck are units in for the main window? im so confused. i need to position it in the center of the screen and at the bottom.


my chat window is 640 x 256, and my resolution is 1024 x 768, so what i thought would be the right location was:
<x>192</x>
<y>512</y>

but again, the only differences i see is when i switch from 0 to 1 in the x or y coordinate. can anyone please explain to me how to position it correctly?

also forgot to mention, there are some values that make the game crash.
like
<x>2</x>
<y>280</y>
Roochie is offline   Reply With Quote
Old 10-28-2013, 01:11 AM   #4
firescue17
Premium Member
 
firescue17's Avatar
 
Join Date: Apr 2006
Server: Vox
Posts: 126
Interface Author - Click to view interfaces
Default

<TabText>Text</TabText> is the Label you see on a tab. It only applies to <Page items>.

<TabTextActiveColor>R, G, B</TabTextActiveColor> is the Text color when the Tab is active (selected). It only applies to <Page items>.

<TabTextColor>R, G, B</TabTextColor> is the Text color when the Tab is inactive (not selected). It only applies to <Page items>.

Quote:
Originally Posted by Roochie
interesting, could you give just a simply 3 or so lines of code to show the draw template with no border?
If you want a TabBox without a visible border, you will need to declare a complete PageBorderTemplate and a complete TabBorderTemplate using a FrameTemplate consisting of transparent Ui2DAnimation images sized to 0, 0. If one omits any portion of a TabBox template the game will crash either immediately or when trying to Select a different Tab.
__________________

firescue17 is offline   Reply With Quote
Old 10-28-2013, 01:54 AM   #5
Roochie
A Ghoul
 
Join Date: Oct 2013
Posts: 10
Default

Quote:
Originally Posted by firescue17
<TabText>Text</TabText> is the Label you see on a tab. It only applies to <Page items>.

<TabTextActiveColor>R, G, B</TabTextActiveColor> is the Text color when the Tab is active (selected). It only applies to <Page items>.

<TabTextColor>R, G, B</TabTextColor> is the Text color when the Tab is inactive (not selected). It only applies to <Page items>.

If you want a TabBox without a visible border, you will need to declare a complete PageBorderTemplate and a complete TabBorderTemplate using a FrameTemplate consisting of transparent Ui2DAnimation images sized to 0, 0. If one omits any portion of a TabBox template the game will crash either immediately or when trying to Select a different Tab.


ok kool, thank you

any ideas on the location of the main chat window? (see previous response)
Roochie is offline   Reply With Quote
Old 10-28-2013, 09:02 AM   #6
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 204
Interface Author - Click to view interfaces
Default

There are 2 tags that affect <Location>. They are <RelativePosition>true/false</RelativePosition> and <AutoStretch>true/false</AutoStretch>.

When setting relative position, the positioning elements you define will either be relative to their container (true) or relative to your EQ window (false). Just a side note, setting relative positioning to false on elements within a window seems kinda pointless to me. They are locked into position irregardless of the position of the window they are associated with.

When setting autostretch, the positioning elements change depending on the value of autostretch. When autostretch is false, the <Location> and <Size> tags are evaluated and the element is rendered based on those values. If autostretch is set to true, then the following tags are used:

<TopAnchorToTop>true/false</TopAnchorToTop>
<BottomAnchorToTop>true/false</BottomAnchorToTop>
<LeftAnchorToLeft>true/false</LeftAnchorToLeft>
<RightAnchorToLeft>true/false</RightAnchorToLeft>
<TopAnchorOffset>#</TopAnchorOffset>
<BottomAnchorOffset>#</BottomAnchorOffset>
<LeftAnchorOffset>#</LeftAnchorOffset>
<RightAnchorOffset>#</RightAnchorOffset>

When autostretch is true, the Location and Size tags are ignored. When it is false, the offset tags are ignored.

That being said, using those elements in the <Screen> tag of a window may have unpredictable results. That is because positioning of a window is set by the .ini for each character. So, setting relative positioning to false may cause wierdness. Honestly, I would avoid trying to position a window within the xml. I am not sure if that is your issue. I am guessing that is what you are trying to do.

One last note, true and false are case sensative. "True" is interpreted as false. Only "true" is interpreted as true. That always gets me because I sometimes will use SIDLWIDL to modify elements and it saves all trues with a capital T. Annoying really...

Last edited by valaury3169 : 10-28-2013 at 11:42 AM. Reason: Corrected spelling on 'saves'
valaury3169 is offline   Reply With Quote
Old 10-28-2013, 09:09 AM   #7
firescue17
Premium Member
 
firescue17's Avatar
 
Join Date: Apr 2006
Server: Vox
Posts: 126
Interface Author - Click to view interfaces
Default

Quote:
Originally Posted by valaury3169
I would avoid trying to position a window within the xml.
I second this.
firescue17 is offline   Reply With Quote
Old 10-28-2013, 10:44 PM   #8
Roochie
A Ghoul
 
Join Date: Oct 2013
Posts: 10
Default

Quote:
Originally Posted by valaury3169
If autostretch is set to true, then the following tags are used:

<TopAnchorToTop>true/false</TopAnchorToTop>
<BottomAnchorToTop>true/false</BottomAnchorToTop>
<LeftAnchorToLeft>true/false</LeftAnchorToLeft>
<RightAnchorToLeft>true/false</RightAnchorToLeft>
<TopAnchorOffset>#</TopAnchorOffset>
<BottomAnchorOffset>#</BottomAnchorOffset>
<LeftAnchorOffset>#</LeftAnchorOffset>
<RightAnchorOffset>#</RightAnchorOffset>

When autostretch is true, the Location and Size tags are ignored.

Honestly, I would avoid trying to position a window within the xml. I am not sure if that is your issue. I am guessing that is what you are trying to do.

Im trying both. setting the position for the main chat in both the deafults.ini and xml. it ignores both. when i try setting it in just the defaults.ini, and deleting the <location> tags that position the window in xml, it simply puts the window at 0, 0.

the main chat window doesnt have the <AutoStretch> tag available.

i am in 1024 x 768. so in the defaults.ini i've only set the position and width of the chat in that resolution. what am i missing?

Last edited by Roochie : 10-28-2013 at 10:57 PM.
Roochie is offline   Reply With Quote
Old 10-28-2013, 11:46 PM   #9
firescue17
Premium Member
 
firescue17's Avatar
 
Join Date: Apr 2006
Server: Vox
Posts: 126
Interface Author - Click to view interfaces
Default

I've never heard of a defaults.ini.
firescue17 is offline   Reply With Quote
Old 10-29-2013, 12:19 AM   #10
Roochie
A Ghoul
 
Join Date: Oct 2013
Posts: 10
Default

Quote:
Originally Posted by firescue17
I've never heard of a defaults.ini.

defaults.ini is in every ui folder. it contains a bunch of locations and sizes for the ui's windows. aren't you supposed to set the locations in default.ini? if im not setting them in xml, then what else is their besides default.ini to set them in?
Roochie is offline   Reply With Quote
Old 10-29-2013, 01:40 AM   #11
firescue17
Premium Member
 
firescue17's Avatar
 
Join Date: Apr 2006
Server: Vox
Posts: 126
Interface Author - Click to view interfaces
Default

I found the file doing a directory search. I believe that file has to do with portions of the default UI which have a "Reset to Default" option.

Whatever it is, it's not used for what you're attempting to do. The files you should be concerned with are the UI_<character>_<server>.ini or the individual EQUI_<window>.xml files. Furthermore, all files needed to mod a UI are in the "uifiles" directory folder. Anything outside of that folder is going to be patched and over-written every time the average user runs EQ.

Last edited by firescue17 : 10-29-2013 at 01:49 AM.
firescue17 is offline   Reply With Quote
Old 10-29-2013, 11:34 AM   #12
Roochie
A Ghoul
 
Join Date: Oct 2013
Posts: 10
Default

Quote:
Originally Posted by firescue17
Quote:
Originally Posted by valaury3169
Honestly, I would avoid trying to position a window within the xml
I second this.


ok, well the ui_<charactername>_<server>.ini is outside of the ui folder. thus it would be useless to edit it cause when other people download it they wont have the same ui_<charactername>_<server>.ini. and earlier you said not to position anything within xml. but then you said to use the window.xml files to position it. contradictory? quite so! lol

so should i position them in the EQUI_<window>.xml or not? and if not which file do i position them in? Also, Turlo said is should set all the positions in INI in my other question that you answered. i assumed he mean the only ini in the folder. defaults.ini
Roochie is offline   Reply With Quote
Old 10-29-2013, 02:23 PM   #13
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 204
Interface Author - Click to view interfaces
Default

When you position a window inside the game, the size and position are stored automatically in the ui_<charactername>_<server>.ini file. Modifying that file manually is an exercide in futility as it will get overwritten if someone moves a window. When you customize the xml pieces for your UI, you should focus on how they look, then log in to the game and position them like you want. Some UIs have pieces that 'interlock', and some pieces are independent and can be positioned however the user wants, and may not necesarily be the way you intended. When you release your UI (Assuming you intend to share it) then giving them a screenshot will allow them to position everything the same as you intended. Another option (trick, if you will) is to include your ui_<charactername>_<server>.ini file, and have the user rename it to their character name so that it will already be positioned as you intended. Trying to 'program' positioning is not very reliable.

Just a note, anything in the default directory will always get replaced when you patch, so changing anything in that folder won't do any good. Any file that you want to edit, make a copy into your custom UI folder and then modify it. Don't put any file in your UI folder that you don't modify. EQ automatically loads it from default if it is not found in your custom UI folder.
valaury3169 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 05:25 AM.


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