Example #1
0
 @Override
 protected void paintDragOverlay(GUI gui, int mouseX, int mouseY, int modifier) {
   if (icon != null) {
     final int innerWidth = getInnerWidth();
     final int innerHeight = getInnerHeight();
     icon.draw(
         getAnimationState(),
         mouseX - innerWidth / 2,
         mouseY - innerHeight / 2,
         innerWidth,
         innerHeight);
   }
 }
Example #2
0
 @Override
 protected void paintWidget(GUI gui) {
   if (!dragActive && icon != null) {
     icon.draw(getAnimationState(), getInnerX(), getInnerY(), getInnerWidth(), getInnerHeight());
   }
 }