Fix UI elements behind color picker background being selectable

Is was previously possible activate UI elements behind an active color picker when hovering the background of the color picker but not the color picker UI elements.
This commit is contained in:
Robert Müller 2022-09-17 13:09:40 +02:00
parent 2b2e9d6ec2
commit 4fb98f4ec2

View file

@ -1114,6 +1114,10 @@ void CMenus::RenderColorPicker()
return;
}
// Prevent activation of UI elements outside of active color picker
if(UI()->MouseInside(&PickerRect))
UI()->SetHotItem(&ms_ColorPicker);
// Render
ColorRGBA BackgroundColor(0.1f, 0.1f, 0.1f, 1.0f);
PickerRect.Draw(BackgroundColor, 0, 0);