@@ -11,6 +11,7 @@ local RED <const> = Color("red")
1111local GREEN <const> = Color (" green" )
1212local BLUE <const> = Color (" blue" )
1313local GREY <const> = Color (" #636363" )
14+ local LOCALES <const> = Translator .locales
1415
1516local side_button_size = vec2 :new (140 , 35 )
1617local init_g_addr = 0
@@ -401,7 +402,17 @@ local function DrawSerializerDebug()
401402 ImGui .BulletText (_F (" Is Disabled: %s" , not Serializer :CanAccess ()))
402403 ImGui .BulletText (_F (" Time Since Last Flush: %.0f seconds ago." , Serializer :GetTimeSinceLastFlush () / 1e3 ))
403404
404- if GUI :Button (" Dump Serializer" ) then
405+ --- @diagnostic disable
406+ if GUI :Button (" Break 0" ) then
407+ Serializer :DebugBreak (0 )
408+ end
409+ ImGui .SameLine ()
410+ if GUI :Button (" Break 1" ) then
411+ Serializer :DebugBreak (1 )
412+ end
413+ --- @diagnostic enable
414+
415+ if GUI :Button (" Dump" ) then
405416 Serializer :Dump ()
406417 end
407418end
@@ -410,16 +421,25 @@ local function DrawTranslatorDebug()
410421 ImGui .TextDisabled (" You can switch between available languages in Settings -> General." )
411422 ImGui .Spacing ()
412423
413- ImGui .BulletText (_F (" Language Name: %s" , GVars .backend .language_name ))
414- ImGui .BulletText (_F (" ISO: %s" , GVars .backend .language_code ))
415- ImGui .BulletText (_F (" Index: %d" , GVars .backend .language_index ))
424+ local idx = GVars .backend .language_index
425+ local iso = LOCALES [idx ]
426+ ImGui .BulletText (_F (" Index: %d" , idx ))
427+ ImGui .BulletText (_F (" ISO: %s" , iso ))
428+ ImGui .BulletText (_F (" Translated Name: %s" , _T (iso )))
416429
417430 ImGui .Spacing ()
418431
419432 if (GUI :Button (" Reload" )) then
420433 Translator .wants_reload = true
421434 end
422435
436+ ImGui .BeginDisabled (Translator :IsReloading ())
437+ if (GUI :Button (" Break" )) then
438+ --- @diagnostic disable-next-line
439+ Translator :Reload (true )
440+ end
441+ ImGui .EndDisabled ()
442+
423443 if (GUI :Button (" Dump Labels" )) then
424444 print (Translator .labels )
425445 end
@@ -443,7 +463,7 @@ local function PopulateVehlistOnce()
443463 table.insert (
444464 TVehList ,
445465 {
446- name = name ,
466+ name = name ,
447467 displayname = Game .GetVehicleDisplayName (name )
448468 }
449469 )
@@ -584,7 +604,7 @@ local function DrawMiscTests()
584604end
585605
586606return function ()
587- ImGui .BeginTabBar (" ##debug " )
607+ ImGui .BeginTabBar (" ##ss_debug " )
588608 ImGui .PushTextWrapPos (ImGui .GetFontSize () * 35 )
589609
590610 if ImGui .BeginTabItem (" Entities" ) then
0 commit comments