Allow adding label inside sprite-button
Posted: Fri Mar 24, 2017 7:04 pm
Request:
Add an optional string parameter "label" for adding string inside GUIElement sprite-button.
So we can make something like the item count buttons in vanilla Factorio if we enter a number in "label":
(I keep thinking I have made this request, but I couldn't find the post after some advanced searches.)
I have tried making the item count buttons in my mod before, but it didn't end well.
First, I have add nested label style inside the sprite button style, but either I have set the wrong values, or this simply isn't support, the label wasn't shown properly.
Second, the label blocked mouse interaction of the button. It's the main reason why I stopped doing it.![Laughing :lol:](./images/smilies/icon_lol.gif)
Add an optional string parameter "label" for adding string inside GUIElement sprite-button.
So we can make something like the item count buttons in vanilla Factorio if we enter a number in "label":
(I keep thinking I have made this request, but I couldn't find the post after some advanced searches.)
I have tried making the item count buttons in my mod before, but it didn't end well.
First, I have add nested label style inside the sprite button style, but either I have set the wrong values, or this simply isn't support, the label wasn't shown properly.
Second, the label blocked mouse interaction of the button. It's the main reason why I stopped doing it.
![Laughing :lol:](./images/smilies/icon_lol.gif)