3#include "../UI/Components/CTextInput.hpp"
4#include "Generics/IXUIElement.hpp"
5#include "Generics/IXUIBindable.hpp"
6#include "Generics/IXUIElementReady.hpp"
15 public std::enable_shared_from_this<XUITextInput>
26 std::shared_ptr<XUITextInput> AsShared() {
return std::enable_shared_from_this<XUITextInput>::shared_from_this(); }
38 static constexpr ETypeID TypeID = ETypeID::TextInput;
39 using Ptr = std::shared_ptr<XUITextInput>;
41 XUITextInput(CP_SDK_PRIV_TAG_ARG(), std::u16string_view p_Name, std::u16string_view p_PlaceHolder)
50 static Ptr
Make(std::u16string_view p_PlaceHolder)
52 return std::make_shared<XUITextInput>(CP_SDK_PRIV_TAG_VAL(), u
"XUITextInput", p_PlaceHolder);
57 static Ptr
Make(std::u16string_view p_Name, std::u16string_view p_PlaceHolder)
59 return std::make_shared<XUITextInput>(CP_SDK_PRIV_TAG_VAL(), p_Name, p_PlaceHolder);
65 virtual void BuildUI(_u::Transform* p_Parent)
override
69 try { m_OnReady(m_Element.Ptr()); m_OnReady.Clear(); }
70 catch (
const std::exception& l_Exception)
82 if (m_Element) p_Functor(m_Element.Ptr());
83 else m_OnReady += p_Functor;
90 *p_Target = std::enable_shared_from_this<XUITextInput>::shared_from_this();
103 XUITextInput*
SetActive(bool p_Active) XUI_PROXY_IMPL(_v::CTextInput, { x->get_gameObject()->SetActive(p_Active); })
static Logging::ILogger * Logger()
Logger instance.
CTextInput * SetPlaceHolder(std::u16string_view p_PlaceHolder)
Set place holder.
CTextInput * SetIsPassword(bool p_IsPassword)
Set is password.
CTextInput * SetValue(std::u16string_view p_Value, bool p_Notify=true)
Set value.
IXUIElement Bind interface.
std::u16string_view GetInitialName()
Get initial name.
IXUIElement OnReady functor interface.
XUITextInput * OnValueChanged(_v::Delegate< void(std::u16string_view)> p_Functor, bool p_Add=true) XUI_PROXY_IMPL(_v
On value changed event.
static Ptr Make(std::u16string_view p_Name, std::u16string_view p_PlaceHolder)
Constructor.
XUITextInput * SetInteractable(bool p_Interactable) XUI_PROXY_IMPL(_v
Set button interable.
virtual XUITextInput * OnReady(_v::CActionRef< _v::CTextInput * > p_Functor) override
IXUIElement OnReady functor interface.
XUITextInput * SetActive(bool p_Active) XUI_PROXY_IMPL(_v
Set game object active state.
static Ptr Make(std::u16string_view p_PlaceHolder)
Constructor.
XUITextInput * SetValue(std::u16string p_Value, bool p_Notify=true) XUI_PROXY_IMPL(_v
Set value.
virtual XUITextInput * Bind(std::shared_ptr< XUITextInput > *p_Target) override
On ready, bind.
XUITextInput * SetPlaceHolder(std::u16string p_PlaceHolder) XUI_PROXY_IMPL(_v
Set place holder.
XUITextInput * SetIsPassword(bool p_IsPassword) XUI_PROXY_IMPL(_v
Set is password.
virtual void BuildUI(_u::Transform *p_Parent) override
BuildUI for this element into p_Parent transform.
Tree like syntax CP_SDK::UI builder.