Add 'content_offset' and 'padding' style properties for buttons (#9661)

* Add padding and content_offset style properties to buttons
This commit is contained in:
Hugues Ross
2020-05-02 07:32:02 -04:00
committed by GitHub
parent 5c96f57782
commit cb9a44ef89
5 changed files with 88 additions and 21 deletions

View File

@@ -2697,10 +2697,14 @@ Some types may inherit styles from parent types.
* bgimg - standard background image. Defaults to none.
* bgimg_hovered - background image when hovered. Defaults to bgimg when not provided.
* bgimg_middle - Makes the bgimg textures render in 9-sliced mode and defines the middle rect.
See background9[] documentation for more details
See background9[] documentation for more details. This property also pads the
button's content when set.
* bgimg_pressed - background image when pressed. Defaults to bgimg when not provided.
* border - boolean, draw border. Set to false to hide the bevelled button pane. Default true.
* content_offset - 2d vector, shifts the position of the button's content without resizing it.
* noclip - boolean, set to true to allow the element to exceed formspec bounds.
* padding - rect, adds space between the edges of the button and the content. This value is
relative to bgimg_middle.
* textcolor - color, default white.
* checkbox
* noclip - boolean, set to true to allow the element to exceed formspec bounds.