Skip to content

Add Debug Overlay with runtime element inspection and extractor registry - #36

Merged
ABKQPO merged 10 commits into
masterfrom
debug-mode
Jul 3, 2026
Merged

Add Debug Overlay with runtime element inspection and extractor registry#36
ABKQPO merged 10 commits into
masterfrom
debug-mode

Conversation

@ABKQPO

@ABKQPO ABKQPO commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds a GUI Debug Overlay (Debug Mode) to GuideNH that helps developers and content creators inspect, pick, and export detailed information about guide pages and scene elements at runtime.

Key capabilities

  • Toggleable GUI debug overlay (hotkey: Ctrl + Shift + Alt + C) with persistent config switches.

  • Left-bottom information panel showing FPS, memory usage, mouse coordinates, hovered element details, and parent element information.

  • Center-bottom debug control panel for toggling display options, printing the document tree, recompiling the current page, and exporting debug data.

  • Precise runtime element picking through deep traversal, including support for:

    • DebugComponent for sub-components (tabs, scene buttons, chart parts).
    • DebugFlowContainer for inline flow elements (images, links, text, LaTeX).
    • InterpolatedViewport for animated scroll/zoom-aware hit testing.
  • Registry-based DebugInfoExtractor system with built-in extractors for documents, paragraphs, headings, items, images, charts, Mermaid diagrams, scenes, code blocks, LaTeX, containers, and generic fallback handling.

  • Animated debug visualization with configurable dashed outlines, cursor markers, colors, scale, line thickness, and animation parameters.

  • PerformanceMonitor for FPS and memory sampling, and TreePrinter for structured document tree output.

  • Integration with GuideScreen and SceneEditorScreen for overlay rendering and debug input handling.

  • New localization entries (en_US, zh_CN) and wiki documentation for Debug Mode.

  • Configurable debug options under ModConfig.Debug, with debug logic gated to minimize overhead when disabled.

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@ABKQPO ABKQPO added the New Feature Add something new. Please explain in detail how it works. label Jul 2, 2026
@ABKQPO
ABKQPO merged commit 69d0102 into master Jul 3, 2026
1 check passed
@ABKQPO
ABKQPO deleted the debug-mode branch July 3, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature Add something new. Please explain in detail how it works.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant