# daitergg/radical_ui architecture

> Architecture diagram of the GitHub repository daitergg/radical_ui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/daitergg/radical_ui
- Repository: https://github.com/daitergg/radical_ui

## Overview

Radical UI is a Lua GUI layer for an open-source game. Its documented composition workflow builds a UI element from widgets, supplies alignment (including an animation), and configures display styling; the README also advertises blur, polylines, and hot reload with error checking. The tree identifies additional view, input, gameplay, and settings modules, but no source excerpts were provided, so their call relationships—and the implementations of some advertised features—cannot be verified here.

Main entry points: [`ui_element.lua`](https://github.com/daitergg/radical_ui/blob/main/ui_element.lua) (UI Element), [`box.lua`](https://github.com/daitergg/radical_ui/blob/main/box.lua) (Box Widget), [`apply_align.lua`](https://github.com/daitergg/radical_ui/blob/main/apply_align.lua) (Alignment), [`animation_registry.lua`](https://github.com/daitergg/radical_ui/blob/main/animation_registry.lua) (Animations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_composition["UI Composition"]
  node_ui_element["UI Element<br/>[ui_element.lua]"]
  node_box["Box Widget<br/>[box.lua]"]
  node_widget["Widget System<br/>[widget.lua]"]
  node_widget_registry["Widget Registry"]
  node_align["Alignment<br/>[apply_align.lua]"]
  node_animation["Animations"]
  node_animation_settings["Animation Settings"]
  node_background["Background Effects<br/>[background.lua]"]
  node_polyline_collision["Polyline Collision"]
  node_hot_reload["UI Hot Reload<br/>[ui_hot_reload.lua]"]
end

subgraph group_views["Views and Styling"]
  node_ui_manager["UI Manager<br/>[ui_manager.lua]"]
  node_view["View Framework<br/>[view.lua]"]
  node_main_view["Main View<br/>[main_view.lua]"]
  node_style_display["Display Styling<br/>[style_display.lua]"]
end

subgraph group_interaction["Input and Actions"]
  node_input["Input Handling<br/>[input_state.lua]"]
  node_keybinding["Keybinding<br/>[keybinding.lua]"]
  node_actions["Actions<br/>[actions.lua]"]
end

subgraph group_runtime["Game Runtime"]
  node_gameplay["Gameplay UI<br/>[gameplay.lua]"]
  node_game_api["Game API<br/>[game_api.lua]"]
  node_beatmaps["Beatmaps<br/>[beatmaps.lua]"]
  node_settings["Settings<br/>[settings.lua]"]
end

node_player(("Player"))

node_ui_element -->|"uses widget"| node_box
node_ui_element -->|"uses alignment"| node_align
node_ui_element -->|"configures animation"| node_animation
node_player -.->|"uses interface"| node_main_view

click node_ui_element "https://github.com/daitergg/radical_ui/blob/main/ui_element.lua"
click node_box "https://github.com/daitergg/radical_ui/blob/main/box.lua"
click node_widget "https://github.com/daitergg/radical_ui/blob/main/widget.lua"
click node_widget_registry "https://github.com/daitergg/radical_ui/blob/main/widget_registry.lua"
click node_align "https://github.com/daitergg/radical_ui/blob/main/apply_align.lua"
click node_animation "https://github.com/daitergg/radical_ui/blob/main/animation_registry.lua"
click node_animation_settings "https://github.com/daitergg/radical_ui/blob/main/animation_settings.lua"
click node_background "https://github.com/daitergg/radical_ui/blob/main/background.lua"
click node_polyline_collision "https://github.com/daitergg/radical_ui/blob/main/polyline_collision.lua"
click node_hot_reload "https://github.com/daitergg/radical_ui/blob/main/ui_hot_reload.lua"
click node_ui_manager "https://github.com/daitergg/radical_ui/blob/main/ui_manager.lua"
click node_view "https://github.com/daitergg/radical_ui/blob/main/view/view.lua"
click node_main_view "https://github.com/daitergg/radical_ui/blob/main/view/main_view.lua"
click node_style_display "https://github.com/daitergg/radical_ui/blob/main/view/style_display.lua"
click node_input "https://github.com/daitergg/radical_ui/blob/main/input_state.lua"
click node_keybinding "https://github.com/daitergg/radical_ui/blob/main/keybinding.lua"
click node_actions "https://github.com/daitergg/radical_ui/blob/main/actions.lua"
click node_gameplay "https://github.com/daitergg/radical_ui/blob/main/gameplay.lua"
click node_game_api "https://github.com/daitergg/radical_ui/blob/main/game_api.lua"
click node_beatmaps "https://github.com/daitergg/radical_ui/blob/main/beatmaps.lua"
click node_settings "https://github.com/daitergg/radical_ui/blob/main/settings.lua"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ui_element,node_box,node_widget,node_widget_registry,node_align,node_animation,node_animation_settings,node_background,node_polyline_collision,node_hot_reload toneBlue
class node_ui_manager,node_view,node_main_view,node_style_display toneAmber
class node_input,node_keybinding,node_actions toneMint
class node_gameplay,node_game_api,node_beatmaps,node_settings toneRose
class node_player toneIndigo
```

## Components

### UI Composition

- [UI Element](https://github.com/daitergg/radical_ui/blob/main/ui_element.lua): `ui_element.lua`
- [Box Widget](https://github.com/daitergg/radical_ui/blob/main/box.lua): `box.lua`
- [Widget System](https://github.com/daitergg/radical_ui/blob/main/widget.lua): `widget.lua`
- [Widget Registry](https://github.com/daitergg/radical_ui/blob/main/widget_registry.lua): `widget_registry.lua`
- [Alignment](https://github.com/daitergg/radical_ui/blob/main/apply_align.lua): `apply_align.lua`
- [Animations](https://github.com/daitergg/radical_ui/blob/main/animation_registry.lua): `animation_registry.lua`
- [Animation Settings](https://github.com/daitergg/radical_ui/blob/main/animation_settings.lua): `animation_settings.lua`
- [Background Effects](https://github.com/daitergg/radical_ui/blob/main/background.lua): `background.lua`
- [Polyline Collision](https://github.com/daitergg/radical_ui/blob/main/polyline_collision.lua): `polyline_collision.lua`
- [UI Hot Reload](https://github.com/daitergg/radical_ui/blob/main/ui_hot_reload.lua): `ui_hot_reload.lua`

### Views and Styling

- [UI Manager](https://github.com/daitergg/radical_ui/blob/main/ui_manager.lua): `ui_manager.lua`
- [View Framework](https://github.com/daitergg/radical_ui/blob/main/view/view.lua): `view/view.lua`
- [Main View](https://github.com/daitergg/radical_ui/blob/main/view/main_view.lua): `view/main_view.lua`
- [Display Styling](https://github.com/daitergg/radical_ui/blob/main/view/style_display.lua): `view/style_display.lua`

### Input and Actions

- [Input Handling](https://github.com/daitergg/radical_ui/blob/main/input_state.lua): `input_state.lua`
- [Keybinding](https://github.com/daitergg/radical_ui/blob/main/keybinding.lua): `keybinding.lua`
- [Actions](https://github.com/daitergg/radical_ui/blob/main/actions.lua): `actions.lua`

### Game Runtime

- [Gameplay UI](https://github.com/daitergg/radical_ui/blob/main/gameplay.lua): `gameplay.lua`
- [Game API](https://github.com/daitergg/radical_ui/blob/main/game_api.lua): `game_api.lua`
- [Beatmaps](https://github.com/daitergg/radical_ui/blob/main/beatmaps.lua): `beatmaps.lua`
- [Settings](https://github.com/daitergg/radical_ui/blob/main/settings.lua): `settings.lua`

### Other components

- **Player**

## Connections

- UI Element → Box Widget: uses widget (evidence: `README.md`)
- UI Element → Alignment: uses alignment (evidence: `README.md`)
- UI Element → Animations: configures animation (evidence: `README.md`)
- Player → Main View: uses interface
