# jacobtheidiot/dbd-crosshair-overlay architecture

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

- Interactive diagram: https://gitdiagram.com/jacobtheidiot/dbd-crosshair-overlay
- Repository: https://github.com/jacobtheidiot/dbd-crosshair-overlay

## Overview

DbD Crosshair Overlay is a Windows overlay for customizing a centered crosshair in Dead by Daylight. The main workflow finds the game window, attaches the overlay with the GUI initializer, exposes crosshair settings, and draws the selected crosshair each frame; right-click gating is optional. The README also documents hiding the overlay from capture software. The graph groups the bundled OS-ImGui and Dear ImGui runtime layers rather than mapping their internal helpers individually. Some integration implementation files were not excerpted, so uncertain internal links are omitted.

Main entry points: [`src/main.cpp`](https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/main.cpp) (Window startup), [`ext/OS-ImGui-master/OS-ImGui`](https://github.com/jacobtheidiot/dbd-crosshair-overlay/tree/master/ext/OS-ImGui-master/OS-ImGui) (Overlay runtime), [`src/gui/gui.cpp`](https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/gui/gui.cpp) (Settings GUI), [`src/features/crosshair.cpp`](https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/features/crosshair.cpp) (Crosshair renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Overlay application"]
  node_entry["Window startup<br/>[main.cpp]"]
end

subgraph group_features["Crosshair features"]
  node_settings["Crosshair settings<br/>[config.h]"]
  node_gui["Settings GUI<br/>[gui.cpp]"]
  node_draw["Crosshair renderer<br/>[crosshair.cpp]"]
end

subgraph group_platform["Overlay platform"]
  node_osimgui["Overlay runtime"]
  node_minhook["MinHook library"]
end

subgraph group_ui["Dear ImGui runtime"]
  node_imgui["ImGui core"]
end

node_user(("Overlay user"))
node_game["Dead by Daylight"]

node_user -->|"starts"| node_entry
node_entry -->|"finds window"| node_game
node_entry -->|"attaches overlay"| node_osimgui
node_entry -->|"registers initializer"| node_gui
node_user -->|"adjusts settings"| node_gui
node_gui -->|"updates"| node_settings
node_gui -->|"invokes each frame"| node_draw
node_draw -->|"reads"| node_settings
node_osimgui -.->|"uses UI runtime"| node_imgui
node_osimgui -->|"references hooking API"| node_minhook
node_osimgui -->|"overlays window"| node_game

click node_entry "https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/main.cpp"
click node_settings "https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/config/config.h"
click node_gui "https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/gui/gui.cpp"
click node_draw "https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/features/crosshair.cpp"
click node_osimgui "https://github.com/jacobtheidiot/dbd-crosshair-overlay/tree/master/ext/OS-ImGui-master/OS-ImGui"
click node_minhook "https://github.com/jacobtheidiot/dbd-crosshair-overlay/tree/master/ext/OS-ImGui-master/OS-ImGui/Minhook"
click node_imgui "https://github.com/jacobtheidiot/dbd-crosshair-overlay/tree/master/ext/OS-ImGui-master/OS-ImGui/imgui"

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_entry,node_user toneBlue
class node_settings,node_gui,node_draw toneAmber
class node_osimgui,node_minhook toneMint
class node_imgui toneRose
class node_game toneIndigo
```

## Components

### Overlay application

- [Window startup](https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/main.cpp): `src/main.cpp`

### Crosshair features

- [Crosshair settings](https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/config/config.h): `src/config/config.h`
- [Settings GUI](https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/gui/gui.cpp): `src/gui/gui.cpp`
- [Crosshair renderer](https://github.com/jacobtheidiot/dbd-crosshair-overlay/blob/master/src/features/crosshair.cpp): `src/features/crosshair.cpp`

### Overlay platform

- [Overlay runtime](https://github.com/jacobtheidiot/dbd-crosshair-overlay/tree/master/ext/OS-ImGui-master/OS-ImGui): `ext/OS-ImGui-master/OS-ImGui`
- [MinHook library](https://github.com/jacobtheidiot/dbd-crosshair-overlay/tree/master/ext/OS-ImGui-master/OS-ImGui/Minhook): `ext/OS-ImGui-master/OS-ImGui/Minhook`

### Dear ImGui runtime

- [ImGui core](https://github.com/jacobtheidiot/dbd-crosshair-overlay/tree/master/ext/OS-ImGui-master/OS-ImGui/imgui): `ext/OS-ImGui-master/OS-ImGui/imgui`

### Other components

- **Overlay user**
- **Dead by Daylight**

## Connections

- Overlay user → Window startup: starts
- Window startup → Dead by Daylight: finds window (evidence: `src/main.cpp`)
- Window startup → Overlay runtime: attaches overlay (evidence: `src/main.cpp`)
- Window startup → Settings GUI: registers initializer (evidence: `src/main.cpp`)
- Overlay user → Settings GUI: adjusts settings (evidence: `src/gui/gui.cpp`)
- Settings GUI → Crosshair settings: updates (evidence: `src/gui/gui.cpp`)
- Settings GUI → Crosshair renderer: invokes each frame (evidence: `src/gui/gui.cpp`)
- Crosshair renderer → Crosshair settings: reads (evidence: `src/features/crosshair.cpp`)
- Overlay runtime → ImGui core: uses UI runtime (evidence: `ext/OS-ImGui-master/OS-ImGui/imgui/imgui_widgets.cpp`)
- Overlay runtime → MinHook library: references hooking API (evidence: `ext/OS-ImGui-master/OS-ImGui/OS-ImGui_Internal.h`)
- Overlay runtime → Dead by Daylight: overlays window
