We now only create a new string if we either know the buffer changed or
the EnterReturnsTrue flag was set (because that one does a LOT while
still updating the buffer on every actual input), so I had to choose
between replicating all that behavior in each of the various InputText
methods (hell no, lol), scanning the buffer for actual changes (which
would require making another copy) or accepting that in that case we
would create a new string every frame.
This still makes the GC happy in the majority of cases, while giving
callers the option to take a slight performance hit for the convenience
EnterReturnsTrue provides.
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.
* Load new localization before firing change event
* Update texts in SettingsWindow when locale changes
* Localize settings search
* Update settings search input
- Disable when Credits are scrolling,
so Search Results aren't shown instead
- Select all on single click, as usual for a search bar
* Remove unused IsVisible property
* Fix General tab being unselected on language change
* Fix search results throwing, oops
* Missed using LocRef in EnumSettingsEntry
* Set CultureInfo before loading locs
* Change it to LazyLoc instead
So CheapLoc can export localizations...
* 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