Page 1 of 1

[0.17.25] entity-preview widget doesn't show the entity

Posted: Sat Apr 06, 2019 7:22 pm
by theRustyKnife
The entity-preview widget can be created, but doesn't display anything at all (not even an empty box or anything like that). Example commands to reproduce:

Code: Select all

/c ep = game.player.gui.center.add{type = 'entity-preview'}
/c ep.entity = game.player.selected
Passing the entity in the parameters when creating the widget doesn't work either (unless the key for that isn't "entity").

Re: [0.17.25] entity-preview widget doesn't show the entity

Posted: Sat Apr 06, 2019 7:41 pm
by theRustyKnife
After some discussion, the problem turns out to actually be that the default height and width for the widget are 0. More here.

Re: [0.17.25] entity-preview widget doesn't show the entity

Posted: Sat Apr 06, 2019 7:44 pm
by eduran
The default style is "empty-widget". Not sure if that is intentional or not, but it is the reason that it is necessary to set both width and height.