Modding Help How do you display a list of drawbles?

Discussion in 'Starbound Modding' started by Mobius58, Oct 27, 2016.

  1. Mobius58

    Mobius58 Void-Bound Voyager

    the function world.entityPortrait creates a list of drawables but how do you display them? Also does anyone know what are the available portrait modes for this function? Thank you.
     
    Last edited: Oct 27, 2016
  2. Errors4l

    Errors4l Spaceman Spiff

    Where are you trying to display them? I only know "full" works.
     
  3. Mobius58

    Mobius58 Void-Bound Voyager

    I was trying to get them to display in a gui window similar to how the crew has portraits next to their names in the sip ai crew panel. The gui is created in scripts canvas using the penguinGUI library and I attached a screenshot of its current state, it needs a lot of fixing up in terms of looks but it is completely functional.


    functional ui.jpg
     
  4. Errors4l

    Errors4l Spaceman Spiff

    Sorry I haven't worked with the script canvases at all. But for each object in world.entityPortrait(id, "full"), you'll want to put the image property on a new image widget.
    Code:
    for i,v in ipairs(world.entityPortrait(id, "full")) do
      local imagePath = v.image
    end
     
  5. Mobius58

    Mobius58 Void-Bound Voyager

    I tried it out and it also works in a script canvas because the canvas has a similar function called canvasDrawImage which works in a very simialr manner to widget.setImage. I think I should be able to get working now thank you for the help.
     

Share This Page