|
|
|
@ -74,12 +74,12 @@ Index of this file:
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// Those MIN/MAX values are not define because we need to point to them
|
|
|
|
|
static const char IM_S8_MIN = -128;
|
|
|
|
|
static const char IM_S8_MAX = 127;
|
|
|
|
|
static const signed char IM_S8_MIN = -128;
|
|
|
|
|
static const signed char IM_S8_MAX = 127;
|
|
|
|
|
static const unsigned char IM_U8_MIN = 0;
|
|
|
|
|
static const unsigned char IM_U8_MAX = 0xFF;
|
|
|
|
|
static const short IM_S16_MIN = -32768;
|
|
|
|
|
static const short IM_S16_MAX = 32767;
|
|
|
|
|
static const signed short IM_S16_MIN = -32768;
|
|
|
|
|
static const signed short IM_S16_MAX = 32767;
|
|
|
|
|
static const unsigned short IM_U16_MIN = 0;
|
|
|
|
|
static const unsigned short IM_U16_MAX = 0xFFFF;
|
|
|
|
|
static const ImS32 IM_S32_MIN = INT_MIN; // (-2147483647 - 1), (0x80000000);
|
|
|
|
@ -6667,6 +6667,8 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|
|
|
|
if (tab_appearing && (tab_bar->Flags & ImGuiTabBarFlags_AutoSelectNewTabs) && tab_bar->NextSelectedTabId == 0)
|
|
|
|
|
if (!tab_bar_appearing || tab_bar->SelectedTabId == 0)
|
|
|
|
|
tab_bar->NextSelectedTabId = id; // New tabs gets activated
|
|
|
|
|
if ((flags & ImGuiTabItemFlags_SetSelected) && (tab_bar->SelectedTabId != id)) // SetSelected can only be passed on explicit tab bar
|
|
|
|
|
tab_bar->NextSelectedTabId = id;
|
|
|
|
|
|
|
|
|
|
// Lock visibility
|
|
|
|
|
bool tab_contents_visible = (tab_bar->VisibleTabId == id);
|
|
|
|
@ -6718,9 +6720,9 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|
|
|
|
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
|
|
|
|
bool hovered, held;
|
|
|
|
|
bool pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags);
|
|
|
|
|
hovered |= (g.HoveredId == id);
|
|
|
|
|
if (pressed || ((flags & ImGuiTabItemFlags_SetSelected) && !tab_contents_visible)) // SetSelected can only be passed on explicit tab bar
|
|
|
|
|
if (pressed)
|
|
|
|
|
tab_bar->NextSelectedTabId = id;
|
|
|
|
|
hovered |= (g.HoveredId == id);
|
|
|
|
|
|
|
|
|
|
// Allow the close button to overlap unless we are dragging (in which case we don't want any overlapping tabs to be hovered)
|
|
|
|
|
if (!held)
|
|
|
|
|