Skip to content

Commit

Permalink
Merge pull request #355 from Thraka/vnext
Browse files Browse the repository at this point in the history
Update readme and templates
  • Loading branch information
Thraka authored Dec 8, 2024
2 parents 520fe2b + 53139ed commit e94f37e
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 86 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SadConsole is a C#-based .NET cross-platform terminal, ascii, console, game engi

While SadConsole is a generic library that doesn't provide any rendering capabilities, "host" libraries are provided that add renderers to SadConsole. The two hosts provided by this library are for **SadConsole.Host.MonoGame** and **SadConsole.Host.SFML**. When adding a host library to your project, you don't need to reference the base **SadConsole** package. If you use MonoGame, you'll also need to add a rendering NuGet package, such as **MonoGame.Framework.DesktopGL**.

_SadConsole currently targets .NET 6, .NET 7, and .NET 8_
_SadConsole currently targets .NET 6, .NET 7, .NET 8, and .NET 9_

For the latest changes in this release, see the [notes below](#latest-changes)

Expand Down Expand Up @@ -119,11 +119,9 @@ End Module

## Latest changes

v10.4.2 (10/23/2024)

- [Core] Fixed small bug when cursor's effect was removed.
- [Core] `StringParser`'s base command object has a virtual `Removed` method.
- [Core] `StringParser`'s Recolor command can use 'w' in place of length to specify that it recolors 'word' length: until a space or \0 character is reached.
- [Core] `StringParser`'s Blink command now has the blink effect `RestoreCellOnRemoved` set to true.
- [Core] `NamedColor` supporting type which is just a collection of named color values for serialization.
- [Core] Fix some spelling errors.
- [All] Add .NET 9 target. This will be the last release for .NET 6 and .NET 7.
- [Core] Some components that used their own renderers weren't disposing the ones they replaced.
- [UI] Fix bug with mouse moving over composite controls such as the list box.
- [Extended] Rework `DebugMouseTint` class and add `DebugFocusedTint` class. Both settable as configuration builder options now.
- [MonoGame] Use `TitleContainer` for serialization. This was previously removed for some reason. Configurable through the `UseTitleContainer` configuration builder option.
- [Debug Library] Release the first version of the `SadConsole.Debug.MonoGame` library. This also adds general **ImGui** support.
66 changes: 0 additions & 66 deletions SadConsole/SadConsole.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2759,23 +2759,6 @@
</summary>
<returns>The string "Console".</returns>
</member>
<member name="T:SadConsole.Debug.Screen">
<summary>
A debugging screen that takes the place of the active <see cref="P:SadConsole.GameHost.Screen"/> and displays information about SadConsole.
</summary>
</member>
<member name="M:SadConsole.Debug.Screen.Show(SadConsole.IFont,SadRogue.Primitives.Point)">
<summary>
Displays the debugger.
</summary>
<param name="font">The font to use the debugging screen.</param>
<param name="fontSize">The size of the font.</param>
</member>
<member name="M:SadConsole.Debug.Screen.Show">
<summary>
Shows the debug screen with the default font and size.
</summary>
</member>
<member name="T:SadConsole.DrawCalls.DrawCallCustom">
<summary>
A draw call that invokes an <see cref="T:System.Action"/> delegate.
Expand Down Expand Up @@ -11056,16 +11039,6 @@
<param name="errorMessage">A message to provide to the result if the validation fails.</param>
<returns>The validation result.</returns>
</member>
<member name="M:SadConsole.StringValidation.LettersOnly">
<remarks>
Pattern:<br/>
<code>[a-zA-Z]</code><br/>
Explanation:<br/>
<code>
○ Match a character in the set [A-Za-z].<br/>
</code>
</remarks>
</member>
<member name="T:SadConsole.UI.AdjustableColor">
<summary>
A color that can be adjusted by brightness and mapped to a <see cref="T:SadConsole.UI.Colors"/> color.
Expand Down Expand Up @@ -15125,44 +15098,5 @@
<param name="text">The text to use for the colored string.</param>
<returns>A new colored string object.</returns>
</member>
<member name="T:System.Text.RegularExpressions.Generated.LettersOnly_0">
<summary>Custom <see cref="T:System.Text.RegularExpressions.Regex"/>-derived type for the LettersOnly method.</summary>
</member>
<member name="F:System.Text.RegularExpressions.Generated.LettersOnly_0.Instance">
<summary>Cached, thread-safe singleton instance.</summary>
</member>
<member name="M:System.Text.RegularExpressions.Generated.LettersOnly_0.#ctor">
<summary>Initializes the instance.</summary>
</member>
<member name="T:System.Text.RegularExpressions.Generated.LettersOnly_0.RunnerFactory">
<summary>Provides a factory for creating <see cref="T:System.Text.RegularExpressions.RegexRunner"/> instances to be used by methods on <see cref="T:System.Text.RegularExpressions.Regex"/>.</summary>
</member>
<member name="M:System.Text.RegularExpressions.Generated.LettersOnly_0.RunnerFactory.CreateInstance">
<summary>Creates an instance of a <see cref="T:System.Text.RegularExpressions.RegexRunner"/> used by methods on <see cref="T:System.Text.RegularExpressions.Regex"/>.</summary>
</member>
<member name="T:System.Text.RegularExpressions.Generated.LettersOnly_0.RunnerFactory.Runner">
<summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
</member>
<member name="M:System.Text.RegularExpressions.Generated.LettersOnly_0.RunnerFactory.Runner.Scan(System.ReadOnlySpan{System.Char})">
<summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
<param name="inputSpan">The text being scanned by the regular expression.</param>
</member>
<member name="M:System.Text.RegularExpressions.Generated.LettersOnly_0.RunnerFactory.Runner.TryFindNextPossibleStartingPosition(System.ReadOnlySpan{System.Char})">
<summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
<param name="inputSpan">The text being scanned by the regular expression.</param>
<returns>true if a possible match was found; false if no more matches are possible.</returns>
</member>
<member name="T:System.Text.RegularExpressions.Generated.Utilities">
<summary>Helper methods used by generated <see cref="T:System.Text.RegularExpressions.Regex"/>-derived implementations.</summary>
</member>
<member name="F:System.Text.RegularExpressions.Generated.Utilities.s_defaultTimeout">
<summary>Default timeout value set in <see cref="T:System.AppContext"/>, or <see cref="F:System.Text.RegularExpressions.Regex.InfiniteMatchTimeout"/> if none was set.</summary>
</member>
<member name="F:System.Text.RegularExpressions.Generated.Utilities.s_hasTimeout">
<summary>Whether <see cref="F:System.Text.RegularExpressions.Generated.Utilities.s_defaultTimeout"/> is non-infinite.</summary>
</member>
<member name="F:System.Text.RegularExpressions.Generated.Utilities.s_asciiLetters">
<summary>Supports searching for characters in or not in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".</summary>
</member>
</members>
</doc>
38 changes: 36 additions & 2 deletions nuget/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,41 @@ if ($foundPackage){
$projects = "SadConsole.Extended", "SadConsole.Host.MonoGame", "SadConsole.Host.SFML", "SadConsole.Host.FNA", "SadConsole.Debug.MonoGame"

foreach ($project in $projects) {

# SadConsole Extended

# Special condition for debug package
if ($project -eq "SadConsole.Debug.MonoGame") {


$timeout = New-TimeSpan -Minutes 10
$timer = [Diagnostics.StopWatch]::StartNew()
[Boolean]$foundPackage = $false

Write-Output "Processing SadConsole.Debug.MonoGame project, waiting on MonoGame host package"

# Loop searching for the new MonoGame package
while ($timer.elapsed -lt $timeout){

$existingVersions = (Invoke-WebRequest "https://api-v2v3search-0.nuget.org/query?q=PackageId:SadConsole.Host.MonoGame&prerelease=true").Content | ConvertFrom-Json

if ($existingVersions.totalHits -eq 0) {
throw "Unable to get any results from NuGet"
}

if ($null -eq ($existingVersions.data.versions | Where-Object version -eq $version)) {
Write-Output "Waiting 30 seconds to retry..."
Start-Sleep -Seconds 30
}
else {
Write-Output "Found package. Waiting 1 extra minute to let things settle"
$foundPackage = $true
Start-Sleep -Seconds 60
break
}
}

}

# Build package
Write-Output "Building $project Debug and Release"
$output = Invoke-Expression "dotnet build ..\$project\$project.csproj -c Debug -p:UseProjectReferences=false --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
$output = Invoke-Expression "dotnet build ..\$project\$project.csproj -c Release -p:UseProjectReferences=false --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
Expand All @@ -72,3 +105,4 @@ if ($foundPackage){
# Archive the packages
Move-Item "*.nupkg","*.snupkg" .\archive\ -force
}

2 changes: 1 addition & 1 deletion templates/SadConsole.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>10.4.5</PackageVersion>
<PackageVersion>10.5.0</PackageVersion>
<PackageId>SadConsole.Templates</PackageId>
<Title>SadConsole Game Templates</Title>
<Authors>Thraka</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"modifiers": [
{
"copyOnly": [ "*.MonoGame.cs", "*.SFML.cs", "Program.cs" ]
"copyOnly": [ "*.MonoGame.cs", "*.SFML.cs", "*.FNA.cs", "Program.cs" ]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

<!-- SadConsole related NuGet packages. -->
<ItemGroup>
<PackageReference Condition=" '$(GameHost)' == 'monogame' " Include="SadConsole.Host.MonoGame" Version="10.4.1" />
<PackageReference Condition=" '$(GameHost)' == 'sfml' " Include="SadConsole.Host.SFML" Version="10.4.1" />
<PackageReference Include="SadConsole.Extended" Version="10.4.0" />
<PackageReference Condition=" '$(GameHost)' == 'monogame' " Include="SadConsole.Host.MonoGame" Version="10.5.0" />
<PackageReference Condition=" '$(GameHost)' == 'sfml' " Include="SadConsole.Host.SFML" Version="10.5.0" />
<PackageReference Include="SadConsole.Extended" Version="10.5.0" />
</ItemGroup>

<!-- MonoGame host requires you to choose which library you want to use. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
<PackageReference Include="SadConsole.Host.MonoGame" Version="10.4.1" />
<PackageReference Include="SadConsole.Extended" Version="10.4.0" />
<PackageReference Include="SadConsole.Host.MonoGame" Version="10.5.0" />
<PackageReference Include="SadConsole.Extended" Version="10.5.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SadConsole.Host.SFML" Version="10.4.1" />
<PackageReference Include="SadConsole.Extended" Version="10.4.0" />
<PackageReference Include="SadConsole.Host.SFML" Version="10.5.0" />
<PackageReference Include="SadConsole.Extended" Version="10.5.0" />
</ItemGroup>

</Project>

0 comments on commit e94f37e

Please sign in to comment.