Allow adding label inside sprite-button

Post Reply
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Allow adding label inside sprite-button

Post by Mooncat »

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":
SpriteButtonWithNumber.png
SpriteButtonWithNumber.png (2.8 KiB) Viewed 946 times

(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. :lol:

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Allow adding label inside sprite-button

Post by daniel34 »

Mooncat wrote:I keep thinking I have made this request, but I couldn't find the post after some advanced searches.
You might have seen this related one: quantity on sprite button [Modding help]
quick links: log file | graphical issues | wiki

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Allow adding label inside sprite-button

Post by Mooncat »

daniel34 wrote:
Mooncat wrote:I keep thinking I have made this request, but I couldn't find the post after some advanced searches.
You might have seen this related one: quantity on sprite button [Modding help]
Oh, yes! That's exactly what I want. Thanks!
Tho it is still not solved yet. :P

Post Reply

Return to “Implemented mod requests”