- Test coverage has been added for the entire class, and verbose/redundant code has been refactored
- Fixes JSON serialization: JsonConstructor requires that the ctor parameters match fields/properties of the target class.
Previously, this meant that the JSON constructor would always throw an ArgumentNullException, as `Input` was not a class property.
* Fix log window layout
Fixed custom line rendering from not advancing ImGui cursor, and move
input boxes around as log window is resized to become narower.
* Undo unused change
* 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>
RollingList is not thread safe, but the lock around it was inconsistent,
resulting in occasional null value in the log list. Fixed by utilizing
ConcurrentQueue so that logs can be added from any thread without locks,
and reading from the queue and adding to the list from the framework
thread.
Also, added log line highlight feature.
* Accommodate nested AddonLifecycle event calls
The game is free to call event handlers of another addon from one addon,
but the previous code was written under the assumption that only one
function may be called at a time. This changes the recycled addon args
into pooled args.
* Always clear addon name cache
As some public properties of `IGameConfig` are being set on the first
`Framework` tick, there was a short window that those properties were
null, which goes against the interface declaration.
This commit fixes that, by making those properties block for the full
initialization of the class.
A possible side effect is that a plugin that is set to block the game
from loading until it loads will now hang the game if it tries to access
the game configuration from its constructor, instead of throwing a
`NullReferenceException`. As it would mean that the plugin was buggy at
the first place and it would have sometimes failed to load anyway, it
might as well be a non-breaking change.
* 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
* feat: Default Minimum/Maximum WindowSizeConstraints
If `MinimumSize` or `MaximumSize` are not set when defining a `WindowSizeConstraints`, they will be effectively unbounded.
* chore: Make internal windows unbounded on max size
* Ignore max value if it's smaller than minimum in any dimension