feat: Enhance JSON configuration writer and add heartbeat recording to crash recovery service

- Updated JsonConfigWriterService to structure the JSON output with new sections for scripts, window settings, input bindings, paths, rendering, and GUI configurations.
- Introduced a new method in ICrashRecoveryService to record frame heartbeats, allowing for better tracking of long-running operations.
- Refactored existing code to improve readability and maintainability, including the addition of helper functions for adding string members to JSON objects.
This commit is contained in:
2026-01-08 16:57:24 +00:00
parent 4fdbcdc4bc
commit df19ae9264
18 changed files with 1079 additions and 471 deletions

View File

@@ -1,5 +1,6 @@
-- Lightweight Lua-based 2D GUI framework that emits draw commands
-- and handles interaction for buttons, textboxes, and list views.
local config_resolver = require("config_resolver")
local Gui = {}
-- {r,g,b,a} colors
@@ -126,14 +127,15 @@ function Context:new(options)
options = options or {}
local style = options.style or DEFAULT_STYLE
if options.style == nil and type(config) == "table" then
local guiFont = config.gui_font
local guiFont = config_resolver.resolve_gui_font(config)
if type(guiFont) == "table" and type(guiFont.font_size) == "number" then
style.fontSize = guiFont.font_size
end
end
local opacity = 1.0
if type(config) == "table" and type(config.gui_opacity) == "number" then
opacity = config.gui_opacity
local resolvedOpacity = config_resolver.resolve_gui_opacity(config)
if type(resolvedOpacity) == "number" then
opacity = resolvedOpacity
end
local instance = {
commands = {},