Skip to content

Instantly share code, notes, and snippets.

@gmYusuf
Created June 24, 2020 14:20
Show Gist options
  • Save gmYusuf/15f32af89ca5f75769ef94e3b7949a8d to your computer and use it in GitHub Desktop.
Save gmYusuf/15f32af89ca5f75769ef94e3b7949a8d to your computer and use it in GitHub Desktop.
void HelloWorld::genAccountMenu() {
mMenu->addChild(MenuItemLabel::create(Label::createWithSystemFont("Login", "arial", 24), [](Ref*){
showMsg("to login...");
// sdkbox::PluginHMS::login(0); // slient login
sdkbox::PluginHMS::login(1); // login (id token)
// sdkbox::PluginHMS::login(2); // login (author code)
}));
mMenu->addChild(MenuItemLabel::create(Label::createWithSystemFont("Logout", "arial", 24), [](Ref*){
showMsg("to logout...");
sdkbox::PluginHMS::logout();
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment