Page 1 of 1

[0.16.18] Caption for sprite button

Posted: Fri Feb 16, 2018 8:24 pm
by _npo6ka_
I want to create a sprite button with the text on it, but after attaching the value of the sprite, the text was under the sprite. It seems to me that the text should be on top of the sprite.

Image

Code: Select all

gui.add({
  type = "sprite-button", 
  name = "my_sprite_button",
  style = "slot_button",
  sprite = "hand_icon",
  caption = "123"
})

--hand_sprite
{
  type = "sprite",
  name = "hand_icon",
  filename = "__core__/graphics/hand.png",
  priority = "extra-high-no-scale",
  width = 32,
  height = 32,
  scale = 1,
}

Re: [0.16.18] Caption for sprite button

Posted: Fri Mar 02, 2018 5:48 pm
by kovarex
Thanks for the notice, fixed for the next version.