Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Update to v1.85 #160

Merged
merged 2 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions IO.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ func (io IO) WantCaptureMouse() bool {
return C.iggWantCaptureMouse(io.handle) != 0
}

// WantCaptureMouseUnlessPopupClose returns true if imgui will use the mouse inputs.
// Alternative to WantCaptureMouse: (WantCaptureMouse == true &&
// WantCaptureMouseUnlessPopupClose == false) when a click over void is
// expected to close a popup.
func (io IO) WantCaptureMouseUnlessPopupClose() bool {
return C.iggWantCaptureMouseUnlessPopupClose(io.handle) != 0
}

// WantCaptureKeyboard returns true if imgui will use the keyboard inputs.
// Do not dispatch them to your main game/application (in both cases, always pass keyboard inputs to imgui).
//
Expand Down
2 changes: 1 addition & 1 deletion Main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import (

func TestVersion(t *testing.T) {
version := imgui.Version()
assert.Equal(t, "1.84.2", version)
assert.Equal(t, "1.85", version)
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ This library does not mirror the versions of the wrapped **Dear ImGui**. The sem
* Minor changes: Extensions in API. Typically done through small version increments of **Dear ImGui** and/or exposing further features in a compatible way.
* Patch changes: Bug fixes - either in the wrapper or the wrapped **Dear ImGui**, given that the API & behaviour remains the same.

<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a committed merge conflict. Please avoid those.

At the moment, this library uses version [1.85](https://github.com/ocornut/imgui/releases/tag/v1.85) of **Dear ImGui**.
=======
At the moment, this library uses version [1.84.2](https://github.com/ocornut/imgui/releases/tag/v1.84.2) of **Dear ImGui**.
>>>>>>> 2c7a7b42df7b23fd6f35fa65bdadea656107a3c9

## Examples
A separate repository was created to host ported examples and reference implementations.
Expand Down
14 changes: 10 additions & 4 deletions State.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ const (
// Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this.
// Use WantCaptureMouse instead.
FocusedFlagsAnyWindow FocusedFlags = 1 << 2
// FocusedFlagsNoPopupHierarchy does not consider popup hierarchy (do not treat popup emitter
// as parent of popup) when used with FocusedFlagsChildWindows or FocusedFlagsRootWindow.
FocusedFlagsNoPopupHierarchy FocusedFlags = 1 << 3

FocusedFlagsRootAndChildWindows = FocusedFlagsRootWindow | FocusedFlagsChildWindows
)
Expand Down Expand Up @@ -137,15 +140,18 @@ const (
HoveredFlagsRootWindow HoveredFlags = 1 << 1
// HoveredFlagsAnyWindow IsWindowHovered() only: Return true if any window is hovered.
HoveredFlagsAnyWindow HoveredFlags = 1 << 2
// HoveredFlagsNoPopupHierarchy makes only IsWindowHovered() not consider popup hierarchy (do not treat popup emitter
// as parent of popup) when used with HoveredFlagsRootWindow or HoveredFlagsRootWindow.
HoveredFlagsNoPopupHierarchy HoveredFlags = 1 << 3
// HoveredFlagsAllowWhenBlockedByPopup Return true even if a popup window is normally blocking access to this item/window.
HoveredFlagsAllowWhenBlockedByPopup HoveredFlags = 1 << 3
HoveredFlagsAllowWhenBlockedByPopup HoveredFlags = 1 << 5
// HoveredFlagsAllowWhenBlockedByActiveItem Return true even if an active item is blocking access to this item/window.
// Useful for Drag and Drop patterns.
HoveredFlagsAllowWhenBlockedByActiveItem HoveredFlags = 1 << 5
HoveredFlagsAllowWhenBlockedByActiveItem HoveredFlags = 1 << 7
// HoveredFlagsAllowWhenOverlapped Return true even if the position is overlapped by another window.
HoveredFlagsAllowWhenOverlapped HoveredFlags = 1 << 6
HoveredFlagsAllowWhenOverlapped HoveredFlags = 1 << 8
// HoveredFlagsAllowWhenDisabled Return true even if the item is disabled.
HoveredFlagsAllowWhenDisabled HoveredFlags = 1 << 7
HoveredFlagsAllowWhenDisabled HoveredFlags = 1 << 9

HoveredFlagsRectOnly = HoveredFlagsAllowWhenBlockedByPopup | HoveredFlagsAllowWhenBlockedByActiveItem | HoveredFlagsAllowWhenOverlapped
HoveredFlagsRootAndChildWindows = HoveredFlagsRootWindow | HoveredFlagsChildWindows
Expand Down
7 changes: 6 additions & 1 deletion Window.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,13 @@ func WindowContentRegionMax() Vec2 {
}

// WindowContentRegionWidth returns the width of the content boundary, in window coordinates.
//
// DEPRECATED: in v1.85, GetWindowContentRegionWidth() function has been removed.
// This function now returns GetWindowContentRegionMax().x - GetWindowContentRegionMin().x,
// as per v1.85 release notes. Please note it's not very useful in practice, and
// using GetContentRegionAvail().x is generally a better choice.
func WindowContentRegionWidth() float32 {
return float32(C.iggGetWindowContentRegionWidth())
return WindowContentRegionMax().X - WindowContentRegionMin().X
}

// SetNextWindowPosV sets next window position.
Expand Down
2 changes: 1 addition & 1 deletion imgui/imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty.
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger and other debug tools: ShowMetricsWindow() and ShowStackToolWindow() will be empty.

//---- Don't implement some functions to reduce linkage requirements.
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
Expand Down
Loading