Sprites won't accept size input?
Posted: Wed Dec 12, 2018 3:37 pm
I'm currently trying to get a GuiElement sprite to accept my style directions for height and width. When doing this with sprite-buttons, my size directions get through, like in this example:
It displays in 34x34, as specified. When I try to do the same with a normal sprite: (both need to be named button_ for other uses, don't let that confuse you)
It doesn't work, the sprite displays in a very small size, maybe 5x5. What am I doing wrong here?
Code: Select all
table.add{type="sprite-button", name="button_" .. id, sprite="item/" .. icon}
table["button_" .. id].style.width = 34
table["button_" .. id].style.height = 34
Code: Select all
table.add{type="sprite", name="button_" .. id, sprite="item/" .. icon}
table["button_" .. id].style.width = 34
table["button_" .. id].style.height = 34