Commit graph

75 commits

Author SHA1 Message Date
Kaz Wolfe
b32ed39826
Merge branch 'refs/heads/master' into apiX
# Conflicts:
#	Dalamud/Game/Libc/LibcFunction.cs
#	Dalamud/Game/Libc/LibcFunctionAddressResolver.cs
#	Dalamud/Game/Libc/OwnedStdString.cs
#	Dalamud/Game/Libc/StdString.cs
#	Dalamud/Interface/UiBuilder.cs
2024-04-28 11:54:54 -07:00
goat
448b0d16ea
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip

* hacky fix for overlapping event text in profiler

* move IsResumeGameAfterPluginLoad logic to PluginManager

* fix some warnings

* handle exceptions properly

* remove ability to cancel, rename button to "hide" instead

* undo Dalamud.Service refactor for now

* warnings

* add explainer, show which plugins are still loading

* add some text if loading takes more than 3 minutes

* undo wrong CS merge
2024-04-21 17:28:37 +02:00
srkizer
bd2c9b2258
Apply most of Api10ToDo (#1782) 2024-04-20 23:25:33 -07:00
goat
0d7c8f1bd2 add fixed-width font option to icon test widget 2024-04-15 00:45:01 +02:00
Soreepeong
9eb4584896 Fix ServicesWidget layout 2024-04-07 21:59:47 +09:00
Soreepeong
7f5ef03917 Use EarlyLoadedService for anything that is not mandatory for kicking off plugin loader 2024-04-07 21:53:23 +09:00
srkizer
55bd845a63
Add IconTexture/Wrap to INotification (#1738) (#1739)
* Add IconTexture/Wrap to INotification (#1738)

Notification record and IActiveNotification interface now supports
setting or updating the texture wraps being used, and SetIconTexture has
gotten more overloads to support leaveOpen mechanism that can commonly
be found with Stream wrappers.

ImGui widget is updated to support testing setting "leaveOpen" and
updating "IconTexture" property via setter, making it possible to check
whether IDTW.Dispose is being called under given conditions.

Some changes to doccomments are made.

* typo
2024-03-22 14:47:50 +01:00
srkizer
be63276a85
Rename to Framework.Run (#1728) 2024-03-19 08:04:21 -07:00
srkizer
5d473919a1
Hide scheduler from RunOnFrameworkThread (#1725)
* Hide scheduler from RunOnFrameworkThread

Creating new tasks via Task.Run and alike would fetch the current
scheduler, which we do not want in case of running stuff from the
framework thread. Change is to prevent the standard library from seeing
the "current scheduler". If one wants to use `await` with an async
function to be run in the framework thread, one can use
`RunOnFrameworkThreadAwaitable` instead now.

* TaskSchedulerWidget: test better stuff

* TaskSchedulerWidget: add freeze tests

* More comments

* Make TaskFactory a getter method instead of property to avoid bad suggestions

* Why are there stuff still not pushed
2024-03-18 20:10:47 -07:00
goat
dcec076ca7
Merge pull request #1681 from Soreepeong/feature/inotificationmanager
Implement INotificationManager
2024-03-16 16:46:12 +01:00
wolfcomp
3f4a91b726
Handle static declares in AddonLifecycleWidget (#1720)
* Handle static declares

old way: <https://learn.microsoft.com/en-us/dotnet/api/system.delegate.target?view=net-8.0#property-value>

new way: <https://learn.microsoft.com/en-us/dotnet/api/system.reflection.memberinfo.declaringtype?view=net-8.0#property-value>

* get full name instead of class name
2024-03-16 16:42:24 +01:00
Soreepeong
033a57d19d Merge remote-tracking branch 'upstream/master' into feature/inotificationmanager 2024-03-14 13:06:04 +09:00
Soreepeong
9724e511e9 Add INotification.RespectUiHidden 2024-03-14 13:05:46 +09:00
srkizer
cf4a9e3055
Easier SingleFontChooserDialog ctor, window pos/size/flags, and more docs (#1704)
* 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>
2024-03-14 00:57:30 +01:00
srkizer
a26bb58fdb
Use custom TaskScheduler for Framework.RunOnTick (#1597)
* Use custom TaskScheduler for Framework.RunOnTick

* TaskSchedulerWidget: add example
2024-03-14 00:36:38 +01:00
Soreepeong
6b875bbcb5 Support SetIconTexture(Task<IDalamudTextureWrap?>?) 2024-02-28 17:27:19 +09:00
Soreepeong
a1e2473774 Normalize names 2024-02-28 17:11:30 +09:00
Soreepeong
92302ffd89 More cleanup 2024-02-28 17:11:30 +09:00
Soreepeong
a7d5380796 Cleanup 2024-02-28 17:11:30 +09:00
Soreepeong
e44180d4a2 honor notification window focus 2024-02-28 17:11:30 +09:00
Soreepeong
0040f61125 Make notifications minimizable, remove interactable 2024-02-28 17:11:30 +09:00
Soreepeong
e96089f8b2 Separate progress and expiry animations 2024-02-28 17:11:30 +09:00
Soreepeong
f434946137 Turn impls of IconSource internal 2024-02-28 17:11:30 +09:00
Soreepeong
42b6f8fd4b fix disposes and add TextureWrapIconSource 2024-02-28 17:11:30 +09:00
Soreepeong
cf54a02812 fixes 2024-02-28 17:11:30 +09:00
Soreepeong
df9212ac58 Expose DefaultDisplayDuration 2024-02-28 17:11:29 +09:00
Soreepeong
1ca2d2000b Add UserDismissable 2024-02-28 17:11:29 +09:00
Soreepeong
3a6aa13c3b Add IconSource 2024-02-28 17:11:29 +09:00
Soreepeong
7aba15ef5b Normalize namespaces 2024-02-28 17:11:29 +09:00
Soreepeong
04c6be5671 Add progressbar 2024-02-28 17:11:29 +09:00
Soreepeong
2935d18c37 Show plugin icons as fallback icon 2024-02-28 17:11:29 +09:00
Soreepeong
3ba395bd70 Implement INotificationManager 2024-02-28 17:11:29 +09:00
Soreepeong
9629a555be Rename to CreateWrapSharingLowLevelResource 2024-02-26 03:20:28 +09:00
Soreepeong
f6be80a5fb Make IDalamudTextureWrap ICloneable 2024-02-25 21:21:50 +09:00
srkizer
2d8b71c647
Add SetFontScaleMode(ImFontPtr, FontScaleMode) (#1666)
* 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
2024-02-18 15:08:07 +01:00
srkizer
34daa73612
Implement FontChooserDialog (#1637)
* 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
2024-02-13 20:09:46 +00:00
goat
47b1dfd7f9
Merge branch 'master' into feature/ifontatlas-lock-safety 2024-02-08 19:04:54 +01:00
KazWolfe
0d10a17966
Make CommandWidget look better (and expose more info) (#1631)
- Expose the plugin that owns the command.
2024-02-08 18:53:51 +01:00
Soreepeong
5161053cb3 Move IFontHandle.ImFontLocked to ILockedImFont+impl 2024-01-24 00:19:27 +09:00
Soreepeong
29b3e0aa97 Make IFontHandle.Push return IDisposable, and add IFontHandle.Pop 2024-01-21 13:15:36 +09:00
Soreepeong
d70b430e0d Add IFontHandle.Lock and WaitAsync 2024-01-21 03:10:41 +09:00
Soreepeong
63b16bcc7c Reapply "IFontAtlas: font atlas per plugin"
This reverts commit b5696afe94.
2024-01-19 07:26:56 +09:00
goat
b5696afe94 Revert "IFontAtlas: font atlas per plugin" 2024-01-18 12:51:58 -08:00
Soreepeong
2bfddaae16 Add minimum range rebuild test 2024-01-03 23:37:00 +09:00
Soreepeong
8bdab4d2c8 Implement DalamudFontAtlas 2024-01-03 23:36:08 +09:00
KazWolfe
b558752558
chore: Consolidate on ImGuiColors (#1585)
Uses ImGuiColors over KnownColor in most places so that themes override things properly.
2023-12-23 11:25:08 +01:00
srkizer
5998fc687f
Fix DataShare race condition, and add debug features (#1573) 2023-12-16 21:05:13 +01:00
srkizer
a0f4baf8fa
Less footguns in service dependency handling (#1560) 2023-12-06 21:29:46 -08:00
srkizer
7a0de45f87
Miscellaneous improvements (#1537) 2023-11-26 22:58:26 +01:00
KazWolfe
e538763f20
chore: Fix most 6.51 warnings (#1514) 2023-10-31 21:21:55 +01:00