// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #include "Engine/Core/Types/BaseTypes.h" #include "Engine/Core/Math/Color32.h" #include "Engine/Core/Math/Vector2.h" #include "Engine/Core/Delegate.h" /// /// Platform-dependent screen utilities. /// API_CLASS(Static) class FLAXENGINE_API ScreenUtilities { DECLARE_SCRIPTING_TYPE_MINIMAL(ScreenUtilities); /// /// Gets the pixel color at the specified coordinates. /// /// Screen-space coordinate to read. /// Pixel color at the specified coordinates. API_FUNCTION() static Color32 GetColorAt(const Float2& pos); /// /// Starts async color picking. Color will be returned through PickColorDone event when the actions ends (user selected the final color with a mouse). When action is active, GetColorAt can be used to read the current value. /// API_FUNCTION() static void PickColor(); /// /// Called when PickColor action is finished. /// API_EVENT() static Delegate PickColorDone; };