 |

05-21-2005, 12:10 AM
|
 |
A Griffon
|
|
Join Date: Jul 2004
Server: Nagafen
Posts: 339
|
|
Please help on a button question
I created a new button style and its not working. All I get is a black square where the graphic should be.
I basically copied the code for the find button from the group window and then just altered the name and images.
Code:
<?xml version="1.0" encoding="utf-8"?>
<Page Name="vert_styles" ScrollExtent="320,240" Size="320,240" Visible="false">
<Namespace Name="kbookprev">
<ImageStyle Filter="true" Name="p_button_normal">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,4,83,21"/>
</ImageStyle>
<ImageStyle Filter="true" Name="p_button_pressed">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,43,83,60"/>
</ImageStyle>
<ImageStyle Filter="true" Name="p_button_rollover">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,23,83,40"/>
</ImageStyle>
<RectangleStyle Center="minimize_button_normal" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_normal"/>
<RectangleStyle Center="minimize_button_pressed" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_pressed"/>
<RectangleStyle Center="minimize_button_rollover" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_rollover"/>
<RectangleStyle Center="minimize_button_normal" CenterShrinkH="true" CenterShrinkV="true" Color="#808080" Name="p_but_disabled"/>
</Namespace>
<ButtonStyle Name="KB_prev" RStyleDefault="kbookprev.p_but_normal" RStyleMouseOver="kbookprev.p_but_rollover" RStyleMouseOverActivated="kbookprev.p_but_pressed" RStyleMouseOverSelected="kbookprev.p_but_rollover"/>
</Page>
any help woudl be nice.
__________________

|

05-21-2005, 12:50 AM
|
 |
A Griffon
|
|
Join Date: Jul 2004
Server: Nagafen
Posts: 339
|
|
I have also tried changing the close button, but its not working either, for some reason the graphics dont change, when I change the style.
__________________

|

05-21-2005, 01:36 AM
|
|
Bellum Aeternus
|
|
Join Date: Dec 2004
Server: Unkown
Posts: 165
|
|
Your RectangleStyles don't reference your ImageStyles.
|

05-21-2005, 03:17 AM
|
 |
A Griffon
|
|
Join Date: Jul 2004
Server: Nagafen
Posts: 339
|
|
the odd thing is, I actually just copied the code from the default close button code.
__________________

|

05-21-2005, 03:34 AM
|
 |
A Griffon
|
|
Join Date: Mar 2005
Server: Unkown
Posts: 588
|
|
Quote:
|
Originally Posted by Findarato
the odd thing is, I actually just copied the code from the default close button code.
|
Hirebrand is right.
the "Center" needs to reference to the corresponding ImageStyle
Since you changed the names of the ImageStyle, you hafta go in and change the names of the reference in the corresponding RectangleStyles. Basically just replace the minimize_* with p_*
(I believe) it should look like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<Page Name="vert_styles" ScrollExtent="320,240" Size="320,240" Visible="false">
<Namespace Name="kbookprev">
<ImageStyle Filter="true" Name="p_button_normal">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,4,83,21"/>
</ImageStyle>
<ImageStyle Filter="true" Name="p_button_pressed">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,43,83,60"/>
</ImageStyle>
<ImageStyle Filter="true" Name="p_button_rollover">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,23,83,40"/>
</ImageStyle>
<RectangleStyle Center="p_button_normal" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_normal"/>
<RectangleStyle Center="p_button_pressed" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_pressed"/>
<RectangleStyle Center="p_button_rollover" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_rollover"/>
<RectangleStyle Center="p_button_normal" CenterShrinkH="true" CenterShrinkV="true" Color="#808080" Name="p_but_disabled"/>
</Namespace>
<ButtonStyle Name="KB_prev" RStyleDefault="kbookprev.p_but_normal" RStyleMouseOver="kbookprev.p_but_rollover" RStyleMouseOverActivated="kbookprev.p_but_pressed" RStyleMouseOverSelected="kbookprev.p_but_rollover"/>
</Page>
And thats not odd at all. You changed the names of everything, but because you changed the names, the references were no longer valid.
fixed typo in code tag
__________________
Last edited by Deathbane27 : 05-21-2005 at 04:24 AM.
|

05-21-2005, 04:27 AM
|
 |
A Griffon
|
|
Join Date: Jul 2004
Server: Nagafen
Posts: 339
|
|
ok, made the changes,
here is the resulting code.
Code:
<?xml version="1.0" encoding="utf-8"?>
<Page Name="vert_styles" ScrollExtent="320,240" Size="320,240" Visible="false">
<ButtonStyle DisabledTextStyle="/Fonts.FontArial14" MouseOverSound="ui_mouseover" MouseOverTextColor="#FFFF00" MouseOverTextStyle="/Fonts.FontArial14" Name="close_button" NormalTextColor="#E0E0E0" NormalTextStyle="/Fonts.FontArial14" PressedTextStyle="/Fonts.FontArial14" PressSound="ui_pressed" ReleaseSound="ui_released" RStyleActivated="/ButtonStyles.CloseButton.close_but_pressed" RStyleDefault="/ButtonStyles.CloseButton.close_but_normal" RStyleDisabled="/ButtonStyles.CloseButton.close_but_disabled" RStyleMouseOver="/ButtonStyles.CloseButton.close_but_rollover" SelectedTextStyle="/Fonts.FontArial14"/>
<Namespace Name="CloseButton">
<RectangleStyle Center="close_button_normal" CenterShrinkH="true" CenterShrinkV="true" Name="close_but_normal"/>
<RectangleStyle Center="close_button_pressed" CenterShrinkH="true" CenterShrinkV="true" Name="close_but_pressed"/>
<RectangleStyle Center="close_button_rollover" CenterShrinkH="true" CenterShrinkV="true" Name="close_but_rollover"/>
<RectangleStyle Center="close_button_normal" CenterShrinkH="true" CenterShrinkV="true" Color="#808080" Name="close_but_disabled"/>
<ImageStyle Filter="true" Name="close_button_normal">
<ImageFrame Name="image" Source="images/spellbook02.tga" SourceRect="5,153,43,167"/>
</ImageStyle>
<ImageStyle Filter="true" Name="close_button_pressed">
<ImageFrame Name="image" Source="images/spellbook02.tga" SourceRect="5,186,43,200"/>
</ImageStyle>
<ImageStyle Filter="true" Name="close_button_rollover">
<ImageFrame Name="image" Source="images/spellbook02.tga" SourceRect="5,169,43,183"/>
</ImageStyle>
</Namespace>
<Namespace Name="kbookprev">
<ImageStyle Filter="true" Name="p_but_normal">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,4,83,21"/>
</ImageStyle>
<ImageStyle Filter="true" Name="p_but_pressed">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,43,83,60"/>
</ImageStyle>
<ImageStyle Filter="true" Name="p_but_rollover">
<ImageFrame Name="image" Source="images/solspellbook02.tga" SourceRect="3,23,83,40"/>
</ImageStyle>
<RectangleStyle Center="p_but_normal" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_normal"/>
<RectangleStyle Center="p_but_pressed" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_pressed"/>
<RectangleStyle Center="p_but_rollover" CenterShrinkH="true" CenterShrinkV="true" Name="p_but_rollover"/>
<RectangleStyle Center="p_but_normal" CenterShrinkH="true" CenterShrinkV="true" Color="#808080" Name="p_but_disabled"/>
</Namespace>
<ButtonStyle Name="KB_prev" RStyleDefault="kbookprev.p_but_normal" RStyleMouseOver="kbookprev.p_but_rollover" RStyleMouseOverActivated="kbookprev.p_but_pressed" RStyleMouseOverSelected="kbookprev.p_but_rollover"/>
</Page>
Thanks for all the help. I just keep getting a black box [img]/images/eq2layout/smilies/frown.gif[/img]
__________________

Last edited by Findarato : 05-21-2005 at 04:30 AM.
|

05-21-2005, 04:33 AM
|
 |
A Griffon
|
|
Join Date: Jul 2004
Server: Nagafen
Posts: 339
|
|
LOL
I figured it out, thanks a ton for the help
__________________

|
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
|
|
|
All times are GMT -5. The time now is 06:55 AM.
|
 |