I want to change border of a Button when i click similar toggle Button ?
Because GUI not support Tab control, so i use Buttons, if this Button clicked, it change border and that Button also change Border. I want to custom Tab like that ?
Thanks
I think he wants something like this : A user clicks a button and once a button has been clicked, it's border changes to signify that the user is in that tab. (even after the user clicks on other controls) Then once another "tab" button is clicked, it's border is changed and the old tab's button is changed back.
I solved this problem.
Step 1 : We have new skin for button, copy them into devcontent folder.
Step 2 : Run Map.Editor and using AutoUpdate. Save and Close.
Step 3 : Build all to copy content to your project.
Step 4 :
_btnSort = CreateButton(this, new Vector2(173, 120), new Vector2(87, 97), "ButtonSort");
private Button CreateButton(Control parent, Vector2 pos, Vector2 size, string skinName) {
Button result = new Button(parent, pos, size);
result.Border = GUIManager.SkinManager.GetBorder(skinName);
result.BorderNormal = GUIManager.SkinManager.GetBorder(skinName);
result.BorderOver = GUIManager.SkinManager.GetBorder(skinName, "MouseOver");
result.BorderPressed = GUIManager.SkinManager.GetBorder(skinName, "Pressed");
return result;
}
Step 5 : Onclick or onmousedown we need only change Border and BorderNormal properties.
Thanks all,
Buttons are just made up of png files, check the DevContent. I'm not quite sure if that's what you're asking though..
Click here for my Netgore Content Editor Tutorial video