Commit graph

18 commits

Author SHA1 Message Date
goaaats
c7dd694a53 Revert "Prevent ImGui text box methods from cloning unchanged input every frame"
This reverts commit db5f27518f.
Causes issues with certain flags.
2025-12-20 02:02:57 +01:00
CMDRNuffin
db5f27518f Prevent ImGui text box methods from cloning unchanged input every frame
The overloads taking a string by ref for the input text of the various
ways to display a text box would all take the input string, copy it into
a buffer for imgui and then unconditionally produce a new string once
the imgui call returned. Now we only create a new string when the return
value of the native function actually indicates that the text changed.

This makes the GC happy, and also users like me who like to make the GC
happy.

Other side effects: The assumption that the reference doesn't change if
the method returns false, which is very reasonable IMO, is now correct.
2025-12-19 01:24:43 +01:00
MidoriKami
d47a41b295 Fix NET14 Spans defaulting to ReadOnlySpan 2025-11-30 12:48:49 -08:00
Soreepeong
b66860cdba Add cond=0 default to SetDragDropPayload 2025-08-09 10:14:30 +09:00
Soreepeong
bd824130bd Fix InputTextEx return type 2025-08-09 09:58:14 +09:00
Soreepeong
0ce4f6d598 Add back ImGui.ArrowButton 2025-08-09 08:23:38 +09:00
Soreepeong
afe58dae76 Make ImU8String not IDisposable 2025-08-09 08:23:38 +09:00
Soreepeong
cc21480d21 Add overloads for InputText which callbacks take Ptr instead 2025-08-09 08:23:38 +09:00
Soreepeong
28658b4889 Fix ImGui.Combo overload resolution priority 2025-08-09 08:23:38 +09:00
Soreepeong
5d8e4bee92 Fix ImGuiTextFilter function types 2025-08-09 08:23:37 +09:00
Soreepeong
3e2a6ec9cb Work around ActiveIdUsingKeyInputMask having a wrong type 2025-08-09 08:23:37 +09:00
srkizer
1f06006cc0
Fix combobox callback impl (#2347)
* Fix combobox callback impl

* Make ImGuiBackend delegates public

* Release ImGui focus when the game window loses focus
2025-08-06 19:18:40 -07:00
Soreepeong
4a2f890aa9 Add ClearWindowFocus 2025-08-07 07:52:46 +09:00
srkizer
3e40cad063
Use custom GetPinnableReference instead of deferring it to Span (#2345) 2025-08-06 09:03:50 -07:00
wolfcomp
2cd5c5bc68
fix input scalar not working the same way as normal imgui code (#2343) 2025-08-06 09:01:58 -07:00
Haselnussbomber
58fbff7c56
Update text-related ImGui calls (#2337)
* Update text-related ImGui calls

* Use ImU8String for SafeTextColored

* Restore wrapped calls

* Update MenuItem call

* Use ImGui.Text over ImGui.TextUnformatted

* Add ImGui.TextColoredWrapped

* Obsolete SafeText helpers

* Fix obsoleted calls

* SafeTextColored didn't exist before imgui-bindings

* Remove %% replacements
2025-08-04 15:46:43 -07:00
Kaz Wolfe
832288a76e
fix: compiler issue with MenuItem
Resolves #2336.
2025-08-04 11:34:23 -07:00
srkizer
c69329f592
Manual overloads for ImGui functions accepting text (#2319)
* 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
2025-08-04 11:14:00 -07:00