added response event for game center overlay closing
This commit is contained in:
parent
94638e7bfe
commit
95cd9b1ad5
@ -56,6 +56,8 @@ public:
|
|||||||
void request_achievement_descriptions();
|
void request_achievement_descriptions();
|
||||||
Error show_game_center(Variant p_params);
|
Error show_game_center(Variant p_params);
|
||||||
|
|
||||||
|
void game_center_closed();
|
||||||
|
|
||||||
int get_pending_event_count();
|
int get_pending_event_count();
|
||||||
Variant pop_pending_event();
|
Variant pop_pending_event();
|
||||||
|
|
||||||
|
@ -318,6 +318,14 @@ Error GameCenter::show_game_center(Variant p_params) {
|
|||||||
return OK;
|
return OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void GameCenter::game_center_closed() {
|
||||||
|
|
||||||
|
Dictionary ret;
|
||||||
|
ret["type"] = "show_game_center";
|
||||||
|
ret["result"] = "ok";
|
||||||
|
pending_events.push_back(ret);
|
||||||
|
}
|
||||||
|
|
||||||
int GameCenter::get_pending_event_count() {
|
int GameCenter::get_pending_event_count() {
|
||||||
|
|
||||||
return pending_events.size();
|
return pending_events.size();
|
||||||
|
@ -130,7 +130,8 @@ int add_cmdline(int p_argc, char** p_args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void) gameCenterViewControllerDidFinish:(GKGameCenterViewController*) gameCenterViewController {
|
- (void) gameCenterViewControllerDidFinish:(GKGameCenterViewController*) gameCenterViewController {
|
||||||
printf("in finish");
|
//[gameCenterViewController dismissViewControllerAnimated:YES completion:^{GameCenter::get_singleton()->game_center_closed();}];//version for signaling when overlay is completely gone
|
||||||
|
GameCenter::get_singleton()->game_center_closed();
|
||||||
[gameCenterViewController dismissViewControllerAnimated:YES completion:nil];
|
[gameCenterViewController dismissViewControllerAnimated:YES completion:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user