#pragma once #include "Engine/Core/Types/BaseTypes.h" #include "Engine/Core/Delegate.h" API_INJECT_CODE(cpp, "#include \"Editor/Utilities/ScreenUtilities/ScreenUtilities.h\""); /// /// Platform-dependent screen utilties. /// API_CLASS(Static, Name = "ScreenUtilities", Tag = "NativeInvokeUseName") class FLAXENGINE_API ScreenUtilities { public: static struct FLAXENGINE_API ScriptingTypeInitializer TypeInitializer; /// /// Gets the pixel color at the specified coordinates. /// /// X Coordinate to read. /// Y Coordinate to read. /// Pixel color at the specified coordinates. API_FUNCTION() static Color32 GetPixelAt(int32 x, int32 y); /// /// Gets the cursor position, in screen cooridnates. /// /// Cursor position, in screen coordinates. API_FUNCTION() static Int2 GetScreenCursorPosition(); /// /// Starts async color picking. Will return a color through ColorReturnCallback. /// /// Called when PickColor() is finished. /// API_EVENT() static Delegate PickColorDone; };