Dolda2000 GitWeb
/
kaka
/
cakelight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename noise mode
[kaka/cakelight.git]
/
src
/
kaka
/
cakelight
/
CakeLight.java
diff --git
a/src/kaka/cakelight/CakeLight.java
b/src/kaka/cakelight/CakeLight.java
index
822e2ab
..
2f77a14
100644
(file)
--- a/
src/kaka/cakelight/CakeLight.java
+++ b/
src/kaka/cakelight/CakeLight.java
@@
-28,7
+28,7
@@
public class CakeLight {
}
public void cleanup() {
}
public void cleanup() {
- while (popMode());
+ while (popMode()
!= null
);
}
public void pushMode(Mode mode) {
}
public void pushMode(Mode mode) {
@@
-41,16
+41,14
@@
public class CakeLight {
// TODO: create a composite fading mode of top of stack and new mode
}
// TODO: create a composite fading mode of top of stack and new mode
}
- public
boolean
popMode() {
- if (
!modes.isEmpty()
) {
+ public
Mode
popMode() {
+ if (
modes.size() > 1
) {
Mode mode = modes.pop();
stopMode(mode);
Mode mode = modes.pop();
stopMode(mode);
- if (!modes.isEmpty()) {
- resumeMode(modes.peek());
- }
- return true;
+ resumeMode(modes.peek());
+ return mode;
}
}
- return
false
;
+ return
null
;
// TODO: create a composite fading mode of popped mode and top of stack, unless doing cleanup
}
// TODO: create a composite fading mode of popped mode and top of stack, unless doing cleanup
}