FyroxEngine / Fyrox

3D and 2D game engine written in Rust

Home Page:https://fyrox.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an `ImageDecorator` widget

mrDIMAS opened this issue · comments

fyrox-ui has a Decorator widget, that switches its brushes when it is hovered, clicked, selected, idle. This works for simple cases, but in many games you have a custom graphics for different cases. This is where ImageDecorator could be helpful - it should have four states as well as Decorator widget, but instead of switching brushes, it should show/hide children widgets, that represents different states. For example you can have an ImageDecorator that have four Image widgets as child nodes, where each image represents hovered, clicked, selected and idle states respectively.