diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ee6230609..9351713b0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -38,7 +38,8 @@ Other Changes: - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat). - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly. - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909) - + - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut] + - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor. ----------------------------------------------------------------------- VERSION 1.62 (Released 2018-06-22) diff --git a/examples/imgui_impl_glfw.cpp b/examples/imgui_impl_glfw.cpp index bb9c66d9c..a51e5db98 100644 --- a/examples/imgui_impl_glfw.cpp +++ b/examples/imgui_impl_glfw.cpp @@ -14,6 +14,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor. // 2018-06-08: Misc: Extracted imgui_impl_glfw.cpp/.h away from the old combined GLFW+OpenGL/Vulkan examples. // 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag. // 2018-02-20: Inputs: Added support for mouse cursors (ImGui::GetMouseCursor() value, passed to glfwSetCursor()). diff --git a/examples/imgui_impl_sdl.cpp b/examples/imgui_impl_sdl.cpp index 25dabe851..19d67e344 100644 --- a/examples/imgui_impl_sdl.cpp +++ b/examples/imgui_impl_sdl.cpp @@ -15,6 +15,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor. // 2018-06-08: Misc: Extracted imgui_impl_sdl.cpp/.h away from the old combined SDL2+OpenGL/Vulkan examples. // 2018-06-08: Misc: ImGui_ImplSDL2_InitForOpenGL() now takes a SDL_GLContext parameter. // 2018-05-09: Misc: Fixed clipboard paste memory leak (we didn't call SDL_FreeMemory on the data returned by SDL_GetClipboardText). diff --git a/examples/imgui_impl_win32.cpp b/examples/imgui_impl_win32.cpp index eb5de13e5..bfbc5db4e 100644 --- a/examples/imgui_impl_win32.cpp +++ b/examples/imgui_impl_win32.cpp @@ -13,6 +13,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor. // 2018-06-10: Inputs: Fixed handling of mouse wheel messages to support fine position messages (typically sent by track-pads). // 2018-06-08: Misc: Extracted imgui_impl_win32.cpp/.h away from the old combined DX9/DX10/DX11/DX12 examples. // 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors and ImGuiBackendFlags_HasSetMousePos flags + honor ImGuiConfigFlags_NoMouseCursorChange flag. diff --git a/imgui.h b/imgui.h index 900bedc40..6463ec2e8 100644 --- a/imgui.h +++ b/imgui.h @@ -336,7 +336,7 @@ namespace ImGui IMGUI_API void PlotHistogram(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0)); IMGUI_API void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-1,0), const char* overlay = NULL); IMGUI_API void Bullet(); // draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses - + // Widgets: Combo Box // The new BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it. // The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. @@ -980,12 +980,12 @@ enum ImGuiMouseCursor_ ImGuiMouseCursor_None = -1, ImGuiMouseCursor_Arrow = 0, ImGuiMouseCursor_TextInput, // When hovering over InputText, etc. - ImGuiMouseCursor_ResizeAll, // Unused by imgui functions + ImGuiMouseCursor_ResizeAll, // (Unused by imgui functions) ImGuiMouseCursor_ResizeNS, // When hovering over an horizontal border ImGuiMouseCursor_ResizeEW, // When hovering over a vertical border or a column ImGuiMouseCursor_ResizeNESW, // When hovering over the bottom-left corner of a window ImGuiMouseCursor_ResizeNWSE, // When hovering over the bottom-right corner of a window - ImGuiMouseCursor_Hand, // When hoverinf over the HyperLink + ImGuiMouseCursor_Hand, // (Unused by imgui functions. Use for e.g. hyperlinks) ImGuiMouseCursor_COUNT // Obsolete names (will be removed) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index a8c41dce9..04c6dcea6 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -2157,7 +2157,7 @@ void ImGui::ShowDemoWindow(bool* p_open) if (ImGui::TreeNode("Mouse cursors")) { - const char* mouse_cursors_names[] = { "Arrow", "TextInput", "Move", "ResizeNS", "ResizeEW", "ResizeNESW", "ResizeNWSE" }; + const char* mouse_cursors_names[] = { "Arrow", "TextInput", "Move", "ResizeNS", "ResizeEW", "ResizeNESW", "ResizeNWSE", "Hand" }; IM_ASSERT(IM_ARRAYSIZE(mouse_cursors_names) == ImGuiMouseCursor_COUNT); ImGui::Text("Current mouse cursor = %d: %s", ImGui::GetMouseCursor(), mouse_cursors_names[ImGui::GetMouseCursor()]); diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 26002ca3a..131e48d56 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1345,28 +1345,28 @@ const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27; const unsigned int FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000; static const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] = { - "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- xx " - "..- -X.....X- X.X - X.X -X.....X - X.....X- x x " - "--- -XXX.XXX- X...X - X...X -X....X - X....X- x x " - "X - X.X - X.....X - X.....X -X...X - X...X- x x " - "XX - X.X -X.......X- X.......X -X..X.X - X.X..X- x x " - "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- x xxx " - "X..X - X.X - X.X - X.X -XX X.X - X.X XX- x x xxx " - "X...X - X.X - X.X - XX X.X XX - X.X - X.X - x x x xx " - "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - x x x x x " - "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -xxx x x x x x" - "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -x xx x x" - "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -x x x" - "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - x x" - "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - x x" - "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - x x" - "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - x x" - "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - x x " - "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- x x " - "X.X X..X - -X.......X- X.......X - XX XX - - x x " - "XX X..X - - X.....X - X.....X - X.X X.X - - x x " - " X..X - X...X - X...X - X..X X..X - - x x " - " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - - xxxxxxxxxx " + "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- XX " + "..- -X.....X- X.X - X.X -X.....X - X.....X- X..X " + "--- -XXX.XXX- X...X - X...X -X....X - X....X- X..X " + "X - X.X - X.....X - X.....X -X...X - X...X- X..X " + "XX - X.X -X.......X- X.......X -X..X.X - X.X..X- X..X " + "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- X..XXX " + "X..X - X.X - X.X - X.X -XX X.X - X.X XX- X..X..XXX " + "X...X - X.X - X.X - XX X.X XX - X.X - X.X - X..X..X..XX " + "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - X..X..X..X.X " + "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -XXX X..X..X..X..X" + "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -X..XX........X..X" + "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -X...X...........X" + "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - X..............X" + "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - X.............X" + "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - X.............X" + "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - X............X" + "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - X...........X " + "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- X..........X " + "X.X X..X - -X.......X- X.......X - XX XX - - X..........X " + "XX X..X - - X.....X - X.....X - X.X X.X - - X........X " + " X..X - X...X - X...X - X..X X..X - - X........X " + " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - - XXXXXXXXXX " "------------ - X - X -X.....................X- ------------------" " ----------------------------------- X...XXXXXXXXXXXXX...X - " " - X..X X..X - "