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

Bugs that are actually features.
Post Reply
User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

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

Post 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").

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

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

Post 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.

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

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

Post 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.

Post Reply

Return to “Not a bug”