Commit graph

1487 commits

Author SHA1 Message Date
Soreepeong
111029e9bc Fix inconsistency 2024-03-01 10:01:51 +09:00
Soreepeong
8fa8ca43b6 Rename ISharedImmediateTexture methods 2024-03-01 09:47:27 +09:00
Soreepeong
c9f613931f supply Channel<T> create params 2024-03-01 01:49:32 +09:00
Soreepeong
e2ed5258eb Cleanup TextureLoadThrottler 2024-03-01 00:10:58 +09:00
Soreepeong
b34a901702 make it consistent 2024-02-28 22:16:40 +09:00
Soreepeong
ca986b46a2 cleanup 2024-02-28 21:17:50 +09:00
Soreepeong
cc756c243c Add ITextureProvider.GetFromManifestResource(Assembly,string) 2024-02-28 21:04:57 +09:00
Soreepeong
b52d4724e9 cleanup 2024-02-28 20:18:48 +09:00
Soreepeong
35f3802471 Format 2024-02-28 20:10:31 +09:00
Soreepeong
b16fa5cb46 Inline as seen fit 2024-02-28 20:07:13 +09:00
Soreepeong
55b5c5094a TextureLoadThrottler: make CreateLoader never block 2024-02-28 19:59:36 +09:00
Soreepeong
f8492dc06b changes 2024-02-28 19:16:14 +09:00
Soreepeong
aa35052a15 update UldWrapper 2024-02-28 17:43:24 +09:00
Soreepeong
e12563d20f Suppress cancelled task exception from bubbling 2024-02-28 17:43:24 +09:00
Soreepeong
2c013f39ca fix 2024-02-28 17:43:24 +09:00
Soreepeong
71b84bcf40 Move all texture loading functionalities from IM to TM 2024-02-28 17:43:24 +09:00
Soreepeong
248c7911a0 Ensure leaveOpen takes effect even on cancellations 2024-02-28 17:43:24 +09:00
Soreepeong
3bf907002f Remove CancellationToken from GetFromRaw(Sync) 2024-02-28 17:43:24 +09:00
Soreepeong
80875247b6 Correct Async refcount handling 2024-02-28 17:43:24 +09:00
Soreepeong
ba51ec52f5 Better tex load cancellation handling 2024-02-28 17:43:24 +09:00
Soreepeong
517abb0c71 Suppress hint 2024-02-28 17:43:24 +09:00
Soreepeong
ea633cd876 Implement texture load throttling & cancellable async loads 2024-02-28 17:43:24 +09:00
Soreepeong
e12b2f7803 Make state+texture retrieval done with one API call 2024-02-28 17:43:24 +09:00
Soreepeong
2920d18afa Update IconBrowserWidget 2024-02-28 17:43:24 +09:00
Soreepeong
5eadfc1b4d Add state fetchers 2024-02-28 17:43:24 +09:00
Soreepeong
eb4d9aba7e TexWidget: add test/examples for new APIs 2024-02-28 17:43:22 +09:00
Soreepeong
3fe2920e92 Update ITextureProvider 2024-02-28 17:29:23 +09:00
goat
8e5a84792e
Merge pull request #1684 from Soreepeong/feature/idtw-cloneable
Add IDalamudTextureWrap.CreateWrapSharingLowLevelResource
2024-02-27 19:43:21 +01:00
AzureGem
0651c643b1
Limit console log lines held in memory (#1683)
* Add AG.Collections.RollingList

* Use RollingList for logs + Adaption changes

* Create Dalamud.Utility.ThrowHelper

* Create Dalamud.Utility.RollingList

* ConsoleWindow: Remove dependency

* Remove NuGet Dependency

* Add Log Lines Limit configuration

* Use Log Lines Limit configuration and handle changes

* Make log lines limit configurable
2024-02-27 19:15:11 +01:00
Soreepeong
12e2fd3f60 Miscellaneous fixes 2024-02-27 19:49:40 +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
AzureGem
3909fb13fa
Fix ConsoleWindow regex handling (#1674) 2024-02-20 11:19:24 -08: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
7dc99c9307
Fix AddRectFilledDetour typo (#1667)
* Fix AddRectFilledDetour typo

* Skip drawing if zero opacity is specified for drawing
2024-02-18 07:03:51 +00:00
KazWolfe
c19e1f0fcd
Default Minimum/Maximum WindowSizeConstraints (#1574)
* 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
2024-02-17 19:06:41 +01:00
srkizer
cdaa538e1a
Revert "Warn if font files' hashes are unexpected (#1659)"
This reverts commit 307f0fcbe8.
2024-02-17 23:07:49 +09:00
Soreepeong
f825e86e86 Fix B4G4R4A4->B8G8R8A8 channel extraction
On systems without support for B4G4R4A4 pixel format (when DirectX
feature level 11_1 is missing), the conversion will take place; a
copy-and-paste error made the read pointer advance twice as fast as it
should have been.
2024-02-17 22:44:33 +09:00
KazWolfe
0bb69cbd5f
feat: Add /xlprofiler command (#1662)
Make it easier for end users to open the profiler to pull load time reports.
2024-02-17 10:25:43 +01:00
srkizer
307f0fcbe8
Warn if font files' hashes are unexpected (#1659) 2024-02-16 17:19:42 +01:00
srkizer
6497c62622
Change MemoryHelper to allocate less (#1657)
* Change MemoryHelper to allocate less

* Use StringBuilder pool for ReadSeStringAsString

* fix

* Use CreateReadOnlySpanFromNullTerminated where possible
2024-02-16 17:16:21 +01:00
goat
63f32322f5
Merge pull request #1653 from KazWolfe/crash-menu
feat: Add "deref nullptr in hook" crash item
2024-02-15 02:18:54 +01:00
Kaz Wolfe
a8bb8cbec5
feat: Add "deref nullptr in hook" crash item
- Move all crash items into submenu
2024-02-14 16:34:45 -08:00
srkizer
ea43d65636
Fix memory ownership on AddFontFromImGuiHeapAllocatedMemory (#1651) 2024-02-14 23:52:40 +01:00
Soreepeong
2de9c8ed5b Fix insufficient ImDrawList implementation 2024-02-14 21:59:20 +09:00
Soreepeong
cf3091b409 If docked, force default font on window decoration
ImGui docking functions are called outside our drawing context (from
ImGui::NewFrame), which includes most of dock-related drawing calls.
However, ImGui::RenderWindowDecoration is called from ImGui::Begin,
which may be under the effect of other pushed font. As IG::RWD
references to the ImDrawList irrelevant to the global shared state, it
was trying to draw a rectangle referring to a pixel that is not
guaranteed to be a white pixel. This commit fixes that by forcing the
use of the default font for IG::RWD when the window is docked.
2024-02-14 13:05:45 +09: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
marzent
df65d59f8b add more exception handler options to dev menu 2024-02-10 13:03:11 +01: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