mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
(amended)
This commit is contained in:
@ -808,6 +808,12 @@ enum ImGuiButtonFlagsPrivate_
|
||||
ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickRelease
|
||||
};
|
||||
|
||||
// Extend ImGuiComboFlags_
|
||||
enum ImGuiComboFlagsPrivate_
|
||||
{
|
||||
ImGuiComboFlags_CustomPreview = 1 << 20 // enable BeginComboPreview()
|
||||
};
|
||||
|
||||
// Extend ImGuiSliderFlags_
|
||||
enum ImGuiSliderFlagsPrivate_
|
||||
{
|
||||
@ -996,6 +1002,19 @@ struct ImGuiStyleMod
|
||||
ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v) { VarIdx = idx; BackupFloat[0] = v.x; BackupFloat[1] = v.y; }
|
||||
};
|
||||
|
||||
// Storage data for BeginComboPreview()/EndComboPreview()
|
||||
struct IMGUI_API ImGuiComboPreviewData
|
||||
{
|
||||
ImRect PreviewRect;
|
||||
ImVec2 BackupCursorPos;
|
||||
ImVec2 BackupCursorMaxPos;
|
||||
ImVec2 BackupCursorPosPrevLine;
|
||||
float BackupPrevLineTextBaseOffset;
|
||||
ImGuiLayoutType BackupLayout;
|
||||
|
||||
ImGuiComboPreviewData() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
// Stacked storage data for BeginGroup()/EndGroup()
|
||||
struct IMGUI_API ImGuiGroupData
|
||||
{
|
||||
@ -1552,6 +1571,7 @@ struct ImGuiContext
|
||||
float ColorEditLastSat; // Backup of last Saturation associated to LastColor[3], so we can restore Saturation in lossy RGB<>HSV round trips
|
||||
float ColorEditLastColor[3];
|
||||
ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker.
|
||||
ImGuiComboPreviewData ComboPreviewData;
|
||||
float SliderCurrentAccum; // Accumulated slider delta when using navigation controls.
|
||||
bool SliderCurrentAccumDirty; // Has the accumulated slider delta changed since last time we tried to apply it?
|
||||
bool DragCurrentAccumDirty;
|
||||
@ -2416,6 +2436,8 @@ namespace ImGui
|
||||
|
||||
// Combos
|
||||
IMGUI_API bool BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags flags);
|
||||
IMGUI_API bool BeginComboPreview();
|
||||
IMGUI_API void EndComboPreview();
|
||||
|
||||
// Gamepad/Keyboard Navigation
|
||||
IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);
|
||||
|
Reference in New Issue
Block a user