Skip to content

Commit 67a63ee

Browse files
Update docs to: Add more pages to docs
1 parent a88f64d commit 67a63ee

4 files changed

Lines changed: 55 additions & 7 deletions

File tree

docs/build.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
## Get Engine
1010

11-
Text Forge built on Godot (v4.4.1.stable.official [49a5bc7b6]), you can get this version from this page:
12-
13-
https://godotengine.org/download/archive/4.4.1-stable
11+
Text Forge built on Godot (v4.4.1.stable.official [49a5bc7b6]), you can get this version from [this page](https://godotengine.org/download/archive/4.4.1-stable).
1412

1513
## Get Source
1614

@@ -26,4 +24,4 @@ Now you can use Godot to import project and edit it, or press `F5` to run projec
2624

2725
!!! Important
2826

29-
If your clone is for conribution, Alway create a new branch for new PRs.
27+
If your clone is for conribution, Always create a new branch for new PRs.

docs/data_driven_ui.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Explanation about Text Forge "Data Driven UI"
2+
3+
Text Forge uses a data driven system for important parts UI, including menu options and texts. This architecture make
4+
a dynamic UI and clean translation system.
5+
6+
## Menus
7+
8+
All data related to menus stored in `data/main_ui.ini`, this file have a section for menus and a key for each menu (or
9+
submenu). Each item is an array of dictionaries and each dictionary has the following structure:
10+
11+
- `"code"` - a unique integer for connect this option to its action script, its value can be any non-negative int bug must
12+
be unique.
13+
- `"text"` - english text of option, it will be used for add name to action scripts and call them based on names.
14+
- `"key"` - linked translation key in translation file, menu loader will use it to set item text.
15+
- `"type"` - an integer related to option type, this key can have these values:
16+
- `-1` - Separator
17+
- `0` - Regular (this is default value, so items with `0` type haven't `"type"` key)
18+
- `1` - Submenu
19+
- `2` - Checkbox
20+
- `3` - Radio Checkbox
21+
22+
Each key must have `_menu` or `_submenu` suffix, items with `_menu` suffix will load in main menu and items with `_submenu`
23+
suffix will load as submenus based on texts, for example `Convert Case` submenu in `Edit` menu will load from `convert_case_submenu`
24+
key (snake case of submenu text with suffix).
25+
26+
## Panels
27+
28+
To handle panels, we have `data/panels/` folder. Here, each panel have a folder with icon, configuration file, and scene.
29+
In config file, we have place of panel (`R`, `L`, or `B`). Panel manager will load panels from here based on configuration
30+
file and stored files.

docs/object_oriented_design.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Object Oriented Design
2+
3+
This page explains meaning and examples of OOP in Text Forge architecture.
4+
5+
## OOP in Text Forge, what and why?
6+
7+
We have a lot of concepts from XP (extreme programming) in Text Forge architecture to have very clean codebase,
8+
and OOP is a tool for make them real; So we have an object-oriented like core for Text Forge (based on Godot
9+
limitations), it means everything in Text Forge are objects.
10+
11+
Also, we have a modular design to make Text Forge easy and sustainable expansion, OOP and its principles allow us to
12+
develop modules stable and powerful. (though the Godot structure creates restrictions)
13+
14+
## How we use OOP?
15+
16+
We use the Godot nodes system and object sampling to dynamically load the editor components, this can affect speed but
17+
maintain the editor's expansion. All in all, any module added to the editor (and its default modules) is a set of
18+
objects that are connected by the Godot scene tree and can communicate with other modules.

mkdocs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ nav:
2424
- Introduction:
2525
- Introduction: introduction.md
2626
- Setup: setup.md
27-
- Structure:
28-
- Modes: modes.md
29-
- Action Scripts: action_scripts.md
27+
- Architecture:
28+
- Data Driven UI: data_driven_ui.md
29+
- Object Oriented Design: object_oriented_design.md
30+
- Modes: modes.md
31+
- Action Scripts: action_scripts.md
3032
- Developer Guides:
3133
- Contributing Guide: contributing.md
3234
- Contribution Types: contribution_types.md

0 commit comments

Comments
 (0)