HomeWildfire Games

Allow GUI elements to define custom mouse event mask shapes.
AuditedrP25408

Description

Allow GUI elements to define custom mouse event mask shapes.

This allows GUI elements to use a texture as their "mouse event mask", making it possible to have arbitrarily-shaped GUI elements with regards to mouse interactions.

Used for the minimap idle worker button as a proof-of-concept.

Differential Revision: https://code.wildfiregames.com/D3814

Event Timeline

Stan raised a concern with this commit.Jun 7 2021, 7:39 PM
Stan added a subscriber: Stan.

The code should load dds when png are not available. this breaks the release build. Raising in case we forget.

/ps/trunk/source/gui/SettingTypes/MouseEventMask.cpp
84

Maybe you should use m_CacheLoader or do it badly like it's done in Skymanager.cpp

Proper way could be using TextureExists from the TextureManager

This commit now has outstanding concerns.Jun 7 2021, 7:39 PM
Stan accepted this commit.Jul 21 2021, 7:40 PM

Fixed in rP25738 and rP25759

All concerns with this commit have now been addressed.Jul 21 2021, 7:40 PM