3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/controls/ComponentReceiveActionType.h"
7#include "mc/client/gui/controls/UIComponent.h"
22 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mDefaultStateControl;
23 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mHoverStateControl;
24 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mPressedStateControl;
25 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mLockedStateControl;
26 ::ll::TypedStorage<1, 1, bool> mPressed;
27 ::ll::TypedStorage<1, 1, bool> mHover;
28 ::ll::TypedStorage<1, 1, bool> mConsumeEvents;
38 virtual ~ButtonComponent() =
default;
40 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
42 virtual void reset() ;
44 virtual void reload(::UIComponent
const& rhs) ;
46 virtual ::ComponentReceiveActionType receive(
47 ::VisualTree& screenEvent,
48 ::ScreenInputContext&,
49 ::UIAnimationController&,
53 virtual ::ComponentReceiveActionType receive(::ScreenEvent
const& screenEvent) ;
55 virtual void onVisibilityChanged(
bool visible) ;
57 virtual void onEnabledChanged(
bool enabled) ;
63 MCAPI
explicit ButtonComponent(::UIControl& owner);
65 MCAPI
void _updateControlVisibility();
67 MCFOLD ::std::weak_ptr<::UIControl> getDefaultStateControl()
const;
69 MCFOLD ::std::weak_ptr<::UIControl> getHoverStateControl()
const;
71 MCFOLD ::std::weak_ptr<::UIControl> getLockedStateControl()
const;
73 MCFOLD ::std::weak_ptr<::UIControl> getPressedStateControl()
const;
75 MCFOLD
void setConsumeEvents(
bool consumeEvents);
77 MCAPI
void setDefaultStateControl(::std::weak_ptr<::UIControl> control);
79 MCAPI
void setHoverStateControl(::std::weak_ptr<::UIControl> control);
81 MCAPI
void setLockedStateControl(::std::weak_ptr<::UIControl> control);
83 MCAPI
void setPressedStateControl(::std::weak_ptr<::UIControl> control);
89 MCAPI
void* $ctor(::UIControl& owner);
95 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
99 MCAPI
void $reload(::UIComponent
const& rhs);
101 MCAPI ::ComponentReceiveActionType
102 $receive(::VisualTree& screenEvent, ::ScreenInputContext&, ::UIAnimationController&, ::ScreenEvent
const&);
104 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent
const& screenEvent);
106 MCAPI
void $onVisibilityChanged(
bool visible);
108 MCAPI
void $onEnabledChanged(
bool enabled);
Definition ScreenInputContext.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5