Created
September 15, 2016 20:05
-
-
Save awt2542/6dec023837f4feacfa4c5a132bf33441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shortcut to bring a layer into view. Nice for tweaking properties. | |
# Usage: btn.centerStage() | |
Layer::centerStage = (opacity = 1) -> | |
bg = new Layer size: Screen.size, backgroundColor: 'black', opacity: opacity | |
@parent = null | |
@bringToFront() | |
@midX = Screen.midX | |
@midY = Screen.midY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment