Make "sprite-button-with-numbers" available to mod guis.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Make "sprite-button-with-numbers" available to mod guis.
In an attempt to make a gui that looks vanilla-like i noticed that the type of sprite-button that also shows numbers is not available to mods. It's the button type that's used for the inventory/production/power statistics that shows a sprite and some numbers/strings. Would be awesome if that was made available, either with built-in number conversion (i.e. "100000" becomes "100k") or preferbly with the ability to set arbitrary strings.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Make "sprite-button-with-numbers" available to mod guis.
Any news on this?
I've since managed to somewhat mimic the slot-buttons, but i can't get the numeric label to correctly align with the bottom right corner. As soon as the player changes UI scale in the game options it disaligns because i'm using absolute width/height numbers to push the number to the bottom corner: So any answers/help would be greatly appreciated. Especially if i'm just missing something/doing it wrong.
I've since managed to somewhat mimic the slot-buttons, but i can't get the numeric label to correctly align with the bottom right corner. As soon as the player changes UI scale in the game options it disaligns because i'm using absolute width/height numbers to push the number to the bottom corner: So any answers/help would be greatly appreciated. Especially if i'm just missing something/doing it wrong.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.