Dolda2000 GitWeb
/
kaka
/
cakelight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Push and pop modes
[kaka/cakelight.git]
/
src
/
kaka
/
cakelight
/
CakeLight.java
diff --git
a/src/kaka/cakelight/CakeLight.java
b/src/kaka/cakelight/CakeLight.java
index
822e2ab
..
cd59362
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,16
@@
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() {
+ public
Mode
popMode() {
if (!modes.isEmpty()) {
Mode mode = modes.pop();
stopMode(mode);
if (!modes.isEmpty()) {
resumeMode(modes.peek());
}
if (!modes.isEmpty()) {
Mode mode = modes.pop();
stopMode(mode);
if (!modes.isEmpty()) {
resumeMode(modes.peek());
}
- return
tru
e;
+ return
mod
e;
}
}
- 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
}