@@ -48,7 +48,7 @@ local selected_l_type_idx = 1
4848local selected_entity_type = 1
4949local TVehList = {}
5050local g_offsets = {}
51- local l_Offsets = {}
51+ local l_offsets = {}
5252local state_colors <const> = {
5353 [eThreadState .UNK ] = GREY ,
5454 [eThreadState .DEAD ] = RED ,
@@ -243,7 +243,7 @@ local function DrawGlobalsAndLocals()
243243
244244 ImGui .SameLine ()
245245
246- if GUI :Button (( " Clear##%s " ): format ( " globals" ) ) then
246+ if GUI :Button (" Clear##globals" ) then
247247 init_g_addr = 0
248248 g_offset_count = 0
249249 g_offsets = {}
@@ -298,11 +298,11 @@ local function DrawGlobalsAndLocals()
298298
299299 ImGui .BeginDisabled (string .isempty (l_scr_name ) or init_l_addr == 0 )
300300 ImGui .SameLine ()
301- if GUI :Button (( " Clear##%s " ): format ( " locals" ) ) then
301+ if GUI :Button (" Clear##locals" ) then
302302 l_scr_name = " "
303303 init_l_addr = 0
304304 l_offset_count = 0
305- l_Offsets = {}
305+ l_offsets = {}
306306 selected_l_type_idx = 1
307307 end
308308
@@ -315,8 +315,8 @@ local function DrawGlobalsAndLocals()
315315 ImGui .BeginDisabled (l_offset_count == 0 )
316316 if GUI :Button (" Remove Offset##locals" ) then
317317 l_offset_count = math.max (0 , l_offset_count - 1 )
318- if (# l_Offsets > 0 ) then
319- l_Offsets [ # l_Offsets ] = nil
318+ if (# l_offsets > 0 ) then
319+ l_offsets [ # l_offsets ] = nil
320320 end
321321 end
322322 ImGui .EndDisabled ()
@@ -326,8 +326,8 @@ local function DrawGlobalsAndLocals()
326326 for i = 1 , l_offset_count do
327327 ImGui .Text (" .f_" )
328328 ImGui .SameLine ()
329- l_Offsets [i ], _ = ImGui .InputInt (" ##test_local_offset" .. i , l_Offsets [i ] or 0 )
330- l_Offsets [i ] = math.max (0 , l_Offsets [i ])
329+ l_offsets [i ], _ = ImGui .InputInt (" ##test_local_offset" .. i , l_offsets [i ] or 0 )
330+ l_offsets [i ] = math.max (0 , l_offsets [i ])
331331 end
332332 end
333333 ImGui .PopItemWidth ()
@@ -345,9 +345,9 @@ local function DrawGlobalsAndLocals()
345345 if GUI :Button ((" Read %s##locals" ):format (selected_L_type or " " )) then
346346 local method_name = selected_L_type == " Pointer" and " GetPointer" or " Read" .. selected_L_type
347347 local l = ScriptLocal (init_l_addr , l_scr_name )
348- if (# l_Offsets > 0 ) then
349- for i = 1 , # l_Offsets do
350- l = l :At (l_Offsets [i ])
348+ if (# l_offsets > 0 ) then
349+ for i = 1 , # l_offsets do
350+ l = l :At (l_offsets [i ])
351351 end
352352 end
353353
@@ -357,7 +357,7 @@ local function DrawGlobalsAndLocals()
357357end
358358
359359local function DrawSerializerDebug ()
360- local eState = ThreadManager :GetThreadState (" SB_SERIALIZER" )
360+ local eState = ThreadManager :GetThreadState (" SB_SERIALIZER" )
361361
362362 ImGui .BulletText (" Thread State:" )
363363 ImGui .SameLine ()
@@ -404,14 +404,12 @@ local function PopulateVehlistOnce()
404404end
405405
406406local function DrawDummyVehSpawnMenu ()
407+ ImGui .Text (" Lightweight Vehicle Preview Test" )
407408 PopulateVehlistOnce ()
408409
409410 if ImGui .BeginListBox (" ##dummyvehlist" , - 1 , 0 ) then
410411 for _ , veh in ipairs (TVehList ) do
411- local is_selected = false
412-
413- ImGui .Selectable (veh .displayname , is_selected )
414-
412+ ImGui .Selectable (veh .displayname , false )
415413 if ImGui .IsItemHovered () then
416414 local item_min = vec2 :new (ImGui .GetItemRectMin ())
417415 hovered_y = item_min .y
@@ -420,7 +418,6 @@ local function DrawDummyVehSpawnMenu()
420418 hovered_y = nil
421419 end
422420 end
423-
424421 ImGui .EndListBox ()
425422 end
426423
@@ -482,7 +479,6 @@ debug_tab:RegisterGUI(function()
482479 end
483480
484481 if ImGui .BeginTabItem (" Preview Test" ) then
485- ImGui .Text (" Lightweight Vehicle Preview Test" )
486482 DrawDummyVehSpawnMenu ()
487483 ImGui .EndTabItem ()
488484 end
0 commit comments