10-26-2013, 08:49 PM
|
#1
|
A Ghoul
Join Date: Oct 2013
Posts: 10
|
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?
|
|
|
10-26-2013, 09:48 PM
|
#2
|
A Shissar Disciple
Join Date: Nov 2002
Posts: 133
|
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.
|
|
|
10-28-2013, 12:36 AM
|
#3
|
A Ghoul
Join Date: Oct 2013
Posts: 10
|
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>
|
|
|
10-28-2013, 01:11 AM
|
#4
|
Premium Member
Join Date: Apr 2006
Server: Vox
Posts: 126
|
<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.
|
|
|
10-28-2013, 01:54 AM
|
#5
|
A Ghoul
Join Date: Oct 2013
Posts: 10
|
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)
|
|
|
10-28-2013, 09:02 AM
|
#6
|
Enhanced Imperial Golem
Join Date: Jun 2008
Posts: 204
|
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'
|
|
|
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
|
|
|
|