I want to show a button with an image of the item prototype "infinity-chest" on the top part of the player gui.
First, I want to achieve this with a console command:
/c game.player.gui.top.add({type = "sprite-button",name = "test",sprite = "item/infinity-chest"})
The result looks like this:
I was expecting a normal sized button with an image of the item on it. What did I do wrong here?
How to do style-button with Item in it?
How to do style-button with Item in it?
Last edited by Gergely on Thu Dec 14, 2017 1:57 pm, edited 1 time in total.
Re: How to do style-button with Item in it?
you must add a style or your picture size is null
Code: Select all
/c game.player.gui.top.add({type = "sprite-button",name = "test",sprite = "item/infinity-chest", style="icon_button"})
Re: How to do style-button with Item in it?
Oh boy...
Where do I find the list of available styles?
Where do I find the list of available styles?
Re: How to do style-button with Item in it?
From this mod:Gergely wrote:Oh boy...
Where do I find the list of available styles?
viewtopic.php?f=33&t=54423#p321674
available styles
By the 0.16 there's no "_style" on the end of name.