mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 21:55:09 +00:00
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:
@@ -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 = {},
|
||||
|
||||
Reference in New Issue
Block a user