* Use new Lock objects
* Fix CA1513: Use ObjectDisposedException.ThrowIf
* Fix CA1860: Avoid using 'Enumerable.Any()' extension method
* Fix IDE0028: Use collection initializers or expressions
* Fix CA2263: Prefer generic overload when type is known
* Fix CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
* Fix IDE0270: Null check can be simplified
* Fix IDE0280: Use 'nameof'
* Fix IDE0009: Add '.this'
* Fix IDE0007: Use 'var' instead of explicit type
* Fix IDE0062: Make local function static
* Fix CA1859: Use concrete types when possible for improved performance
* Fix IDE0066: Use switch expression
Only applied to where it doesn't look horrendous.
* Use is over switch
* Fix CA1847: Use String.Contains(char) instead of String.Contains(string) with single characters
* Fix SYSLIB1045: Use 'GeneratedRegexAttribute' to generate the regular expression implementation at compile-time.
* Fix CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char
* Fix IDE0057: Substring can be simplified
* Fix IDE0059: Remove unnecessary value assignment
* Fix CA1510: Use ArgumentNullException throw helper
* Fix IDE0300: Use collection expression for array
* Fix IDE0250: Struct can be made 'readonly'
* Fix IDE0018: Inline variable declaration
* Fix CA1850: Prefer static HashData method over ComputeHash
* Fi CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
* Update ModuleLog instantiations
* Organize usings
* wip2
* Implement AutoUtf8Buffer
* reformat
* Work on manual bindings
* restructure
* Name scripts properly
* Update utility functions to use ImU8String
* add overloads
* Add more overloads
* Use ImGuiWindow from gen, support AddCallback
* Use LibraryImport for custom ImGuiNative functinos
* Make manual overloads for string-returning functinos
* Make all overloads with self as its first parameter extension methods
* Fix overload resolution by removing unnecessary
* in => scoped in
* Fix compilation errors
* Add IInternal/PublicDisposableService
Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.
In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.
* Cleanup
* Postmerge fixes
* More explanation on RunOnFrameworkThread(ClearHooks)
* Mark ReliableFileStorage public ctor obsolete
---------
Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
* Make SingleFontChooserDialog ctor less confusing
The current constructor expects a new fresh instance of IFontAtlas,
which can be easy to miss, resulting in wasted time troubleshooting
without enough clues. New constructor is added that directly takes an
instance of UiBuilder, and the old constructor has been obsoleted and
should be changed to private on api 10.
* Add position, size, and window flags conf to SFCD
* Improve documentations
* Add test for PopupPosition/Size
---------
Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
* Add SetFontScaleMode(ImFontPtr, FontScaleMode)
`IgnoreGlobalScale` was advertised as "excludes the given font from
global scaling", but the intent I had in mind was "excludes the given
font from being scaled in any manner". As the latter functionality is
needed, obsoleted `IgnoreGlobalScale` and added `SetFontScaleMode`.
* Make it correct
* Name consistency
* Implement FontChooserDialog
* Minor fixes
* Fixes 2
* Add Reset default font button
* Add failsafe
* reduce uninteresting exception message
* Add remarks to use AttachExtraGlyphsForDalamudLanguage
* Support advanced font configuration options
* fixes
* Shift ui elements
* more fixes
* Add To(Localized)String for IFontSpec
* Untie GlobalFontScale from default font size
* Layout fixes
* Make UiBuilder.DefaultFontSize point to user configured value
* Update example for NewDelegateFontHandle
* Font interfaces: write notes on not intended for plugins to implement
* Update default gamma to 1.7 to match closer to prev behavior (1.4**2)
* Fix console window layout