Skip to content

Commit bc8dfd4

Browse files
committed
Add missing properties
1 parent 60f70d0 commit bc8dfd4

File tree

18 files changed

+634
-104
lines changed

18 files changed

+634
-104
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
.import/
66
export.cfg
77
export_presets.cfg
8-
example-project/Addons/*
9-
!example-project/Addons/AddonGoesHere
108

119
# Build results
1210
[Dd]ebug/
@@ -24,7 +22,6 @@ bld/
2422
[Ll]og/
2523
[Ll]ogs/
2624

27-
.antlr
2825
*.vsix
2926
*.uid
3027
*/bin/*

GameDialog.Generator/GameDialog.Generator.sln

Lines changed: 0 additions & 37 deletions
This file was deleted.

GameDialog.Runner/DialogReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ internal string ParseEventsFromText(string text, List<TextEvent> textEvents)
753753
charIdx++;
754754
}
755755

756-
if (_sb.Length == 0)
756+
if (_sb.Length == 0 && appendStart == 0)
757757
return text;
758758

759759
_sb.Append(line[appendStart..]);

GameDialog/GameDialog.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
<IlcDisableReflection>true</IlcDisableReflection>
1616

1717
<Title>GameDialog</Title>
18-
<Version>0.0.1</Version>
18+
<Version>0.0.2</Version>
1919
<Description>A game dialog library for use with Godot.</Description>
2020
<Copyright>© 2026 Mark DiBarry</Copyright>
2121
<Authors>Mark DiBarry</Authors>
2222
<Company>Mark DiBarry</Company>
2323

2424
<PackageId>GameDialog</PackageId>
25-
<PackageReleaseNotes>GameDialog release.</PackageReleaseNotes>
25+
<PackageReleaseNotes>Line tag append fix.</PackageReleaseNotes>
2626
<PackageIcon>icon.png</PackageIcon>
2727
<PackageTags>dialog;generator;godot;gamedev</PackageTags>
2828
<PackageReadmeFile>README.md</PackageReadmeFile>
2929
<PackageLicenseFile>LICENSE</PackageLicenseFile>
3030
<PackageProjectUrl>https://github.com/markdibarry/game-dialog</PackageProjectUrl>
3131

3232
<RepositoryType>git</RepositoryType>
33-
<RepositoryUrl>git@github.com:markdibarry/game-dialog.git</RepositoryUrl>
33+
<RepositoryUrl>https://github.com/markdibarry/game-dialog.git</RepositoryUrl>
3434
</PropertyGroup>
3535

3636
<ItemGroup>

README.md

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

33
A free game dialog language I'm making for my personal game framework. Obligatory "this is a WIP and probably only works on my machine".
44

5-
## Docs (WIP)
5+
## Docs
66

7-
- [API](/docs/api/GameDialog.Runner.md)
8-
- [Setup](/docs/Setup.md)
9-
- [Scripts](/docs/Scripts.md)
7+
- [API](https://github.com/markdibarry/game-dialog/blob/main/docs/api/GameDialog.Runner.md)
8+
- [Setup](https://github.com/markdibarry/game-dialog/blob/main/docs/Setup.md)
9+
- [Scripts](https://github.com/markdibarry/game-dialog/blob/main/docs/Scripts.md)
10+
11+
## Requirements
12+
13+
.NET 10.0
14+
Godot 4.5+

docs/Scripts.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ Stalone: ^^It all started on a Fall night a couple
3434
everyone seemed tense.^^
3535
```
3636

37+
```gamedialog
38+
--PretzelExposition--
39+
Stalone: ^^
40+
Soft pretzels come in many shapes and sizes.
41+
Super Preztels are the classic variety, but
42+
a fresh-baked, buttery Amish-style is great too.
43+
^^
44+
```
45+
3746
## Comments
3847

3948
You can add comments using two forward slashes `//`:
@@ -196,7 +205,6 @@ Stalone: What's your favorite breakfast food?
196205
197206
--Waffles--
198207
Stalone: Waffles are my favorite too!
199-
[end]
200208
201209
--Pancakes--
202210
Stalone: Pancakes are good, but have you tried waffles?
@@ -227,7 +235,7 @@ to make a partial class with the `[DialogBridge]` attribute. The source generato
227235
workspace for any matching class, and then grab all compatible methods and properties inside,
228236
generating logic so that they can be referenced at runtime.
229237

230-
All methods and properties must be public and unique across all classes the `DialogBridge`
238+
All methods and properties must be public and unique across all classes with the `DialogBridge`
231239
attribute. Compatible types for properties and method parameters include `string`, `bool`, and
232240
`float`. Method return types include `string`, `bool`, `float`, `void`, `Task`, and `ValueTask`.
233241

docs/Setup.md

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
# Setup
22

3-
The GameDialog nuget package is available here. The VSCode/VSCodium extension is available here.
3+
## Nuget package
44

5-
## Example Project
5+
The GameDialog nuget package is [available here](https://www.nuget.org/packages/GameDialog/),
6+
by looking in the normal nuget.org search, or downloading from the GitHub release.
67

7-
Included in this repo is an example project. Just copy the "example-project" folder and run it in
8-
your Godot editor.
8+
Once you have the nuget package installed, you'll have access to the GameDialog class library and
9+
source generator. You may notice that there is no built in dialog box or choice menu display.
10+
Dialog systems tend to be just as bespoke as menu systems, so it's intentionally not
11+
implemented to allow the user more freedom in how this system is used. However, A custom
12+
`RichTextLabel` node (`DialogTextLabel`) is provided to support some of the built-in tags.
913

1014
## VSCode Extension
1115

1216
This dialog system comes with a VSCode extension. The extension provides validation and syntax
1317
highlighting for .dia files. It also provides a context menu for .dia files to generate .csv and/or
14-
.pot files for translations. To install, navigate to the directory the .vsix file is in and run:
18+
.pot files for translations. If custom members are changed in your session, right click on any .dia file and select
19+
`Update Members` for the extension to pick up the changes.
20+
21+
### How to install
22+
23+
The VSCode/VSCodium extension is available in the GitHub release (GameDialog_Extension.vsix). To
24+
install, navigate to the directory the .vsix file is in and run:
1525

1626
```
1727
code --install-extension GameDialog_Extension.vsix
@@ -21,37 +31,49 @@ code --install-extension GameDialog_Extension.vsix
2131
codium --install-extension GameDialog_Extension.vsix
2232
```
2333

24-
If custom members are changed in your session, right click on any .dia file and select
25-
`Update Members` for the extension to pick up the changes.
34+
### Why do I have to download it?
2635

27-
## Nuget package
36+
In order to publish a Nuget package, you must have a Microsoft account.
2837

29-
Once you have the nuget package installed, you'll have access to the GameDialog class library and
30-
source generator. You may notice that there is no built in dialog box or choice menu display.
31-
Dialog systems tend to be just as bespoke as menu systems, so it's intentionally not
32-
implemented to allow the user more freedom in how this system is used. However, A custom
33-
`RichTextLabel` node (`DialogTextLabel`) is provided to support some of the built-in tags.
38+
In order to publish a VS Code extension, you must:
39+
* Have an MS account
40+
* Have an Azure account
41+
* Maintain an Azure subscription
42+
* Create and maintain an organization
43+
* Create and maintain a publisher
44+
45+
And you must do the same with different orgs for VSCodium. The alternative is I just provide it
46+
here, you download it and install via the above.
47+
48+
## Example Project
49+
50+
Included in this repo is an example project. Just copy the "example-project" folder and run it in
51+
your Godot editor.
3452

3553
### Starting a dialog
3654

3755
For the included example project, a `DialogBox` node was made that creates a new `Dialog` instance
38-
in its `_Ready()` method. You'll notice there are events to subscribe to that define what you want to
39-
happen at certain points in a script. The events are:
56+
in its `_Ready()` method. There are events to subscribe to that define what you want to happen at
57+
certain points in a script. The events are:
4058

4159
* `DialogLineStarted`
4260
* `DialogLineResumed`
4361
* `ChoiceRead`
4462
* `HashRead`
4563
* `ScriptEnded`
4664

47-
These can be read about in depth in the [api section](./api/GameDialog.Runner.md).
65+
These can be read about in depth in the [API section](./api/GameDialog.Runner.Dialog.md#events).
4866

4967
### Displaying the dialog
5068

51-
In the example project's `DialogBox` scene, a `DialogTextLabel` displays the text. You can use
52-
`Dialog.SetTextAndFillEvents()` to set the text parse the text events and
53-
`Dialog.HandleTextEvent()` to handle text events when they're encountered. Making a text writer can
54-
be difficult, however, so a custom one (`DialogTextLabel`) is provided. Godot doesn't allow using custom nodes from other C# libraries, but if you make a class with a `[DialogTextLabel]` attribute,
55-
you should get a warning with a code fix to automatically generate one for your own use.
69+
In the example project's `DialogBox` scene, a `DialogTextLabel` displays the text. In its. Making a
70+
text writer can be difficult, however, so a custom one (`DialogTextLabel`) is provided. Godot
71+
doesn't allow using custom nodes from other C# libraries, but if you make a class with a
72+
`[DialogTextLabel]` attribute, you should get a warning with a code fix to automatically generate
73+
one for your own use. Alternatively, just copy the
74+
[DialogTextLabel.cs](../GameDialog.Runner/DialogTextLabel.cs) file into your project.
75+
76+
>For info on the methods/properties/events provided in the example writer, check the
77+
[API](./api/GameDialog.Runner.DialogTextLabel.md).
5678

5779
> For more on creating a script, see the [Creating a Script](./Scripts.md) section.

docs/api/GameDialog.Runner.Dialog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public void Resume()
208208

209209
### <a id="GameDialog_Runner_Dialog_Resume_System_Int32_"></a> Resume\(int\)
210210

211-
Resumes the dialog.
211+
Resumes the dialog to the provided line index.
212212

213213
```csharp
214214
public void Resume(int nextIndex)

docs/api/GameDialog.Runner.DialogTextLabel.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ public float AutoProceedTimeout { get; set; }
4646

4747
[float](https://learn.microsoft.com/dotnet/api/system.single)
4848

49+
### <a id="GameDialog_Runner_DialogTextLabel_CachedText"></a> CachedText
50+
51+
Gets a cached RichTextLabel.Text.
52+
53+
```csharp
54+
public string CachedText { get; }
55+
```
56+
57+
#### Property Value
58+
59+
[string](https://learn.microsoft.com/dotnet/api/system.string)
60+
4961
### <a id="GameDialog_Runner_DialogTextLabel_CharsPerSecond"></a> CharsPerSecond
5062

5163
The speed, in characters per second, at which characters are written.
@@ -83,6 +95,18 @@ public bool IsSpeedUpEnabled { get; set; }
8395

8496
[bool](https://learn.microsoft.com/dotnet/api/system.boolean)
8597

98+
### <a id="GameDialog_Runner_DialogTextLabel_PauseTimer"></a> PauseTimer
99+
100+
The amount of time left, in seconds, before the next char is written.
101+
102+
```csharp
103+
public double PauseTimer { get; set; }
104+
```
105+
106+
#### Property Value
107+
108+
[double](https://learn.microsoft.com/dotnet/api/system.double)
109+
86110
### <a id="GameDialog_Runner_DialogTextLabel_ResetButton"></a> ResetButton
87111

88112
A helper export button to reset the DialogTextLabel.
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1-
--Intro--
2-
Devs: Thanks for checking out my dialog system! This is the simplest script you can make!
3-
Devs: Take a look in the DialogScripts folder to follow along!
1+
// --Intro--
2+
// Devs: Thanks for checking out my dialog system! This is the simplest script you can make!
3+
// Devs: Take a look in the DialogScripts folder to follow along!
4+
5+
--Greeting--
6+
Stalone: What's your favorite breakfast food?
7+
? Waffles.
8+
[goto Waffles]
9+
? Pancakes.
10+
[goto Pancakes]
11+
12+
--Waffles--
13+
Stalone: Waffles are my favorite too!
14+
15+
--Pancakes--
16+
Stalone: Pancakes are good, but have you tried waffles?

0 commit comments

Comments
 (0)