示例#1
0
 @Override
 public void draw(Batch batch, float parentAlpha) {
   if (contextMenu.isVisible() && style.opened != null) {
     style.opened.draw(batch, getX(), getY(), getWidth(), getHeight());
   }
   super.draw(batch, parentAlpha);
 }
示例#2
0
 @Override
 public void layout() {
   super.layout();
   setBounds(label, style.pad, 0, getWidth(), getHeight());
   float height = contextMenu.getPrefHeight();
   float width = contextMenu.getPrefWidth();
   setBounds(contextMenu, 0, -height, width, height);
 }