Network buttons
This commit is contained in:
@@ -3,21 +3,23 @@ package control.button;
|
||||
import java.awt.Color;
|
||||
|
||||
import main.Window;
|
||||
import control.LedHandler;
|
||||
import control.NetworkHandler;
|
||||
|
||||
public class Button {
|
||||
|
||||
Color color;
|
||||
int ledID;
|
||||
int buttonID;
|
||||
LedHandler led;
|
||||
NetworkHandler ntw;
|
||||
public int pressed;
|
||||
|
||||
public Button(int buttonID, int ledID, LedHandler led)
|
||||
public Button(int buttonID, int ledID, NetworkHandler ntw)
|
||||
{
|
||||
color = new Color(255,255,255);
|
||||
this.ledID = ledID;
|
||||
this.buttonID = buttonID;
|
||||
this.led = led;
|
||||
this.ntw = ntw;
|
||||
pressed = 1;
|
||||
setLed();
|
||||
}
|
||||
|
||||
@@ -25,8 +27,8 @@ public class Button {
|
||||
{
|
||||
if(Window.ON_RASP)
|
||||
{
|
||||
led.setLed(ledID, color.getGreen(), color.getRed(), color.getBlue());
|
||||
led.show();
|
||||
ntw.setLed(ledID, color.getGreen(), color.getRed(), color.getBlue());
|
||||
ntw.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user