NiftyGUI default button beackgroundcolor

hi all,

how to change the backgroundcolor of a default button?

the standard color is red.



thnaks in advance.

Well, there is no default button in Nifty GUI? :slight_smile: I think, what you mean is the first control that automatically gets the keyboard focus, right?



The nifty-style-black draws the currently selected button in red. there is no easy way to change this color because in the end that button is an image!



What you can do is to find the default style for the button in the nifty-style-black project (somewhere in src/main/resources/button) and copy everything you find in there to a place in your project, modify and rename the style to “my-style” or something, add il to your project and use it:



[xml]<useStyles filename=“my-custom-button.xml” /> <!-- that is the copy of nifty-button.xml -->



<control name=“button” label=“HELLO” style=“my-style” />[/xml]