Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

ShowLeaderboards callback don't work #51

Closed
michidk opened this issue Jul 18, 2015 · 5 comments
Closed

ShowLeaderboards callback don't work #51

michidk opened this issue Jul 18, 2015 · 5 comments

Comments

@michidk
Copy link
Contributor

michidk commented Jul 18, 2015

If i execute the following code:
GameJolt.UI.Manager.Instance.ShowLeaderboards((bool test) => { Debug.Log("A very sad callback :c");});
And i close the Leaderboard by pressing the given close button (from the GameJoltAPI-Prefab), nothing happens.

@WizzardMaker
Copy link

You have to go to Plugins/GameJolt/Scripts/UI/Controllers and in LeaderboardsWindow.cs:20 you have to modify this piece of Code:

override public void Show(Action<bool> callback)
{
    animator.SetTrigger("Leaderboards");
    animator.SetTrigger("ShowLoadingIndicator");
    this.callback = callback; // <- Add this
    //...
}

Hope it helps

@michidk
Copy link
Contributor Author

michidk commented Jul 18, 2015

Okay, i implmented the callback myself, but your fix is better. Just, tested, works fine. Should i open a PR or do you want to do it?

@WizzardMaker
Copy link

You can do it, I am just a stranger who saw your issue and wanted to help

@michidk
Copy link
Contributor Author

michidk commented Jul 18, 2015

Haha, awesome :D Thank you!

@loicteixeira
Copy link
Owner

Good job guys 👍
Thanks @michidk for the issue and pull request and thanks @WizzardMaker for helping him!

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants