From 047ef9f6655dd742771ebaf537e956b48ef92c64 Mon Sep 17 00:00:00 2001 From: Nikolai Date: Wed, 22 Oct 2025 10:49:40 +0200 Subject: [PATCH] Delete MuehleButton.~ava --- MuehleButton.~ava | 75 ----------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 MuehleButton.~ava diff --git a/MuehleButton.~ava b/MuehleButton.~ava deleted file mode 100644 index 3f3a2f0..0000000 --- a/MuehleButton.~ava +++ /dev/null @@ -1,75 +0,0 @@ -import javafx.scene.paint.Color; -import javafx.scene.shape.Circle; -import javafx.scene.shape.Shape; -import javafx.event.Event; -import javafx.event.EventHandler; -import javafx.scene.input.MouseEvent; -public class MuehleButton { - - public Game game; - - public int relativeX; - public int relativeY; - - public double absoluteX; - public double absoluteY; - - public Color color = Color.BLUE; - - public double radius; - - public Circle circle; - - public int id; - - public boolean isActive = true; - - public MuehleButton(int id,int relX, int relY, double absX, double absY, Game game) { - this.id = id; - - relativeX = relX; - relativeY = relY; - - absoluteX = absX; - absoluteY = absY; - - radius = 20; - this.color = color; - circle = new Circle(absoluteX, absoluteY, radius); - circle.setFill(this.color); - - this.game = game; - - circle.addEventHandler(MouseEvent.MOUSE_RELEASED, mouse_click_target); - - setActive(true); - } - - public Shape getShape() { - return circle; - - } - public void setActive(boolean value) { - isActive = value; - if(value == true) { - circle.setFill(this.color); - } - else { - //circle.setFill(Color.rgb(0,0,0,0)); - circle.setFill(Color.rgb(0,255,0)); - } - } - - EventHandler mouse_click_target = new EventHandler() { - public void handle(MouseEvent event) { - System.out.println("Button Clicked!"); - MouseClick(); - } - }; - - - public void MouseClick() { - game.chip_button_clicked(this); - } - -} // end of MuehleButton