ChatPlexSDK-BS 1.0.1-v6.2.0
C++ ChatPlex BeatSaber SDK
Loading...
Searching...
No Matches
DefaultCTextInput.hpp
1#pragma once
2
3#include "../Components/CTextInput.hpp"
4#include "../Components/CText.hpp"
5#include "../../Utils/Event.hpp"
6
7#include <UnityEngine/UI/Image.hpp>
8#include <UnityEngine/UI/Button.hpp>
9
11
12 namespace _u
13 {
14 using namespace UnityEngine;
15 using namespace UnityEngine::UI;
16 }
17 namespace _v
18 {
19 using namespace CP_SDK::Utils;
20 }
21
24 {
25 CP_SDK_IL2CPP_INHERIT("CP_SDK.UI.DefaultComponents", DefaultCTextInput, Components::CTextInput);
26 CP_SDK_IL2CPP_DECLARE_CTOR_CHILD(DefaultCTextInput);
27 CP_SDK_IL2CPP_DECLARE_DTOR_MONOBEHAVIOUR_CHILD(DefaultCTextInput);
28
29 private:
36 bool m_IsPassword;
37 std::u16string m_PlaceHolder;
38 std::u16string m_Value;
39
40 _v::Event<std::u16string_view> m_OnValueChangedEvent;
41
42 public:
45
48
49 public:
53 void OnValueChanged_Impl(_v::CActionRef<std::u16string_view> p_Functor, bool p_Add = true);
54
55 public:
57 std::u16string_view GetValue_Impl();
58
59 public:
62 void SetInteractable_Impl(bool p_Interactable);
65 void SetIsPassword_Impl(bool p_IsPassword);
68 void SetPlaceHolder_Impl(std::u16string_view p_PlaceHolder);
72 void SetValue_Impl(std::u16string_view p_Value, bool p_Notify = true);
73
74 private:
76 void Refresh();
78 void Notify();
80 void Button_OnClick();
81 };
82
83}
84
85CP_SDK_IL2CPP_INHERIT_HELPERS(CP_SDK::UI::DefaultComponents::DefaultCTextInput);
void SetIsPassword_Impl(bool p_IsPassword)
Set is password.
void OnValueChanged_Impl(_v::CActionRef< std::u16string_view > p_Functor, bool p_Add=true)
On value changed event.
void SetInteractable_Impl(bool p_Interactable)
Set button interactable state.
void SetValue_Impl(std::u16string_view p_Value, bool p_Notify=true)
Set value.
void SetPlaceHolder_Impl(std::u16string_view p_PlaceHolder)
Set place holder.
std::u16string_view GetValue_Impl()
Get text.
void Init_DefaultCTextInput()
On component creation.
Event class helper.
Definition Event.hpp:100
Default generic components implementation.
Various platform utils like Delegate/Action/Function/Event system.
Definition Delegate.hpp:8