Guest User

Untitled

a guest
Oct 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. GenericGradient gradient = new GenericGradient();
  2. gradient.setTopColor(new Color(0.0F, 0.0F, 0.0F, 0.0F)); //Red, Green, Blue, Alpha. This makes the gradient white
  3. gradient.setBottomColor(new Color(0.0F, 0, 0, 0.0F)); //Red, Green, Blue, Alpha. This makes the gradient red
  4. gradient.setHeight(4).setWidth(10);//This makes it 32*32.
  5. gradient.setAnchor(WidgetAnchor.TOP_RIGHT);
  6. gradient.setVisible(true);
  7. player.getMainScreen().attachWidget(gradient);
  8. GenericGradient gradient2 = new GenericGradient();
  9. gradient2.setTopColor(new Color(1.0F, 0.0F, 0.0F, 0.0F)); //Red, Green, Blue, Alpha. This makes the gradient white
  10. gradient2.setBottomColor(new Color(1.0F, 0, 0, 0.0F)); //Red, Green, Blue, Alpha. This makes the gradient red
  11. gradient2.setHeight(4).setWidth(10);//This makes it 32*32.
  12. gradient2.setAnchor(WidgetAnchor.TOP_RIGHT);
  13. gradient2.setVisible(true);
  14. player.getMainScreen().attachWidget(gradient2);
Add Comment
Please, Sign In to add comment