fix color picker (signal handler + alpha channel)

This commit is contained in:
nothingTVatYT
2023-10-15 21:43:15 +02:00
parent 2f3929efe0
commit d1b2b64cd1
2 changed files with 3 additions and 1 deletions

View File

@@ -218,6 +218,7 @@ namespace FlaxEditor.GUI.Dialogs
private void OnColorPicked(Color32 colorPicked) private void OnColorPicked(Color32 colorPicked)
{ {
Editor.Log("OnColorPicked " + colorPicked + ", _active eye dropper=" + _activeEyedropper);
if (_activeEyedropper) if (_activeEyedropper)
{ {
_activeEyedropper = false; _activeEyedropper = false;
@@ -319,7 +320,7 @@ namespace FlaxEditor.GUI.Dialogs
protected override void OnShow() protected override void OnShow()
{ {
// Auto cancel on lost focus // Auto cancel on lost focus
((WindowRootControl)Root).Window.LostFocus += OnCancel; //((WindowRootControl)Root).Window.LostFocus += OnCancel;
base.OnShow(); base.OnShow();
} }

View File

@@ -73,6 +73,7 @@ Color32 ScreenUtilities::GetColorAt(const Float2& pos)
outputColor.R = color.red / 256; outputColor.R = color.red / 256;
outputColor.G = color.green / 256; outputColor.G = color.green / 256;
outputColor.B = color.blue / 256; outputColor.B = color.blue / 256;
outputColor.A = 255;
return outputColor; return outputColor;
} }