Last active
February 10, 2016 12:36
-
-
Save dadon/a7b924d532ada40243c6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package; | |
import openfl.display.Sprite; | |
class Main extends Sprite { | |
private var button1Menu:CustomButton; | |
private var button2Menu:CustomButton; | |
public function new() { | |
super(); | |
button1Menu = new CustomButton("path/button1", "Some text for Button 1", showButtonsText); | |
button1Menu = new CustomButton("path/button2", "Some text for Button 2", showButtonsText); | |
} | |
private function showButtonsText(currentButton:CustomButton):Void { | |
button1Menu.hideText(); | |
button2Menu.hideText(); | |
currentButton.showText(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment