EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Please help on a button question (https://www.eq2interface.com/forums/showthread.php?t=3025)

Findarato 05-21-2005 12:10 AM

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.

Findarato 05-21-2005 12:50 AM

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.

hirebrand 05-21-2005 01:36 AM

Your RectangleStyles don't reference your ImageStyles.

Findarato 05-21-2005 03:17 AM

the odd thing is, I actually just copied the code from the default close button code.

dc_roenfanz 05-21-2005 03:34 AM

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

Findarato 05-21-2005 04:27 AM

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]

Findarato 05-21-2005 04:33 AM

LOL

I figured it out, thanks a ton for the help


All times are GMT -5. The time now is 05:42 PM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI