mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-23 21:09:01 +08:00
Removed ImGuiButtonFlags_MouseButtonDefault_.
This commit is contained in:
parent
2a418f054d
commit
67d886fd63
@ -43,6 +43,8 @@ Breaking changes:
|
||||
|
||||
- Reordered various ImGuiInputTextFlags values. This should not be breaking unless
|
||||
you are using generated headers that have values not matching the main library.
|
||||
- Removed ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft
|
||||
from imgui.h, was mostly unused and misleading.
|
||||
|
||||
Other changes:
|
||||
|
||||
|
@ -431,6 +431,7 @@ CODE
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2024/06/06 (1.90.8) - reordered ImGuiInputTextFlags values. This should not be breaking unless you are using generated headers that have values not matching the main library.
|
||||
- 2024/06/06 (1.90.8) - removed 'ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft', was mostly unused and misleading.
|
||||
- 2024/05/27 (1.90.7) - commented out obsolete symbols marked obsolete in 1.88 (May 2022):
|
||||
- old: CaptureKeyboardFromApp(bool)
|
||||
- new: SetNextFrameWantCaptureKeyboard(bool)
|
||||
|
8
imgui.h
8
imgui.h
@ -1657,10 +1657,8 @@ enum ImGuiButtonFlags_
|
||||
ImGuiButtonFlags_MouseButtonLeft = 1 << 0, // React on left mouse button (default)
|
||||
ImGuiButtonFlags_MouseButtonRight = 1 << 1, // React on right mouse button
|
||||
ImGuiButtonFlags_MouseButtonMiddle = 1 << 2, // React on center mouse button
|
||||
|
||||
// [Internal]
|
||||
ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle,
|
||||
ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft,
|
||||
ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle, // [Internal]
|
||||
//ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft,
|
||||
};
|
||||
|
||||
// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton()
|
||||
@ -3265,7 +3263,7 @@ namespace ImGui
|
||||
static inline void PopAllowKeyboardFocus() { PopTabStop(); }
|
||||
// OBSOLETED in 1.89 (from August 2022)
|
||||
IMGUI_API bool ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)); // Use new ImageButton() signature (explicit item id, regular FramePadding)
|
||||
// OBSOLETED in 1.87 (from February 2022)
|
||||
// OBSOLETED in 1.87 (from February 2022 but more formally obsoleted April 2024)
|
||||
IMGUI_API ImGuiKey GetKeyIndex(ImGuiKey key); // Map ImGuiKey_* values into legacy native key index. == io.KeyMap[key]. When using a 1.87+ backend using io.AddKeyEvent(), calling GetKeyIndex() with ANY ImGuiKey_XXXX values will return the same value!
|
||||
//static inline ImGuiKey GetKeyIndex(ImGuiKey key) { IM_ASSERT(key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END); return key; }
|
||||
|
||||
|
@ -488,7 +488,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
|
||||
// Default only reacts to left mouse button
|
||||
if ((flags & ImGuiButtonFlags_MouseButtonMask_) == 0)
|
||||
flags |= ImGuiButtonFlags_MouseButtonDefault_;
|
||||
flags |= ImGuiButtonFlags_MouseButtonLeft;
|
||||
|
||||
// Default behavior requires click + release inside bounding box
|
||||
if ((flags & ImGuiButtonFlags_PressedOnMask_) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user