Hey guys,
i want to create my own buttons, but its not working...
BasicGear had already written about it, but i wasn't able to get it...
Is there a tutorial for creating own Images, which can be used as Buttons?
But then there are just clean Buttons, and if i move the mouse over them, there is only a small part of the original Picture and if i click it changes in some way, but it definitely doesn't work out fine...
I use gimp, saving a 76*76 dds picture with and without compression (eg. BC3/DXT5)...
ah, sorry forget to mention, that i work with Dialog Items, so those buttons work for the normal game play, but not for Dialoges and thats what i want to create....
Even though SC2 icons are 76x76, they only use the 68x68 center of that file, the borders are hidden using an alpha channel. You can simply copy the alpha channel to your file, or copy your image to a SC2 icon to cover the original image.
For DDS compression I suggest 8.8.8.8 without mip maps for best result.
As far as I know, button images are actually divided into several pieces and applied/stretched dynamically, but I'm not entirely sure. For an easy solution, you can just create a dialog image directly on top of your button, and set that to whatever you want. If you want to actually change the button itself, you'll need to set the button image via triggers. I don't have the editor open right now, but the action would be something like 'Set button image' and 'set button highlight image'.
"So if you have a button sized 64x64 then the image should be 66x132 applied to the button, then 'normal' state applied to that button."
normal state means: Dialog - Set (Last created dialog item) image type to Normal for (All players)
So the Image is cut in half, the upper part is for mouse over,the lower for beeing pressed.
Setting a image for the last created item sets an image for the button, if neither the mouse is over it nor the button is pressed...
SC2 uses methods of slicing for their default image type.I believe it's 9-slice or w/e.
What you just said is correct. If you want to build a 64x64 image and use it as a button, then you'd have to actually make it 64x132. That's because SC2 splits 4 button states into two images. These two images are the "Default" and "Hover" images, which I reiterate contain 2 button states.
64x132 derives from the 2 states in one image - it is not 64x128 because you need the 4 pixel gap. The 4 pixel gap is there because .dds file formats (for the most part) need to be saved in multiples of 4. Thus, it is not 64x130 either. The gap is a basic necessity in all graphics to ensure that effects from the above image do not transfer to the below image, or vice versa.
Once again, as I stated, there are 4 button states in 2 image types "Default" and "Hover"
Default - contains button states: normal (top piece), normal down out (bottom piece)
Hover - contains button states: over (top piece), down (bottom piece)
Hey guys, i want to create my own buttons, but its not working... BasicGear had already written about it, but i wasn't able to get it... Is there a tutorial for creating own Images, which can be used as Buttons?
@fischy33: Go
Its not hard, you just have to Save the pictures as .dds then import them into the map, and I would suggest 76 x 76 size for buttons.
Theres really no need for a tutorial for it.
But then there are just clean Buttons, and if i move the mouse over them, there is only a small part of the original Picture and if i click it changes in some way, but it definitely doesn't work out fine... I use gimp, saving a 76*76 dds picture with and without compression (eg. BC3/DXT5)... ah, sorry forget to mention, that i work with Dialog Items, so those buttons work for the normal game play, but not for Dialoges and thats what i want to create....
@fischy33: Go Here are some tips:
Even though SC2 icons are 76x76, they only use the 68x68 center of that file, the borders are hidden using an alpha channel. You can simply copy the alpha channel to your file, or copy your image to a SC2 icon to cover the original image.
For DDS compression I suggest 8.8.8.8 without mip maps for best result.
As far as I know, button images are actually divided into several pieces and applied/stretched dynamically, but I'm not entirely sure. For an easy solution, you can just create a dialog image directly on top of your button, and set that to whatever you want. If you want to actually change the button itself, you'll need to set the button image via triggers. I don't have the editor open right now, but the action would be something like 'Set button image' and 'set button highlight image'.
Its just like BasicGear said:
"So if you have a button sized 64x64 then the image should be 66x132 applied to the button, then 'normal' state applied to that button."
normal state means: Dialog - Set (Last created dialog item) image type to Normal for (All players)
So the Image is cut in half, the upper part is for mouse over,the lower for beeing pressed. Setting a image for the last created item sets an image for the button, if neither the mouse is over it nor the button is pressed...
@fischy33: Go
SC2 uses methods of slicing for their default image type.I believe it's 9-slice or w/e.
What you just said is correct. If you want to build a 64x64 image and use it as a button, then you'd have to actually make it 64x132. That's because SC2 splits 4 button states into two images. These two images are the "Default" and "Hover" images, which I reiterate contain 2 button states.
64x132 derives from the 2 states in one image - it is not 64x128 because you need the 4 pixel gap. The 4 pixel gap is there because .dds file formats (for the most part) need to be saved in multiples of 4. Thus, it is not 64x130 either. The gap is a basic necessity in all graphics to ensure that effects from the above image do not transfer to the below image, or vice versa.
Once again, as I stated, there are 4 button states in 2 image types "Default" and "Hover"