Skip to content

Commit

Permalink
Internals: Removed unused internal variant of ArrowButton().
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Apr 7, 2018
1 parent 82b7a39 commit 6d0c720
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
26 changes: 0 additions & 26 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7803,32 +7803,6 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos, float radius)
return pressed;
}

// [Internal]
bool ImGui::ArrowButton(ImGuiID id, ImGuiDir dir, ImVec2 padding, ImGuiButtonFlags flags)
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
if (window->SkipItems)
return false;

const ImGuiStyle& style = g.Style;

const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize + padding.x * 2.0f, g.FontSize + padding.y * 2.0f));
ItemSize(bb, style.FramePadding.y);
if (!ItemAdd(bb, id))
return false;

bool hovered, held;
bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);

const ImU32 col = GetColorU32((hovered && held) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
RenderNavHighlight(bb, id);
RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
RenderArrow(bb.Min + padding, dir, 1.0f);

return pressed;
}

void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col)
{
ImGuiWindow* window = GetCurrentWindow();
Expand Down
1 change: 0 additions & 1 deletion imgui_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,6 @@ namespace ImGui
IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0);
IMGUI_API bool CloseButton(ImGuiID id, const ImVec2& pos, float radius);
IMGUI_API bool ArrowButton(ImGuiID id, ImGuiDir dir, ImVec2 padding, ImGuiButtonFlags flags = 0);

IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags = 0);
IMGUI_API bool SliderFloatN(const char* label, float* v, int components, float v_min, float v_max, const char* display_format, float power);
Expand Down

0 comments on commit 6d0c720

Please sign in to comment.