From 8c20ba83de53338ada8fed81eb40811eb97547aa Mon Sep 17 00:00:00 2001 From: Menotdan <32620310+Menotdan@users.noreply.github.com> Date: Thu, 18 May 2023 22:10:35 -0400 Subject: [PATCH] Lay out what needs to be implemented for Mac --- .../ScreenUtilities/ScreenUtilitiesMac.cpp | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Source/Editor/Utilities/ScreenUtilities/ScreenUtilitiesMac.cpp b/Source/Editor/Utilities/ScreenUtilities/ScreenUtilitiesMac.cpp index 8b816608b..2a81ab301 100644 --- a/Source/Editor/Utilities/ScreenUtilities/ScreenUtilitiesMac.cpp +++ b/Source/Editor/Utilities/ScreenUtilities/ScreenUtilitiesMac.cpp @@ -2,6 +2,39 @@ #include #include +Color32 ScreenUtilities::GetPixelAt(int32 x, int32 y) +{ + // Called from C# for live updates to the color. + return { 0, 0, 0, 255 }; +} + +Int2 ScreenUtilities::GetScreenCursorPosition() +{ + // Called from C# for live updates to the color. + + return { 0, 0 }; +} + +class ScreenUtilitiesMac +{ +public: + static void BlockAndReadMouse(); +}; + +void ScreenUtilitiesMac::BlockAndReadMouse() +{ + // Maybe you don't need this if you go with NSColorSampler +} + +Delegate ScreenUtilities::PickColorDone; + +void ScreenUtilities::PickColor() +{ + // This is what C# calls to start the color picking sequence + // This should stop mouse clicks from working for one click, and that click is on the selected color + // There is a class called NSColorSample that might implement that for you, but maybe not. + // It also might just work to copy the Linux Impl since Mac uses X as well, right? +} #endif