Пример #1
0
 /**
  * Gets the preferred size of the widget contents.
  *
  * @param canvas The canvas on which the widget is to be drawn
  * @param sizeHint The size hint passed by the NUI system
  * @return The preferred size of the widget
  */
 @Override
 public Vector2i getPreferredContentSize(Canvas canvas, Vector2i sizeHint) {
   if (image.get() != null) {
     return image.get().size();
   }
   return Vector2i.zero();
 }
Пример #2
0
 public void setValue(float val) {
   value.set(val);
 }
Пример #3
0
 public float getValue() {
   return value.get();
 }
Пример #4
0
 @Override
 public final String getFamily() {
   return family.get();
 }
Пример #5
0
 @Override
 public void setTooltip(UIWidget val) {
   tooltip.set(val);
 }
Пример #6
0
 @Override
 public UIWidget getTooltip() {
   return tooltip.get();
 }
Пример #7
0
 @Override
 public boolean isVisible() {
   return visible.get();
 }
Пример #8
0
 /**
  * Accessor function which returns the image of the container widget.
  *
  * @return The image of the container
  */
 public TextureRegion getImage() {
   return image.get();
 }