# cis-ash/textreme architecture

> Architecture diagram of the GitHub repository cis-ash/textreme, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cis-ash/textreme
- Repository: https://github.com/cis-ash/textreme

## Overview

##### Main Components

a. Core Editor Layer
- Main editor component (NewEditor/Editor.gd)
- To the base system (Main/Base.gd)

b. Effect System (Major Feature)
- Similar effects (DashEffect, DotEffect, etc.)
- Inheritance from Effect.gd and GenericEffect.gd
- To the MasterEffect controller

c. Input/Interface Components
- Specialized input components:
- SpecialLineEdit
- SpecialTextEdit
- TabEdit
- Their relationship to the main editor

d. Resource Management
- Create sections for:
- FontManager
- SoundManager
- TextEffectManager
- CameraShakeManager

e. File System Integration
- FileSelect and FileDialog components
- Connection to the FilePopupSpawner

##### Specific Implementation Details

a. Layer Structure (top to bottom):
**UI Layer (Scenes/*)**
**↓**
**Core Editor Layer (NewEditor/*)**
**↓**
**Effect System (Effects/*)**
**↓**
**Resource Management Layer (Fonts/, Sounds/, TextResources/)**

b. Following relationships:
- How Effects system integrates with the main editor
- Demonstrate the parameter selection flow (EffectParameterSelector)
- Sound and particle effect triggering paths
- Syntax highlighting system connection (TEXTREME/Syntax/*)

##### Technical Stack Indicators

- Godot Engine (indicated by .tscn files)
- GDScript (indicated by .gd files)
- Resource system (indicated by .tres files)

##### Notes for Scale

- Keep the main editor component central
- Related effects together
- Clear separation between UI, logic, and resource layers
- Potential extension points

Remember to maintain a balance between showing the current architecture and indicating where future expansions (like game integration or advanced code editing features) could be accommodated in the design.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        Editor["Main Editor"]:::core
        Base["Base System"]:::core
        MainScene["Main Scene"]:::core
    end

    subgraph Effects
        MasterEffect["Master Effect Controller"]:::effect
        EffectBase["Base Effect Class"]:::effect
        GenericEffect["Generic Effect"]:::effect
        EffectSelector["Effect Parameter Selector"]:::effect
    end

    subgraph Input
        SLineEdit["Special Line Edit"]:::input
        STextEdit["Special Text Edit"]:::input
        TabEdit["Tab Edit"]:::input
    end

    subgraph ResourceManagement
        FontMgr["Font Manager"]:::resource
        SoundMgr["Sound Manager"]:::resource
        TextEffectMgr["Text Effect Manager"]:::resource
        CameraShakeMgr["Camera Shake Manager"]:::resource
        ParticleSpawner["Particle Effect Spawner"]:::resource
    end

    subgraph FileSystem
        FileSelect["File Select"]:::file
        FileDialog["File Dialog"]:::file
        FilePopup["File Popup Spawner"]:::file
    end

    subgraph Config
        ConfigMgr["Config Manager"]:::config
        ConfigFile["Config File"]:::config
    end

    subgraph SyntaxHighlight
        SyntaxDir["Syntax Directory"]:::syntax
        PySyntax["Python Syntax"]:::syntax
        CsSyntax["C# Syntax"]:::syntax
        RsSyntax["Rust Syntax"]:::syntax
    end

    %% Relationships
    Editor --> Base
    Base --> MainScene
    Editor --> MasterEffect
    MasterEffect --> EffectBase
    EffectBase --> GenericEffect
    MasterEffect --> EffectSelector

    Editor --> SLineEdit
    Editor --> STextEdit
    Editor --> TabEdit

    Base --> FontMgr
    Base --> SoundMgr
    Base --> TextEffectMgr
    Base --> CameraShakeMgr
    Base --> ParticleSpawner

    Editor --> FileSelect
    FileSelect --> FileDialog
    FileSelect --> FilePopup

    Base --> ConfigMgr
    ConfigMgr --> ConfigFile

    Editor --> SyntaxDir
    SyntaxDir --> PySyntax
    SyntaxDir --> CsSyntax
    SyntaxDir --> RsSyntax

    %% Click Events
    click Editor "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/NewEditor/Editor.gd"
    click Base "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/Base.gd"
    click MainScene "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/MainScene.tscn"
    click MasterEffect "https://github.com/cis-ash/TEXTREME/blob/master/Effects/MasterEffect/MasterEffect.gd"
    click EffectBase "https://github.com/cis-ash/TEXTREME/blob/master/Effects/Effect.gd"
    click GenericEffect "https://github.com/cis-ash/TEXTREME/blob/master/Effects/GenericEffect.gd"
    click EffectSelector "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/EffectParameterSelector/EffectParameterSelector.gd"
    click SLineEdit "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/SpecialLineEdit/SpacialLineEdit.gd"
    click STextEdit "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/SpecialTextEdit/SpecialTextEdit.gd"
    click TabEdit "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/TabEdit/TabEdit.gd"
    click FontMgr "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/FontManager.gd"
    click SoundMgr "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/SoundManager.gd"
    click TextEffectMgr "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/TextEffectManager.gd"
    click CameraShakeMgr "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/CameraShakeManager.gd"
    click ParticleSpawner "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/ParticleEffectSpawner.gd"
    click FileSelect "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/FileSelect/Fileselect.gd"
    click FileDialog "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/FileSelect/FileDialog.tscn"
    click FilePopup "https://github.com/cis-ash/TEXTREME/blob/master/Scenes/Main/FilePopupSpawner.gd"
    click ConfigMgr "https://github.com/cis-ash/TEXTREME/blob/master/Scripts/Config.gd"
    click ConfigFile "https://github.com/cis-ash/TEXTREME/blob/master/config.cfg"
    click SyntaxDir "https://github.com/cis-ash/TEXTREME/tree/master/TEXTREME/Syntax/"
    click PySyntax "https://github.com/cis-ash/TEXTREME/blob/master/TEXTREME/Syntax/py-syntax.txt"
    click CsSyntax "https://github.com/cis-ash/TEXTREME/blob/master/TEXTREME/Syntax/cs-syntax.txt"
    click RsSyntax "https://github.com/cis-ash/TEXTREME/blob/master/TEXTREME/Syntax/rs-syntax.txt"

    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef effect fill:#2ecc71,stroke:#27ae60,color:white
    classDef input fill:#e74c3c,stroke:#c0392b,color:white
    classDef resource fill:#f1c40f,stroke:#f39c12,color:black
    classDef file fill:#9b59b6,stroke:#8e44ad,color:white
    classDef config fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef syntax fill:#1abc9c,stroke:#16a085,color:white
```
