@@ -739,7 +739,7 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags
739
739
740
740
// Render
741
741
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
742
- RenderNavHighlight (bb, id);
742
+ RenderNavCursor (bb, id);
743
743
RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
744
744
745
745
if (g.LogEnabled)
@@ -791,7 +791,7 @@ bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg, ImGuiBut
791
791
792
792
bool hovered, held;
793
793
bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);
794
- RenderNavHighlight (bb, id);
794
+ RenderNavCursor (bb, id);
795
795
796
796
IMGUI_TEST_ENGINE_ITEM_INFO(id, str_id, g.LastItemData.StatusFlags);
797
797
return pressed;
@@ -817,7 +817,7 @@ bool ImGui::ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size, ImGuiBu
817
817
// Render
818
818
const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
819
819
const ImU32 text_col = GetColorU32(ImGuiCol_Text);
820
- RenderNavHighlight (bb, id);
820
+ RenderNavCursor (bb, id);
821
821
RenderFrame(bb.Min, bb.Max, bg_col, true, g.Style.FrameRounding);
822
822
RenderArrow(window->DrawList, bb.Min + ImVec2(ImMax(0.0f, (size.x - g.FontSize) * 0.5f), ImMax(0.0f, (size.y - g.FontSize) * 0.5f)), text_col, dir);
823
823
@@ -858,7 +858,7 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos)
858
858
ImU32 bg_col = GetColorU32(held ? ImGuiCol_ButtonActive : ImGuiCol_ButtonHovered);
859
859
if (hovered)
860
860
window->DrawList->AddRectFilled(bb.Min, bb.Max, bg_col);
861
- RenderNavHighlight (bb, id, ImGuiNavHighlightFlags_Compact );
861
+ RenderNavCursor (bb, id, ImGuiNavRenderCursorFlags_Compact );
862
862
ImU32 cross_col = GetColorU32(ImGuiCol_Text);
863
863
ImVec2 cross_center = bb.GetCenter() - ImVec2(0.5f, 0.5f);
864
864
float cross_extent = g.FontSize * 0.5f * 0.7071f - 1.0f;
@@ -885,7 +885,7 @@ bool ImGui::CollapseButton(ImGuiID id, const ImVec2& pos)
885
885
ImU32 text_col = GetColorU32(ImGuiCol_Text);
886
886
if (hovered || held)
887
887
window->DrawList->AddRectFilled(bb.Min, bb.Max, bg_col);
888
- RenderNavHighlight (bb, id, ImGuiNavHighlightFlags_Compact );
888
+ RenderNavCursor (bb, id, ImGuiNavRenderCursorFlags_Compact );
889
889
RenderArrow(window->DrawList, bb.Min, text_col, window->Collapsed ? ImGuiDir_Right : ImGuiDir_Down, 1.0f);
890
890
891
891
// Switch to moving the window after mouse is moved beyond the initial drag threshold
@@ -1092,7 +1092,7 @@ bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& imag
1092
1092
1093
1093
// Render
1094
1094
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
1095
- RenderNavHighlight (bb, id);
1095
+ RenderNavCursor (bb, id);
1096
1096
RenderFrame(bb.Min, bb.Max, col, true, ImClamp((float)ImMin(padding.x, padding.y), 0.0f, g.Style.FrameRounding));
1097
1097
if (bg_col.w > 0.0f)
1098
1098
window->DrawList->AddRectFilled(bb.Min + padding, bb.Max - padding, GetColorU32(bg_col));
@@ -1183,7 +1183,7 @@ bool ImGui::Checkbox(const char* label, bool* v)
1183
1183
const bool mixed_value = (g.LastItemData.ItemFlags & ImGuiItemFlags_MixedValue) != 0;
1184
1184
if (is_visible)
1185
1185
{
1186
- RenderNavHighlight (total_bb, id);
1186
+ RenderNavCursor (total_bb, id);
1187
1187
RenderFrame(check_bb.Min, check_bb.Max, GetColorU32((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), true, style.FrameRounding);
1188
1188
ImU32 check_col = GetColorU32(ImGuiCol_CheckMark);
1189
1189
if (mixed_value)
@@ -1285,7 +1285,7 @@ bool ImGui::RadioButton(const char* label, bool active)
1285
1285
if (pressed)
1286
1286
MarkItemEdited(id);
1287
1287
1288
- RenderNavHighlight (total_bb, id);
1288
+ RenderNavCursor (total_bb, id);
1289
1289
const int num_segment = window->DrawList->_CalcCircleAutoSegmentCount(radius);
1290
1290
window->DrawList->AddCircleFilled(center, radius, GetColorU32((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), num_segment);
1291
1291
if (active)
@@ -1425,7 +1425,7 @@ bool ImGui::TextLink(const char* label)
1425
1425
1426
1426
bool hovered, held;
1427
1427
bool pressed = ButtonBehavior(bb, id, &hovered, &held);
1428
- RenderNavHighlight (bb, id, ImGuiNavHighlightFlags_None );
1428
+ RenderNavCursor (bb, id);
1429
1429
1430
1430
if (hovered)
1431
1431
SetMouseCursor(ImGuiMouseCursor_Hand);
@@ -1856,7 +1856,7 @@ bool ImGui::BeginCombo(const char* label, const char* preview_value, ImGuiComboF
1856
1856
// Render shape
1857
1857
const ImU32 frame_col = GetColorU32(hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg);
1858
1858
const float value_x2 = ImMax(bb.Min.x, bb.Max.x - arrow_size);
1859
- RenderNavHighlight (bb, id);
1859
+ RenderNavCursor (bb, id);
1860
1860
if (!(flags & ImGuiComboFlags_NoPreview))
1861
1861
window->DrawList->AddRectFilled(bb.Min, ImVec2(value_x2, bb.Max.y), frame_col, style.FrameRounding, (flags & ImGuiComboFlags_NoArrowButton) ? ImDrawFlags_RoundCornersAll : ImDrawFlags_RoundCornersLeft);
1862
1862
if (!(flags & ImGuiComboFlags_NoArrowButton))
@@ -2658,7 +2658,7 @@ bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data,
2658
2658
2659
2659
// Draw frame
2660
2660
const ImU32 frame_col = GetColorU32(g.ActiveId == id ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg);
2661
- RenderNavHighlight (frame_bb, id);
2661
+ RenderNavCursor (frame_bb, id);
2662
2662
RenderFrame(frame_bb.Min, frame_bb.Max, frame_col, true, style.FrameRounding);
2663
2663
2664
2664
// Drag behavior
@@ -3240,7 +3240,7 @@ bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* p_dat
3240
3240
3241
3241
// Draw frame
3242
3242
const ImU32 frame_col = GetColorU32(g.ActiveId == id ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg);
3243
- RenderNavHighlight (frame_bb, id);
3243
+ RenderNavCursor (frame_bb, id);
3244
3244
RenderFrame(frame_bb.Min, frame_bb.Max, frame_col, true, g.Style.FrameRounding);
3245
3245
3246
3246
// Slider behavior
@@ -3389,7 +3389,7 @@ bool ImGui::VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType d
3389
3389
3390
3390
// Draw frame
3391
3391
const ImU32 frame_col = GetColorU32(g.ActiveId == id ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg);
3392
- RenderNavHighlight (frame_bb, id);
3392
+ RenderNavCursor (frame_bb, id);
3393
3393
RenderFrame(frame_bb.Min, frame_bb.Max, frame_col, true, g.Style.FrameRounding);
3394
3394
3395
3395
// Slider behavior
@@ -5102,7 +5102,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
5102
5102
// Render frame
5103
5103
if (!is_multiline)
5104
5104
{
5105
- RenderNavHighlight (frame_bb, id);
5105
+ RenderNavCursor (frame_bb, id);
5106
5106
RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding);
5107
5107
}
5108
5108
@@ -6113,7 +6113,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
6113
6113
else
6114
6114
window->DrawList->AddRectFilled(bb_inner.Min, bb_inner.Max, GetColorU32(col_source), rounding);
6115
6115
}
6116
- RenderNavHighlight (bb, id);
6116
+ RenderNavCursor (bb, id);
6117
6117
if ((flags & ImGuiColorEditFlags_NoBorder) == 0)
6118
6118
{
6119
6119
if (g.Style.FrameBorderSize > 0.0f)
@@ -6677,15 +6677,15 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
6677
6677
// Render
6678
6678
{
6679
6679
const ImU32 text_col = GetColorU32(ImGuiCol_Text);
6680
- ImGuiNavHighlightFlags nav_highlight_flags = ImGuiNavHighlightFlags_Compact ;
6680
+ ImGuiNavRenderCursorFlags nav_render_cursor_flags = ImGuiNavRenderCursorFlags_Compact ;
6681
6681
if (is_multi_select)
6682
- nav_highlight_flags |= ImGuiNavHighlightFlags_AlwaysDraw ; // Always show the nav rectangle
6682
+ nav_render_cursor_flags |= ImGuiNavRenderCursorFlags_AlwaysDraw ; // Always show the nav rectangle
6683
6683
if (display_frame)
6684
6684
{
6685
6685
// Framed type
6686
6686
const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
6687
6687
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, true, style.FrameRounding);
6688
- RenderNavHighlight (frame_bb, id, nav_highlight_flags );
6688
+ RenderNavCursor (frame_bb, id, nav_render_cursor_flags );
6689
6689
if (flags & ImGuiTreeNodeFlags_Bullet)
6690
6690
RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.60f, text_pos.y + g.FontSize * 0.5f), text_col);
6691
6691
else if (!is_leaf)
@@ -6705,7 +6705,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
6705
6705
const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
6706
6706
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, false);
6707
6707
}
6708
- RenderNavHighlight (frame_bb, id, nav_highlight_flags );
6708
+ RenderNavCursor (frame_bb, id, nav_render_cursor_flags );
6709
6709
if (flags & ImGuiTreeNodeFlags_Bullet)
6710
6710
RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.5f, text_pos.y + g.FontSize * 0.5f), text_col);
6711
6711
else if (!is_leaf)
@@ -7026,10 +7026,10 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
7026
7026
}
7027
7027
if (g.NavId == id)
7028
7028
{
7029
- ImGuiNavHighlightFlags nav_highlight_flags = ImGuiNavHighlightFlags_Compact | ImGuiNavHighlightFlags_NoRounding ;
7029
+ ImGuiNavRenderCursorFlags nav_render_cursor_flags = ImGuiNavRenderCursorFlags_Compact | ImGuiNavRenderCursorFlags_NoRounding ;
7030
7030
if (is_multi_select)
7031
- nav_highlight_flags |= ImGuiNavHighlightFlags_AlwaysDraw ; // Always show the nav rectangle
7032
- RenderNavHighlight (bb, id, nav_highlight_flags );
7031
+ nav_render_cursor_flags |= ImGuiNavRenderCursorFlags_AlwaysDraw ; // Always show the nav rectangle
7032
+ RenderNavCursor (bb, id, nav_render_cursor_flags );
7033
7033
}
7034
7034
}
7035
7035
@@ -10109,7 +10109,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
10109
10109
float y_offset = 1.0f * g.CurrentDpiScale;
10110
10110
display_draw_list->AddLine(bb.GetTL() + ImVec2(x_offset, y_offset), bb.GetTR() + ImVec2(-x_offset, y_offset), GetColorU32(tab_bar_focused ? ImGuiCol_TabSelectedOverline : ImGuiCol_TabDimmedSelectedOverline), style.TabBarOverlineSize);
10111
10111
}
10112
- RenderNavHighlight (bb, id);
10112
+ RenderNavCursor (bb, id);
10113
10113
10114
10114
// Select with right mouse button. This is so the common idiom for context menu automatically highlight the current widget.
10115
10115
const bool hovered_unblocked = IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup);
0 commit comments