Tuesday, October 7, 2014

PANELS WORKING WOOO

function SURF:CloseJPLB()
for _, panelclose in pairs(SURF.jplbui) do
panelclose:Remove()
end
SURF.lbui = SURF.jplbui or {}
end

Fixed the panel closing. I did it champ!


Back end starts tomorrow

Monday, October 6, 2014

FLAWLESS SWAP, broken close

The Swap button works without error, constantly switching back and forth without error.
But last day's error is still happening and the close button is not functioning as of now, It disables the mouse clicker but does not actually close the panel.

Friday, October 3, 2014

Swapping Panels!

The leaderboards before the button is pressed,

and after the button is pressed.

Times aren't separate because I haven't done backend yet, but the button functions as I'd like and it does open a new panel, which is hard to see, but you can see the "NO JUMP PACK" text in the top left. 

I plan on doing a few visual changes, and I'll update the post today if I finish it.



Current errors with unknown fixes:
[ERROR] gamemodes/surf/gamemode/leaderboards/cl_leaderboards.lua:348: attempt to index a nil value
  1. CloseJPLB - gamemodes/surf/gamemode/leaderboards/cl_leaderboards.lua:348
   2. unknown - gamemodes/surf/gamemode/leaderboards/cl_leaderboards.lua:56
    3. unknown - lua/includes/modules/concommand.lua:69


Updated LB Look





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.

Wednesday, October 1, 2014

Set-up

Began work on splitting leaderboards between jump pack and no jump pack.

Currently as is, there is a toggle in the F1 menu to enable/disable jump pack
I'll be working on splitting the leaderboards between people with that toggle enabled, and disabled

Complications: They could set the jump pack enabled to true from false when about to complete the map and register a time on the No jump pack leaderboards

How to fix those problems: Check their toggle in the start area and maintain that value till the map is completed, or until they re enter the start area

I'll be writing the script in gLua, a variation of the lua language written and created for garrys mod. It contains specific functions and hooks for making mods or complete redesigns of the game.

I will be doing panel creating for clientside visuals and ease of leaderboard checking and backend serverside work for the data the leaderboards save.
I will probably create more that functions well with the disabled jump pack, like different color chat text on completion or more XP for completing without the jump pack.