From 151e8245fa9b7da0363db3673a9841812c0b4327 Mon Sep 17 00:00:00 2001 From: ben_singer Date: Fri, 29 Nov 2024 11:36:42 +0000 Subject: [PATCH] Updated NuGet readme --- .nuget/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.nuget/README.md b/.nuget/README.md index 9b365ef..214a34a 100644 --- a/.nuget/README.md +++ b/.nuget/README.md @@ -22,14 +22,14 @@ Generating visuals is made easy with the *VisualHelper* class. The following exa var displaySize = new Size(80, 50); var adapter = new SystemConsoleAdapter(); -var frame = new GridVisualFrame(VisualHelper.FromImage(@"C:\TestImage.jpg", displaySize, CellAspectRatio.Console)); +var frame = VisualHelper.CreateFrame(@"C:\TestImage.jpg", displaySize, CellAspectRatio.Console); adapter.RenderFrame(frame); ``` This can be used in a game: ```csharp -var frame = new GridVisualFrame(VisualHelper.FromImage(@"C:\TestImage.jpg", displaySize, CellAspectRatio.Console)); +var frame = VisualHelper.CreateFrame(@"C:\TestImage.jpg", displaySize, CellAspectRatio.Console); game.ChangeMode(new VisualMode(frame)); ``` @@ -39,7 +39,7 @@ return new Room("Hillside", "A wild hillside with a lone tree", commands: [ new CustomCommand(new CommandHelp("Look at view", "Look at the current view."), true, true, (game, args) => { - var frame = new GridVisualFrame(VisualHelper.FromImage(@"C:\TestImage.jpg", game.Configuration.DisplaySize, CellAspectRatio.Console)); + var frame = VisualHelper.CreateFrame(@"C:\TestImage.jpg", game.Configuration.DisplaySize, CellAspectRatio.Console); game.ChangeMode(new VisualMode(frame)); return new(ReactionResult.GameModeChanged, string.Empty); }) @@ -50,7 +50,7 @@ return new Room("Hillside", "A wild hillside with a lone tree", commands: A texturizer can be applied to add extra depth to the image: ```csharp -var frame = new GridVisualFrame(VisualHelper.FromImage(@"C:\TestImage.jpg", displaySize, CellAspectRatio.Console, new BrightnessTexturizer())); +var frame = VisualHelper.CreateFrame(@"C:\TestImage.jpg", displaySize, CellAspectRatio.Console, new BrightnessTexturizer()); ``` ## Documentation