mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-26 06:48:26 +01:00
Changelog, minor tweaks. (#2585)
This commit is contained in:
parent
c0e690318a
commit
2742663ad2
@ -62,6 +62,7 @@ Other Changes:
|
|||||||
- Demo: Added full "Dear ImGui" prefix to the title of "Dear ImGui Demo" and "Dear ImGui Metrics" windows.
|
- Demo: Added full "Dear ImGui" prefix to the title of "Dear ImGui Demo" and "Dear ImGui Metrics" windows.
|
||||||
- Backends: Add native Mac clipboard copy/paste default implementation in core library to match what we are
|
- Backends: Add native Mac clipboard copy/paste default implementation in core library to match what we are
|
||||||
dealing with Win32, and to facilitate integration in custom engines. (#2546) [@andrewwillmott]
|
dealing with Win32, and to facilitate integration in custom engines. (#2546) [@andrewwillmott]
|
||||||
|
- Backends: OSX: imgui_impl_osx: Added mouse cursor support. (#2585, #1873) [@actboy168]
|
||||||
- Examples/Backends: Don't filter characters under 0x10000 before calling io.AddInputCharacter(),
|
- Examples/Backends: Don't filter characters under 0x10000 before calling io.AddInputCharacter(),
|
||||||
the filtering is done in io.AddInputCharacter() itself. This is in prevision for fuller Unicode
|
the filtering is done in io.AddInputCharacter() itself. This is in prevision for fuller Unicode
|
||||||
support. (#2538, #2541)
|
support. (#2538, #2541)
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
// dear imgui: Platform Binding for OSX / Cocoa
|
// dear imgui: Platform Binding for OSX / Cocoa
|
||||||
// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
|
// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
|
||||||
// [BETA] Beta bindings, not well tested. If you want a portable application, prefer using the Glfw or SDL platform bindings on Mac.
|
// [ALPHA] Early bindings, not well tested. If you want a portable application, prefer using the GLFW or SDL platform bindings on Mac.
|
||||||
|
|
||||||
|
// Implemented features:
|
||||||
|
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
|
||||||
|
// [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this back-end).
|
||||||
// Issues:
|
// Issues:
|
||||||
// [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters]..
|
// [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters]..
|
||||||
// [ ] Platform: Mouse cursor shapes and visibility are not supported (see end of https://github.com/glfw/glfw/issues/427)
|
|
||||||
|
|
||||||
@class NSEvent;
|
@class NSEvent;
|
||||||
@class NSView;
|
@class NSView;
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
// dear imgui: Platform Binding for OSX / Cocoa
|
// dear imgui: Platform Binding for OSX / Cocoa
|
||||||
// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
|
// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
|
||||||
// [BETA] Beta bindings, not well tested. If you want a portable application, prefer using the Glfw or SDL platform bindings on Mac.
|
// [ALPHA] Early bindings, not well tested. If you want a portable application, prefer using the GLFW or SDL platform bindings on Mac.
|
||||||
|
|
||||||
|
// Implemented features:
|
||||||
|
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
|
||||||
|
// [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this back-end).
|
||||||
// Issues:
|
// Issues:
|
||||||
// [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters]..
|
// [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters]..
|
||||||
// [ ] Platform: Mouse cursor shapes and visibility are not supported (see end of https://github.com/glfw/glfw/issues/427)
|
|
||||||
|
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_osx.h"
|
#include "imgui_impl_osx.h"
|
||||||
@ -12,6 +14,7 @@
|
|||||||
|
|
||||||
// CHANGELOG
|
// CHANGELOG
|
||||||
// (minor and older changes stripped away, please see git history for details)
|
// (minor and older changes stripped away, please see git history for details)
|
||||||
|
// 2019-05-28: Inputs: Added mouse cursor shape and visibility support.
|
||||||
// 2019-05-18: Misc: Removed clipboard handlers as they are now supported by core imgui.cpp.
|
// 2019-05-18: Misc: Removed clipboard handlers as they are now supported by core imgui.cpp.
|
||||||
// 2019-05-11: Inputs: Don't filter character values before calling AddInputCharacter() apart from 0xF700..0xFFFF range.
|
// 2019-05-11: Inputs: Don't filter character values before calling AddInputCharacter() apart from 0xF700..0xFFFF range.
|
||||||
// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
|
// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
|
||||||
@ -66,23 +69,16 @@ bool ImGui_ImplOSX_Init()
|
|||||||
io.KeyMap[ImGuiKey_Y] = 'Y';
|
io.KeyMap[ImGuiKey_Y] = 'Y';
|
||||||
io.KeyMap[ImGuiKey_Z] = 'Z';
|
io.KeyMap[ImGuiKey_Z] = 'Z';
|
||||||
|
|
||||||
|
// Load cursors. Some of them are undocumented.
|
||||||
g_MouseCursorHidden = false;
|
g_MouseCursorHidden = false;
|
||||||
g_MouseCursors[ImGuiMouseCursor_Arrow] = [NSCursor arrowCursor];
|
g_MouseCursors[ImGuiMouseCursor_Arrow] = [NSCursor arrowCursor];
|
||||||
g_MouseCursors[ImGuiMouseCursor_TextInput] = [NSCursor IBeamCursor];
|
g_MouseCursors[ImGuiMouseCursor_TextInput] = [NSCursor IBeamCursor];
|
||||||
g_MouseCursors[ImGuiMouseCursor_ResizeAll] = [NSCursor closedHandCursor];
|
g_MouseCursors[ImGuiMouseCursor_ResizeAll] = [NSCursor closedHandCursor];
|
||||||
g_MouseCursors[ImGuiMouseCursor_Hand] = [NSCursor pointingHandCursor];
|
g_MouseCursors[ImGuiMouseCursor_Hand] = [NSCursor pointingHandCursor];
|
||||||
g_MouseCursors[ImGuiMouseCursor_ResizeNS] = [NSCursor respondsToSelector:@selector(_windowResizeNorthSouthCursor)]
|
g_MouseCursors[ImGuiMouseCursor_ResizeNS] = [NSCursor respondsToSelector:@selector(_windowResizeNorthSouthCursor)] ? [NSCursor _windowResizeNorthSouthCursor] : [NSCursor resizeUpDownCursor];
|
||||||
? [NSCursor _windowResizeNorthSouthCursor]
|
g_MouseCursors[ImGuiMouseCursor_ResizeEW] = [NSCursor respondsToSelector:@selector(_windowResizeEastWestCursor)] ? [NSCursor _windowResizeEastWestCursor] : [NSCursor resizeLeftRightCursor];
|
||||||
: [NSCursor resizeUpDownCursor];
|
g_MouseCursors[ImGuiMouseCursor_ResizeNESW] = [NSCursor respondsToSelector:@selector(_windowResizeNorthEastSouthWestCursor)] ? [NSCursor _windowResizeNorthEastSouthWestCursor] : [NSCursor closedHandCursor];
|
||||||
g_MouseCursors[ImGuiMouseCursor_ResizeEW] = [NSCursor respondsToSelector:@selector(_windowResizeEastWestCursor)]
|
g_MouseCursors[ImGuiMouseCursor_ResizeNWSE] = [NSCursor respondsToSelector:@selector(_windowResizeNorthWestSouthEastCursor)] ? [NSCursor _windowResizeNorthWestSouthEastCursor] : [NSCursor closedHandCursor];
|
||||||
? [NSCursor _windowResizeEastWestCursor]
|
|
||||||
: [NSCursor resizeLeftRightCursor];
|
|
||||||
g_MouseCursors[ImGuiMouseCursor_ResizeNESW] = [NSCursor respondsToSelector:@selector(_windowResizeNorthEastSouthWestCursor)]
|
|
||||||
? [NSCursor _windowResizeNorthEastSouthWestCursor]
|
|
||||||
: [NSCursor closedHandCursor];
|
|
||||||
g_MouseCursors[ImGuiMouseCursor_ResizeNWSE] = [NSCursor respondsToSelector:@selector(_windowResizeNorthWestSouthEastCursor)]
|
|
||||||
? [NSCursor _windowResizeNorthWestSouthEastCursor]
|
|
||||||
: [NSCursor closedHandCursor];
|
|
||||||
|
|
||||||
// We don't set the io.SetClipboardTextFn/io.GetClipboardTextFn handlers,
|
// We don't set the io.SetClipboardTextFn/io.GetClipboardTextFn handlers,
|
||||||
// because imgui.cpp has a default for them that works with OSX.
|
// because imgui.cpp has a default for them that works with OSX.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user