List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Button getPrefWidth
public float getPrefWidth()
From source file:com.forerunnergames.peril.client.ui.widgets.personicons.players.DefaultPlayerIcon.java
License:Open Source License
@Override public void setColor(final PlayerColor color) { Arguments.checkIsNotNull(color, "color"); if (color == PlayerColor.UNKNOWN) { log.warn("Not setting invalid color [{}]", PlayerColor.UNKNOWN); return;//from w ww .ja v a 2 s. c o m } activeColor = color; final Button playerIcon = colorsToIcons.get(activeColor); iconCell.setActor(playerIcon).size(playerIcon.getPrefWidth(), playerIcon.getPrefHeight()); table.invalidateHierarchy(); }