Skip to content

Instantly share code, notes, and snippets.

@Groogy
Created February 10, 2013 15:54
Show Gist options
  • Save Groogy/4749991 to your computer and use it in GitHub Desktop.
Save Groogy/4749991 to your computer and use it in GitHub Desktop.
playButtonAction = [this](GUI::Component& sender) { // The argument is not needed actually, just common in .NET and Java
startGame(); // Member function in the state that defines this action
};
std::shared_ptr<GUI::Button> playButton(new GUI::Button("Play", playButtonAction));
myContainer.pack(playButton);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment