Releases: Thraka/SadConsole
Version 10.4.1a
Libraries updated for this release
- SadConsole
- SadConsole.Host.MonoGame
- SadConsole.Host.SFML
- SadConsole.Host.FNA
- SadConsole.Host.WPF
Changes
-
[Core] When a Cursor is removed from a host object, the object is set to dirty now.
-
[Core] Overlay component now calls update on the attached visual.
-
[Core] Fix bug with DrawCircle not setting dirty.
-
[Core] Fix bug with DrawBox not respecting ignore glyph setting.
-
[MonoGame] Change host to be a lot more friendly towards running from an existing MonoGame Game instead of SadConsole's game.
-
[Renderers] Cursor rendering has changed to draw on the hosting surface. Previously it was rendered on top as an entire separate process.
-
[Misc] Added MonoGame-first game sample.
-
[Misc] Added Python sample.
Version 10.4.0
New versioning system. Versions for SadConsole will be in the following format: [all libs major].[all libs minor].[individual lib revision]
When patches come out for the indvidual libraries, the X in 10.0.X would increment. These would be like host updates, or the extended library, but not public facing changes in SadConsole itself. If SadConsole itself updates, the X in 10.X.0 would increment. All libraries would increment with SadConsole, and the individual lib revisions would reset to 0. The X on X.0.0 would indicate a major change to SadConsole with most likely a lot of bigger breaking changes.
That said, SadConsole is resetting all versions to v10.4.0 for this release. From now on, the new versioning system is in place.
-
[Breaking] A minor breaking change. If you were creating your own
IConfigurator
startup configs, theRun
method's parameter changed fromGame
toGameHost
. -
[Core] Added
Components.Overlay
which displays a surface on top of an existing console/surface object as a top layer. -
[Core] Bug:
Font.OnFontChanged
wasn't actually being called. It is now. -
[Core] Added
Coroutine
NuGet library. This is included now with SadConsole. -
[Core] Added
CoroutineHandlerComponent
which is a manager that you can add to an object and coroutines to. -
[Core]
Cursor.PrintCoroutine
which prints as a coroutine, pausing at each character. -
[Core]
Instructions.DrawString
updated to useCursor.PrintCoroutine
which lets it pretty print word breaks. -
[Core] XML docs didn't genereate correctly for the last build.
Version 10.0.3
- [UI]
ScrollBar
has been completely rewritten. Minor breaking changes..Maximum
has been changed to.MaximumValue
.- Properties related to the style, such as
BarGlyph
, were moved to aStyle
property which controls how the control looks. Some property names have changed
- [UI]
NumberBox
improvements.- Rendering code split from
Textbox
. - Added
ShowUpDownButtons
to show up\down buttons. - Fixed bug with
UseMinMax
messing up the value and setting it back to 0 when the control loses focus.
- Rendering code split from
- [UI]
ControlBase.FindThemeFont
helper method added. - [UI] Minor bug fixed where captured controls (such as a scroll bar) wouldn't process the mouse if the control was parented to a composite control and the mouse left the parent area.
- [Core] Fixed
EffectSet
bug where the last effect wasn't applied. - [Core]
GlyphDefinition
has an init accessor now. - [Core] Added
ShapeParameter
docs andCreateFilled
supports ignoring the border. - [Core] Added
RootComponent
class that can be added toSadConsole.Game.Instance.RootComponents
. These components run logic before the keyboard and screen updates. - [Core] Splash screen collection is nulled after it runs, freeing memory.
- [Extended] Classic keyboard handler has
IsReady
flag now to control when it's active. - [Extended]
ColorPickerPopup
would crash on invalid textbox values. - [Extended]
GlyphSelectPopup
added. You can use this to display a list of glyphs in your font while debugging your app. - [Extended] Fixed a bug in the table control that prevented the scroll bars from being displayed.
- [Extended] Cleaned up code and enabled nullable.
- [Host - SFML] Fix bug where it was always running at unlimited FPS.
- [Host - MonoGame] Renderers can set backing texture usage.
- [Host - FNA] Fix bug where the screen clear wasn't working and would default to violet.
- [Host - All] Add
OptimizedScreenSurfaceRenderer
which renders. - [Host - All] Surface render step can accept an alternative surface with the
SetData
method.
Version 10.0.0
Major changes (possibly breaking)
- [Core] The default font's used the wrong name. It's been corrected from IBM_16x8 to IBM_8x16 and from IBM_16x8_ext to IBM_8x16_ext. If you've previously serialized a font with the wrong name, you'll need to change it in the json object. Or use the configuration extension
FixOldFontName()
which will add a name mapping. - [Core] The editor functions that changed glyphs and printed on consoles have moved from being extension methods for the
ICellSurface
interface to theISurface
interface.Console
,IScreenSurface
, andICellSurface
, all implement this new interface. This means you can now use the editing extensions directly on those objects. - [Core] Because
Console
no longer implementsICellSurface
, and instead implementsISurface
, some properties have been moved to theSurface
property, such asmyConsole.TimesShiftedUp
is nowmyConsole.Surface.TimesShiftedUp
. - [Core] Themes have been removed. Each control draws itself.
- [Core]
IScreenObject
no longer implementsIEnumerable
to access the children. Use the.Children
collection property instead. - [Core]
Update
andRender
no longer check forIsEnabled
andIsVisible
, respectively. When those methods run, the properties are checked on the children before calling the respective method. This moves the check outside of the object itself, and relies on the parent object to do it. This eliminates the need for an object to check itself, and allows you to bypass the check when you want. - [Core] Decorators are no longer array's but rented from a list pool. Use the
CellDecoratorHelpers
class to manage them. SadConsole does its best to rent and return from the pool as you add or remove decorators. - [Core] The
OnStart
callback is now an event and not anAction
delegate.
New features
- [Core] Added
Componenets.LayeredSurface
component. Add this component to aScreenSurface
to enable multiple surface layers. Use theLayeredSurface
to manage the layers. - [Core]
StringParser
supports variables with the syntax of $variable_name. The parser has a dictionary that invokes a delegate which returns a value for the variable. So the value can be determined as the variable is used. See DemoStringParsing.cs in the sample template. - [Core]
EntityManager.AlternativeFont
added so entities can use a different font than the parent object. - [UI] New control,
TabControl
. Contributed by arxae. - [ExtendedLib.UI] New control,
Table
. Contributed by Ven0maus.
Normal changes
- Target .NET 6+ exclusively. Core library is nullable aware.
- [Core] Splash screen printing wasn't being shown because of cursor changes.
- [Core]
IFont
now defines glyph definitions. - [Core] Various
SadFont
properties and methods are now settable/callable. - [Core] Extensions methods added to hosts to allow manipulation of font textures.
- [Core]
Settings.CreateStartingConsole
setting added to avoid creating theStartingConsole
. - [Core] Cursor now has the property
DisablePrintAutomaticLineFeed
which, when true, prevents the cursor from moving to the next line if printing a character at the end of the current line. - [Core]
Ansi.AnsiWriter
handles sauce now by ignoring the rest of a document once character 26 (CTRL-Z) is encountered. - [Core]
Ansi.AnsiWriter
has always used a cursor to print, it now setsUseLinuxLineEndings = true
andDisablePrintAutomaticLineFeed = true
. - [Core] Added
SadConsole.SplashScreens.Ansi1
splashscreen, the new SadConsole logo, for use with games. - [Core] Added
ScreenSurface.QuietSurfaceHandling
property. Whentrue
, this property prevents the.Surface
property from raising events and calling virtual methods when the instance changes. This is useful forAnimatedScreenSurface
instances that have fast moving animations. - [Core]
Entities.Renderer
renamedEntities.EntityRenderer
. - [Core] The
Entity
type now supports animated surfaces. When creating an entity, you must specify it as a single cell entity or animated surface entity. - [Core] The effects system had a bug where if you added the same effect with the same cell twice, and the effect should restore the cell state, it wouldn't.
- [Core]
AsciiKey
used by the keyboard system now detects capslock and shifted state to produce capital or lowercase letters. - [Core]
AsciiKey
exposes a bunch of static dictionaries that help with remapping keys and characters. - [Core]
ColoredGlyph.IsVisible
now setsColoredGlyph.IsDirty
to true when its value changes. - [Core]
Surface.RenderSteps
moved to the renderer. - [Core]
RenderSteps
is now aList
and you must callRenderSteps.Sort(SadConsole.Renderers.RenderStepComparer.Instance)
when the collection is changed. - [Core]
Instructions.DrawString
usesSystem.TimeSpan
now, and is more accurate. - [Core] Effects have a
RunEffectOnApply
property that will run theeffect.Update
method once, with a duration of zero, when the effect is added to a manager. - [Core]
EffectsManager
will apply the active effect to a cell right when the cell is added to the effect. This was happening on the next render frame. - [Core] Surface shifting is much more performant (Thanks Chris3606)
- [Core]
Cursor
has some new methods for erasing:Erase
,EraseUp
,EraseDown
,EraseLeft
,EraseRight
,EraseColumn
,EraseRow
. - [Core] Mouse state object now tracks
*ButtonDownDuration
times. When the button is down and the time is zero, this indicates the button was just pressed. Otherwise, you can detect how long the button has been held down. - [Core] Rename RexPaint
ToLayersComponent
toToCellSurface
. - [Core] Rework
Timer
withStart/Stop/Restart
methods. - [Core] If you load a font that's already been loaded, the existing instance is returned and the recently deserialized font is discarded. Previously the old font was replaced in the
GameHost.Fonts
dictionary. - [Core]
ColoredGlyph.Decorators
are Poolable Lists now and don't need to be messed with as arrays. UseSadConsole.CellDecoratorHelpers
to manage the property. - [UI] Scroll bar with a size of 3 now disables the middle area, and you can use a size of 2 now.
- [UI] Scroll bar supports a thickness other than 1.
- [UI] Control host would get stuck when tabbing to a control that was disabled. Now it skips the control.
- [UI]
ControlBase.IsDirty
property now calls the protectedOnIsDirtyChanged
method which then raises theIsDirtyChanged
event. - [UI]
Panel
control usesCompositeControl
as a base class. Control can draw a border. - [UI]
ProgressBar
is easier to customize. - [UI]
Colors.Name
property added. - [UI]
ListBox.ItemsArea
property added which the mouse now watches for so that it knows it's interacting with the list items specifically. - [ExtendedLib] Border control uses view size now instead of full size of wrapping object.
- [ExtendedLib]
Border.AddToSurface/Window
has been renamed toBorder.CreateForSurface/Window
. - [ExtendedLib]
Entities.EntityManager
renamedEntities.EntityManagerZoned
. - [ExtendedLib] Added
SmoothMove.IsEnabled
to disable the component and prevent animation. - [ExtendedLib] Fixed
ColorBar
bug with selecting a color before it's first drawn.
Removed
- [Core]
Algorithms.Line\Circle\Ellipse
have been removed. The latest primitives library provides these methods. - [Core]
Shapes
namespace removed. The latest primitives library release that SadConsole uses, provides these.
Host changes
- [MonoGame] NuGet package has a -windows framework target that targets DirectX and adds support for WPF.
- [MonoGame] Fix conversion of Mirror to SpriteEffects.
- [MonoGame\SFML] Surface renderers now skip the glyph if the glyph is 0.
- [MonoGame\SFML] New
SurfaceDirtyCells
renderer added which only draws cells that are marked dirty. - [MonoGame\SFML] New
SadConsole.Configuration.Builder
object used for creating a SadConsole game.
Version 9.2.2
This release fixes the Mirror type not converting correctly to the monogame SpriteEffect enum.
What's Changed
- README Spelling Edits by @joesunley in #288
- 9.2.2 Release by @Thraka in #289
New Contributors
- @joesunley made their first contribution in #288
Full Changelog: 9.2.1...9.2.2
Release 9.2.1
API documentation didn't generate correctly in the 9.2.0 release. 9.2.1 is only a rebuild to fix the documentation.
Full Changelog: 9.2.0...9.2.1
Version 9.2.0
Breaking changes
- [Breaking]
Print(int x, int y, ColoredGlyph glyph)
renamed toSetGlyph
. - [Breaking] Surface
SetEffect
method signatures have changed. - [Breaking] Renamed
Animation.ConvertImageFile
toAnimation.FromImage
. - [Breaking] Removed
ColorGradient
as this type is implemented in the SadRogue.Primitives library asGradient
.
Behavioral changes
- [Behavior]
ColoredString.String.Set
forced the string through the parser. This has now changed to use the characters directly. - [Behavior] All
ColoredString
contructors that used the(string)
overload used the string parser. This is no longer the case. - [Behavior]
ColoredString.IgnoreEffect
no longer defaults totrue
. - [Behavior] Using
Surface.Print
methods that used the string parser for fore/back/mirror will force those settings after the string was parsed and not before. - [Behavior] Surface
Clear
andFill
methods now clear the effect. - [Behavior]
Print
statements have been updated to all act the same.- New overload added that accepts decorators.
- Print clears the effect over the glyphs printed.
- Print that uses the string processor now processes the string and then sets the appropriate overloaded settings. For example, the overload that sets the foreground and background colors will process the string and then set the foreground and background of the entire string. This is a change from previous behavior which set the colors at the start of the string processor and allowed the processor to override the overload.
Host changes
- [MonoGame] Added DrawCallManager to allow injecting custom sprite batch rendering during final scene composition.
- [MonoGame/SFML] Fixed a bug that caused all surfaces to redraw all cells 100% of the time even if nothing changed. Should bring 300%-400% fps increase in surfaces that aren't changing content.
- [MonoGame/SFML] ITexture improvements for GetPixel/SetPixel; Demos on editing textures. (RychuP)
- [MonoGame/SFML] The game host now has a
FrameNumber
property that incremenets each frame cycle. - [SFML] Fixed
Settings.UnlimitedFPS
. This now works.
Other changes
- [Core] Fixed bug that caused redraws every frame even if nothing had changed.
- [Core] Cursor didn't respect
Cursor.UseStringParser
because of howColoredString
was always using the string parser. This is fixed now. - [Core] Cursor has a
Cursor.MouseClickRepositionHandlesMouse
property which sets the handled flag on mouse left-click for the cursor reposition. - [Core] Cursor updates the space character appearance while printing. Previously only the first character was used to determine the space's appearance.
- [Core]
DrawString
instruction overrides reset now, fixing a bug with having the instruction run more than once. - [Core]
Surface.ShiftLeft|Right|Up\Down
methods now move decorators. - [Core] New
Surface.ShiftRow
andSurface.ShiftColumn
methods added. (Chris3606) - [Core]
ColoredString.SetDecorators
added, to fit in withSetForeground
,SetBackground
, etc. - [Core] Renamed
EffectsChain
toEffectSet
and added newCodeEffect
type. - [Core] Effects use
TimeSpan
instead of double. - [Core] The
EffectsManager
used by a surface now works on cell instances, not cell indicies. - [Core] Resizing a surface without the
clear
parameter keeps existing effects instead of dropping them. - [Core]
AnimatedSurface.FromImage
helper added which converts image-based animations to an animated surface. (RychuP) - [Core] Added TheDraw font reader:
SadConsole.Readers.TheDrawFont
. Not a SadConsole Font. - [Core] Playscii support added in the
SadConsoles.Readers
namespace. (RychuP) - [Core] Entity renderer has a
RemoveAll
method to clear out all the entities. - [Core] Entity renderer now has a
SkipExistsChecks
property which can greatly improve performance when adding/removing entities (when you already have a lot of entities). - [Core] For entities, added
AnimatedAppearanceComponent
which can be added to an entity to animate the glyph like theAnimatedSurface
did for the old entity type. - [UI] Fix various minor bugs with controls.
- [UI]
Textbox
has more events related to text changing. - [UI]
Textbox
behaviors have changed slightly. For example,EditingText
event doesn't fire when the text ends up being the same prior to editing. - [UI]
ListBox
items can be inserted as aValueTuple<string, object>
which will use the string (can be aColoredString
) as the display text of the item. - [StringParser] Introduced new interface for string parsing:
StringParser.IParser
. - [StringParser] Moved current parse code to
StringParser.Default
. - [StringParser]
ColoredString.Parse
is obsolete and forwards toColoredString.Parser.Parse
. - [StringParser] String processor now has a decorators command:
[c:d glyph:mirror:color[:count]]
- [StringParser] String processor no longer hides effects until they're used. All processed strings will set a null effect that will be set on the cells that are printed.
- [ExtendedLib] Added ClassicConsoleKeyboardHandler and C64KeyboardHandler for cursor handlers.
- [ExtendedLib] Added MoveViewPortKeyboardHandler component.
- [ExtendedLib] Added
surface.PrintFadingText
extension method that prints text using theDrawString
instruction with an effect.
Version 9.1.0
ListBox
can display colored strings now.- Serialization contracts type is exposed for deriving:
SadConsole.Serializer.Contracts
. - Some
On*
members ofScreenSurface
weren't virtual; fixed. Cursor
changes it's cached surface when the parent object's surface changes.Cursor
bug fixes.Entity
is serializable now.Entities.Renderer
can now have entities added/removed without a host object.- Added new extension methods in the
SadConsole.Quick
namespace to speed up construction of objects. ScreenObject.SadComponentAdded/Removed
callbacks renamed to OnSadComponentAdded/Removed`.IScreenObject.Surface
can now be set.
Version published for v9 NuGet packages
Main libraries were published as v9.0.0. However, some small changes to the project were made for some of the support libraries to also target .NET 5.0 and those versions were bumped to v9.0.1. All of this is considered part of the release for v9 of SadConsole.
8.99.3 Code base. Last of the v8 line
Merge pull request #256 from Thraka/develop An old example of creating a monogame game and adding sadconsole to it