mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
add onmouseover, onmouseout ui events & cleanup
This commit is contained in:
parent
418a400ea3
commit
05d6fbd995
5 changed files with 32 additions and 53 deletions
|
|
@ -53,7 +53,13 @@ namespace gui {
|
|||
};
|
||||
|
||||
enum class UIAction {
|
||||
CLICK, DOUBLE_CLICK, FOCUS, DEFOCUS, RIGHT_CLICK
|
||||
CLICK,
|
||||
DOUBLE_CLICK,
|
||||
FOCUS,
|
||||
DEFOCUS,
|
||||
RIGHT_CLICK,
|
||||
MOUSE_OVER,
|
||||
MOUSE_OUT
|
||||
};
|
||||
|
||||
using ActionsSet = TaggedCallbacksSet<UIAction, GUI&>;
|
||||
|
|
@ -191,11 +197,7 @@ namespace gui {
|
|||
/// @brief Get element z-index
|
||||
int getZIndex() const;
|
||||
|
||||
virtual void listenClick(OnAction action);
|
||||
virtual void listenRightClick(OnAction action);
|
||||
virtual void listenDoubleClick(OnAction action);
|
||||
virtual void listenFocus(OnAction action);
|
||||
virtual void listenDefocus(OnAction action);
|
||||
void listenAction(UIAction type, OnAction action);
|
||||
|
||||
virtual void onFocus();
|
||||
virtual void doubleClick(int x, int y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue