Also, you might be better off to overriding the template, since CommandButtons are dynamically generated.
Is it possible to overriding the template?
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Desc><Frametype="GameButton"name="GameButtonTemplate"file="GameButton"><Frametype="Image"name="GameButtonBorderImage"><Anchorrelative="$parent"/><LayerCountval="1"/><TextureTypeval="Normal"layer="0"/><Textureval="Assets/Textures/HeroBorderNormal.dds"layer="0"/><RenderPriorityval="510"/></Frame><!-- copy from original template --></Frame></Desc>
Are you talking about this? This layout doesnt work too. =(
Second, while I was working on buttons I used NormalImage and the HoverImage to add button borders, try to edit these <texture> paths and see if borders are changed correctly
When im trying to change Normal & Hover images it affects coldown animation. It use "@UI/ButtonCooldown" texture as u can see, i think its just for cooldown grey clock animation.
I played Tofu and there was buttons with custom borders. How did they changed them?
You don't see the clicked version because you are not using a button frame with different statuses.
Take my example, I used a border with 3 statuses. The first 2 are used for normal and clicked, the third I don't know :P
Additionally it uses hover and normal images to show normal, normal hover, clicked, clicked hover. http://www.sc2mapster.com/forums/development/gui/52064-solved-creating-a-custom-button-using-sc2layout/
Yes you can replace the dds file if they are on the same path and they will be used instead of standard ones.
I want to change command button border texture, but i cant find its declaration.
I can disable it with this layout:
but when i try to replace it with custom image it doesnt work:
Seems its impossible =(.
try removing the template line.
<Frame type="CommandButton" name="CommandButton00"
template="CommandButton/CommandButtonTemplate">@TwoDie: Go
Just tried. Not worked.
Problem is in "GameButtonBorderImage", there is no texture declaration in GameButtonTemplate:
As you can see only texture type, but where game picks right texture for this buttons???
it seems a hardcoded default, bu at least via in game editor i had set it to @@UI/TechGlossaryEquipmentBorder and it worked
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
@Alevice: Go
Sory but i cant understand where u set it to @@UI/TechGlossaryEquipmentBorder??? In UI editor or somewhere else? Please write it more detailed.
Ingame press ctrl+al+f12 then search for a commandbutton, find the Texture field and set it to the value I put.
Also, you might be better off to overriding the template, since CommandButtons are dynamically generated.
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
WOW! Never knew about "ctrl+alt+f12" - big thx for this, helps me a lot in UI managing.
Is it possible to overriding the template?
Are you talking about this? This layout doesnt work too. =(
Bump
Do you have the extracted original "GameButton" sc2layout file so I can take a look?
here it is
I noticed 2 things that could cause the problem.
First: this description is inside the GameUI file I think you should declare it as
Second, while I was working on buttons I used NormalImage and the HoverImage to add button borders, try to edit these <texture> paths and see if borders are changed correctly
@Bibendus: Go
But this layout hides image i want to change:
It means that all declared correctly i think.
When im trying to change Normal & Hover images it affects coldown animation. It use "@UI/ButtonCooldown" texture as u can see, i think its just for cooldown grey clock animation.
I played Tofu and there was buttons with custom borders. How did they changed them?
Oh sorry I was reading the later repliy with this code
I'll see what I can find later then. I have to hide the empty button frames so I think it should be related ;)
Mmmm one thing you can try is to hide the default button frame and replace it with new ones, it should work
@Bibendus: Go
Yes it works. But this new border does not changes when pressing button, so its little ugly =/
I found another way: i just figured what .dds files those borders use, and imported custom with same names. Will it work when i post my map on bnet?
@Dzuke911: Go
You don't see the clicked version because you are not using a button frame with different statuses.
Take my example, I used a border with 3 statuses. The first 2 are used for normal and clicked, the third I don't know :P
Additionally it uses hover and normal images to show normal, normal hover, clicked, clicked hover.
http://www.sc2mapster.com/forums/development/gui/52064-solved-creating-a-custom-button-using-sc2layout/
Yes you can replace the dds file if they are on the same path and they will be used instead of standard ones.
@Dzuke911: Go
Yes, replacing the image with one of the same name works.