Skip to content

Commit

Permalink
HTML5 SimpleButton compile fix
Browse files Browse the repository at this point in the history
git-svn-id: https://nekonme.googlecode.com/svn/trunk@1849 1509560c-5e2a-0410-865c-31c25e1cfdef
  • Loading branch information
jgranick committed Jul 19, 2012
1 parent 88b71b2 commit c8935ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jeash/display/SimpleButton.hx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SimpleButton extends DisplayObjectContainer {
}

function switchState(state:DisplayObject) {
if (this.currentState != null && this.currentState.jeashIsOnStage()) {
if (this.currentState != null /*&& Lib.jeashIsOnStage (this.currentState.jeashGetGraphics ().jeashSurface)*/) {
removeChild(this.currentState);
addChild(state);
} else {
Expand Down Expand Up @@ -103,13 +103,14 @@ class SimpleButton extends DisplayObjectContainer {
return this.upState = upState;
}

override function jeashSetParent(displayObject : DisplayObjectContainer) {
override function jeashSetParent(displayObject : DisplayObjectContainer):DisplayObjectContainer {
super.jeashSetParent(displayObject);
addChild(currentState);
if (hitTestState != null) addChild(hitTestState);
switchState(currentState);
return displayObject;
}

override function jeashIsOnStage ()
if (parent != null && parent.jeashIsOnStage() == true) return true; else return false
/*override function jeashIsOnStage ()
if (parent != null && parent.jeashIsOnStage() == true) return true; else return false*/
}

0 comments on commit c8935ed

Please sign in to comment.