summaryrefslogtreecommitdiff
path: root/src/device/Keyboard.java
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-27 13:34:34 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-27 13:34:34 +0200
commit37c7d1e7a6d9e330345de24dfd1957c76716bd3a (patch)
treeab99cc233967fa412eee041957325a732e7254a4 /src/device/Keyboard.java
parent4263d0e02cee82099463ac1e1c9caea0e294a644 (diff)
Add method
Diffstat (limited to 'src/device/Keyboard.java')
-rw-r--r--src/device/Keyboard.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/device/Keyboard.java b/src/device/Keyboard.java
index e311413..4acf4a1 100644
--- a/src/device/Keyboard.java
+++ b/src/device/Keyboard.java
@@ -57,4 +57,24 @@ public class Keyboard{
}
+ /**
+ *
+ * Change region keyboard color
+ *
+ * @param region Region to apply the color
+ * @param color Color to apply
+ * @param intensity Intensity wanted
+ */
+ public void setRegionColor(Region region, Color color, Intensity intensity){
+ // Save state
+ this.KeyboardColor.put(region, color);
+
+ // Set color
+ this.device.setColor(region, color, intensity);
+
+ // Apply color
+ this.device.commit(this.mode);
+
+ }
+
} \ No newline at end of file