Added ArrowButton(). Exposed ImGuiDir.

This commit is contained in:
omar
2018-03-03 20:08:03 +01:00
parent 1549c5cf5e
commit 8a4093f38b
5 changed files with 53 additions and 17 deletions

View File

@ -300,6 +300,12 @@ void ImGui::ShowDemoWindow(bool* p_open)
ImGui::PopID();
}
// Arrow buttons
float spacing = ImGui::GetStyle().ItemInnerSpacing.x;
if (ImGui::ArrowButton("##left", ImGuiDir_Left)) {}
ImGui::SameLine(0.0f, spacing);
if (ImGui::ArrowButton("##left", ImGuiDir_Right)) {}
ImGui::Text("Hover over me");
if (ImGui::IsItemHovered())
ImGui::SetTooltip("I am a tooltip");