Thursday, October 2, 2014

Swap leaderboards button finished

Created a button to toggle other leaderboards

local JumpPackButton = surfui.Button( SURF.lbui, _w/3+10, 0, 120, 20, bg, function( s, w, h)
draw.RoundedBox( 0, 0, 0, w+50, h, Color(93, 174, 231, 100) )
draw.RoundedBox( 0, 1, 0, w+48, h-1, Color(93, 174, 231) )
draw.SimpleText( "SWAP LEADERBOARDS", "SURF_LB_NAME", w/2, h/2-1, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
end)
JumpPackButton.DoClick = function()
RunConsoleCommand("surf_toggle_lb")
RunConsoleCommand("surf_toggle_jplb")
end

Currently no other leaderboards, but the framework for the button is there as I just have to hook the other panel to a console command and open on call.

Current photo of button(May change)

Also just for a little feature, backend for a refresh leaderboards button is done, clientside painting is all thats left.

No comments:

Post a Comment