Color picker finally works, refactored the code.

This commit is contained in:
Menotdan
2023-05-16 13:54:25 -04:00
parent 5cf3803860
commit a870513086
9 changed files with 98 additions and 195 deletions

View File

@@ -215,8 +215,8 @@ namespace FlaxEditor.GUI.Dialogs
private Color32 GetEyedropColor()
{
Int2 mousePosition = ScreenUtils.GetScreenCursorPosition();
Color32 pixelColor = ScreenUtils.GetPixelAt(mousePosition.X, mousePosition.Y);
Int2 mousePosition = ScreenUtilities.GetScreenCursorPosition();
Color32 pixelColor = ScreenUtilities.GetPixelAt(mousePosition.X, mousePosition.Y);
return pixelColor;
}
@@ -226,14 +226,14 @@ namespace FlaxEditor.GUI.Dialogs
Editor.LogWarning("Ok???");
_activeEyedropper = false;
SelectedColor = colorPicked;
ScreenUtils.PickColorDone -= ColorPicked;
ScreenUtilities.PickColorDone -= ColorPicked;
}
private void OnEyedropStart()
{
_activeEyedropper = true;
ScreenUtils.PickColor();
ScreenUtils.PickColorDone += ColorPicked;
ScreenUtilities.PickColor();
ScreenUtilities.PickColorDone += ColorPicked;
}
private void UpdateEyedrop()