EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-25-2006, 05:46 PM
xriscarter xriscarter is offline
A Darkpaw Brute
Interface Author - Click to view interfaces
 
Join Date: Apr 2006
Server: Blackburrow
Posts: 40
Default xml "style" qustion

OK i editted this whole topic to make it easyer to understand, plus to add pictures of the problem...


You can see where I am trying to add in a button, but it is just a black box.




I am using in the "window_elements_generic.dds" to get the image from.




That is where I am pulling the image from....




I think that this is what is giving me the problem, but I do not know what I should type into the style area to fix it. Anyone have any ideas?

Last edited by xriscarter : 06-26-2006 at 04:13 PM.
Reply With Quote
  #2  
Unread 06-27-2006, 07:06 AM
xriscarter xriscarter is offline
A Darkpaw Brute
Interface Author - Click to view interfaces
 
Join Date: Apr 2006
Server: Blackburrow
Posts: 40
Default

Sorry but bump....

Well I got all my new buttons coded now, now if i could just get them all to not be a black box.
Reply With Quote
  #3  
Unread 06-27-2006, 09:35 AM
Savie Savie is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 229
Default

Is that a default button that has been reskinned?

Im very new to modding myself, and know almost nothing about the image files and editing them. That being said, have you checked the image name to insure you have it spelled correctly? Caps tend to matter for the most part.

Perhaps if you posted the xml and the image, you may get better help on this.

Hope this helps some.

Edit: Also, you may check to see that you've put the image in the right folder, I've done that in the past trying to hurry thru something lol.
__________________
~ Savie
92 Warden, Nagafen.
Reply With Quote
  #4  
Unread 06-27-2006, 10:13 AM
xriscarter xriscarter is offline
A Darkpaw Brute
Interface Author - Click to view interfaces
 
Join Date: Apr 2006
Server: Blackburrow
Posts: 40
Default

No that is an all new button that I have made, I did not copy and paste anything.


I did not edit any image file....dds. Yes the image file is correct as you can see in the pics above.

What xml file you think I should upload? There are like 6 that I have made changes to just to get a button to work.


I am using the default image file so I did not have to move anything it just looks up the image file in "ui/default/image"
Reply With Quote
  #5  
Unread 06-27-2006, 10:18 AM
Savie Savie is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 229
Default

Any xml file that you are trying to use this image with would work, the smaller, the better though probably, easier to find the code that way.

If you didn't edit an existing image from the default UI, then the problem may be that you're using the "window_elements_generic.dds" since thats the name of a default image files, then again like I said, I'm new to this so that may not even matter.

If you want to upload both of those, I can take a look see if I can find anything that may cause it not to work.

Also.. have you checked the opaquity on that button?
__________________
~ Savie
92 Warden, Nagafen.
Reply With Quote
  #6  
Unread 06-27-2006, 10:57 AM
xriscarter xriscarter is offline
A Darkpaw Brute
Interface Author - Click to view interfaces
 
Join Date: Apr 2006
Server: Blackburrow
Posts: 40
Default

Ok i think that is all that you will need if you need anyother file just let me know....


yeah the opaquity is 1.000
Attached Files
File Type: xml eq2ui_ButtonStyles.xml (57.5 KB, 245 views)
File Type: xml eq2ui_inventory_inventory.xml (21.6 KB, 248 views)
File Type: dds window_elements_generic.dds (256.1 KB, 229 views)
Reply With Quote
  #7  
Unread 06-27-2006, 11:10 AM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

Takes a bit of getting used to but here's the deal with styles.

In most cases Object.Style only accepts a pointer to a corisponding Style object or can be left blank. So for a Button, it must be a path to an object of type ButtonStyle or it can be left blank. You can't give Object.Style a pointer to an ImageFrame.

Object.RStyleDefault and the RStyle... variations accept pointers to RectangleStyles. Each of the various RStyles corrispond to the various button states and override any enherited from a ButtonStyle reference. So you've got a Default state (button enabled but not pressed), Active state (enabled and pressed), etc.

So you may be asking, what's the diff between a RectangleStyle and a ButtonStyle...

A RectangleStyle defines how a rectangle should be drawn at varying sizes. You give it up to 5 rows and 3 columns of imageStyles and set how those images shrink/stretch and tile to fill the space. They're the universal image filler.

A ButtonStyle uses multiple RectangleStyles along with font settings to define what a button looks like in its various states. When the mouse is over the button, it shows one image frame and text format, when the button is pressed in shows another combination.

One last element to toss into the mix...
ImageFrames are the most basic graphic resource. With them you select a source image file and define the coordinates of an image slice. The thing is that's prety much all an ImageFrame does. There's a reason for this. In some cases you'll want to use the same image slice but have it shrink and stretch differently, or have a different color tint. And that's what ImageStyles are for, applying different behaviors to the same source image

Button
|_ButtonStyle
. |_RectangleStyle
. . |_ImageStyle
. . . |_ImageFrame
Reply With Quote
  #8  
Unread 06-27-2006, 12:12 PM
xriscarter xriscarter is offline
A Darkpaw Brute
Interface Author - Click to view interfaces
 
Join Date: Apr 2006
Server: Blackburrow
Posts: 40
Default

My imageframe points to the right dds file.....

My object.style points to buttonStyle (basicButton).....and not to an image file.

So my problem here would be the RectangleStyle? I do not have anything in there right now. Or is my problem that the objectStyle is not pointing to the right place......

Code:
/ButtonStyles.basicButton
should it be something like?

/myui.eq2_ButtonStyles.basicButton
/myui.eq2_ButtonStyles.basicButton.object.styles
/myui.ButtonStyles.basicButton
/myui.ButtonStyles.basicButton.object.styles
/ButtonStyles.basicButton
/ButtonStyles.basicButton.object.styles
Reply With Quote
  #9  
Unread 06-27-2006, 01:05 PM
Loktha's Avatar
Loktha Loktha is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Server: Crushbone
Posts: 87
Default

Ok, here's what I think your problem is.

First, your using an imageframe to try and define a button. That's not gonna work. This is what's causing the issue. In the screenshot where you're showing the Source and SourceRect, look at the top of the image. It says Object Properties: (ImageFrame)

This kind of object does require you to define the source and sourcerect, or define the rstyledefault. But your not trying to add a frame, your trying to add a button.

So scrap that entirely. On the insert menu, select object, then select button. Go ahead and fill in all your information. You'll notice the button object doesn't offer you the option of supplying the source and sourcerect. That's because there not needed. You've already given that information when you defined the button in the buttonstyles.xml. So all you have to do is define the style.

Style /ButtonStyles.basicButton

That's it. This should fix your problem.
Reply With Quote
  #10  
Unread 06-27-2006, 04:57 PM
xriscarter xriscarter is offline
A Darkpaw Brute
Interface Author - Click to view interfaces
 
Join Date: Apr 2006
Server: Blackburrow
Posts: 40
Default

Ok I made the new button the same way that you said too. My question how can you make a buttonstyle that does not have a imageframe?

Reply With Quote
  #11  
Unread 06-27-2006, 05:20 PM
Loktha's Avatar
Loktha Loktha is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Server: Crushbone
Posts: 87
Default

I just took a look at your buttonstyles.xml again. It looks like you forgot to define the button.

Your missing this code:

<ButtonStyle DisabledTextColor="#404040" MouseOverTextColor="#FFFF00" Name="BasicButton" NormalTextColor="#E0E0E0" NormalTextStyle="/Fonts.FontZapf15" PressSound="click" RStyleDefault="basicButton.basic_button_normal" RStyleMouseOver="basicButton.basic_button_normal" RStyleMouseOverActivated="basicButton.basic_button_normal" RStyleMouseOverSelected="basicButton.basic_button_normal" RStyleSelected="basicButton.basic_button_normal" SelectedTextColor="#FFFF00" />





************INSERT HERE******************************
- <Namespace Name="basicButton">
<RectangleStyle Center="basic_button_normal" CenterShrinkH="true" CenterShrinkV="true" Name="basic_but_normal" />
<RectangleStyle Center="basic_button_pressed" CenterShrinkH="true" CenterShrinkV="true" Name="basic_but_pressed" />
<RectangleStyle Center="basic_button_rollover" CenterShrinkH="true" CenterShrinkV="true" Name="basic_but_rollover" />
<RectangleStyle Center="basic_button_normal" CenterShrinkH="true" CenterShrinkV="true" Color="#808080" Name="basic_but_disabled" />
- <ImageStyle Filter="true" Name="basic_button_normal">
<ImageFrame Name="image" Source="images/window_elements_generic.dds" SourceRect="104,496,116,508" />
</ImageStyle>
- <ImageStyle Filter="true" Name="basic_button_pressed">
<ImageFrame Name="image" Source="images/window_elements_generic.dds" SourceRect="104,496,116,508" />
</ImageStyle>
- <ImageStyle Filter="true" Name="basic_button_rollover">
<ImageFrame Name="image" Source="images/window_elements_generic.dds" SourceRect="104,496,116,508" />
</ImageStyle>
</Namespace>
***********************************************

Then, in the style, you'll want to put /ButtonStyles.BasicButton

Try that out.
Reply With Quote
Reply



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
Forum Jump


All times are GMT -5. The time now is 12:39 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI