Пример #1
0
 public IButton(BufferedImage up, BufferedImage down, BufferedImage hover) {
   super(Utils.imgsz(up));
   this.up = up;
   this.down = down;
   this.hover = hover;
   render();
 }
Пример #2
0
 public boolean mousedown(Coord c, int button) {
   if (button != 1) {
     return (false);
   }
   if (!checkhit(c)) {
     return (false);
   }
   a = true;
   d = ui.grabmouse(this);
   depress();
   render();
   return (true);
 }
Пример #3
0
 public void mousemove(Coord c) {
   boolean h = checkhit(c);
   boolean a = false;
   if (d != null) {
     a = h;
     h = true;
   }
   if ((h != this.h) || (a != this.a)) {
     this.h = h;
     this.a = a;
     render();
   }
 }