Obsoleted GetWindowContentRegionMin() and GetWindowContentRegionMax().

You should never need those functions. You can do everything with GetCursorScreenPos() and GetContentRegionAvail().
This commit is contained in:
ocornut
2024-07-25 15:50:30 +02:00
parent 55f54fa512
commit aad86b8756
4 changed files with 23 additions and 8 deletions

View File

@@ -46,6 +46,12 @@ Breaking changes:
- new: io.PlatformSetImeDataFn(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
It is expected that for a vast majority of users this is automatically set by core
library and/or platform backend so it won't have any effect.
- Obsoleted GetWindowContentRegionMin() and GetWindowContentRegionMax().
You should never need those functions. Always use GetCursorScreenPos() and GetContentRegionAvail().
Also consider that if you are using GetWindowPos() and GetCursorPos() you may also be making things
unnecessarily complicated. You can do everything with GetCursorScreenPos() and GetContentRegionAvail()!!
- GetWindowContentRegionMax().x - GetCursorPos().x --> GetContentRegionAvail().x
- GetWindowContentRegionMax().x + GetWindowPos().x --> GetCursorScreenPos().x + GetContentRegionAvail().x
- Item flag changes:
- Obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag()/PopItemFlag()
with ImGuiItemFlags_ButtonRepeat. Kept inline redirecting functions (will obsolete).