Adding a Button and Leaderboards

Hello, 

Im trying to help a friend out and add in leaderboards and a button on the home screen to access them. I can not figure out how he set up his code to show or add the buttons in. I didn’t know if anyone could take a look at where I should put it in so that it works correctly. I already have the google play login working correctly its just leaderboards at this time. 

Thank you so much

Hi @poison4232,

I assume you’re speaking about using Google Play Game Services and the associated Corona plugin for it? If so, I think this is the document you’re looking for:

https://docs.coronalabs.com/plugin/gameNetwork-google/show.html

Take care,

Brent

i am a noob @ coding and started a couple of days ago … but i think the easiest way is this: 

if i´m wrong and i made any mistake please correct me or delete this

local gameNetwork = require( "gameNetwork" ) local leaderboardbutton= display.newImage ("graphics/leaderboardbutton.png") leaderboardbutton.x = display.contentCenterX leaderboardbutton.y = display.contentCenterY sceneGroup:insert( leaderboardbutton ) local function showLeaderboards (event) gameNetwork.show( "leaderboards" ) end leaderboardbutton:addEventListener ("tap", showLeaderboards)

Hi @poison4232,

I assume you’re speaking about using Google Play Game Services and the associated Corona plugin for it? If so, I think this is the document you’re looking for:

https://docs.coronalabs.com/plugin/gameNetwork-google/show.html

Take care,

Brent

i am a noob @ coding and started a couple of days ago … but i think the easiest way is this: 

if i´m wrong and i made any mistake please correct me or delete this

local gameNetwork = require( "gameNetwork" ) local leaderboardbutton= display.newImage ("graphics/leaderboardbutton.png") leaderboardbutton.x = display.contentCenterX leaderboardbutton.y = display.contentCenterY sceneGroup:insert( leaderboardbutton ) local function showLeaderboards (event) gameNetwork.show( "leaderboards" ) end leaderboardbutton:addEventListener ("tap", showLeaderboards)