issues
search
LadyDefile
/
Wordsmith-DalamudPlugin
Wordsmith is a Dalamud Plugin aiming to make roleplay easier, more convenient, and harder to accidentally "wrong chat" your post.
7
stars
3
forks
source link
Word improvements
#11
Closed
LadyDefile
closed
2 years ago
LadyDefile
commented
2 years ago
Changelog
Data.Lang.cs
Added GetSuggestions(string) function to get spelling suggestions.
Added GenerateSwaps(string, bool, bool) to generate letter swap suggestions.
Added GenerateAway(string, bool, bool) to generate one letter away suggestions.
Data.Textchunk.cs
Summarized several properties
Changed Words from type string[] to type Word[]
Data.Word.cs
Added WordEndIndex property
Added GetString(string) function
Added GetString(string, int) function
Added GetWordString(string) function
Added GetWordString(string, int) function
Added Offset(int) function.
Added Suggestions property
Data.WordCorrection.cs
Deleted defunct class file.
Gui.ScratchPadUI
Changed member _corrections from type List
to List
Updated GetDebugString() to use Data.Word instead of Data.WordCorrection
Removed reference to offset in DrawChunkDisplay()
Removed ref int offset parameter from DrawChunkItem(TextChunk, ref int) making it DrawChunkItem(TextChunk)
DrawChunkItem now uses Data.Word in place of string parsing.
DrawWordReplacement() now uses Data.Word instead of Data.WordCorrection
OnReplace(int) now uses Data.Word instead of Data.WordCorrection
OnReplace(int) now uses StringBuilder instead of line splitting and joining.
OnAddToDictionary(int) now uses Data.Word instead of Data.WordCorrection
Adjusted DrawWordReplacement() function to now draw a context menu when right clicking the InputText.
Gui.SettingsUI.cs
Added the setting for maximum word suggestions to DrawSpellCheckTab().
Helpers.ChatHelper.cs
moved offset increase to after result is added to give start index to the TextChunk
Renamed second parameter SubstringByByteCount(string, in int, in int) from offset to startIndex for readability.
Helpers.SpellChecker.cs
Changed return type of CheckString(string) from WordCorrection[] to Word[].
CheckString now uses string.Words() instead of parsing words manually.
Configuration.cs
Added property MaximumSuggestions to limit the number of received word suggestions.
Extensions.cs
Added using Wordsmith.Data;
Removed defunct Lines(...) functions.
Added Words(this string) function.
Changelog
Data.Lang.cs
Data.Textchunk.cs
Data.Word.cs
Data.WordCorrection.cs
Gui.ScratchPadUI
Gui.SettingsUI.cs
Helpers.ChatHelper.cs
Helpers.SpellChecker.cs
Configuration.cs
Extensions.cs