ChatPlexSDK-BS 1.0.1-v6.2.0
C++ ChatPlex BeatSaber SDK
Loading...
Searching...
No Matches
DefaultCDropdown.hpp
1#pragma once
2
3#include "../Components/CDropdown.hpp"
4#include "../Components/CIconButton.hpp"
5#include "../Components/CText.hpp"
6#include "../../Utils/Event.hpp"
7
8#include <UnityEngine/UI/Image.hpp>
9#include <UnityEngine/UI/Button.hpp>
10
12
13 namespace _u
14 {
15 using namespace UnityEngine;
16 using namespace UnityEngine::UI;
17 }
18 namespace _v
19 {
20 using namespace CP_SDK::Utils;
21 }
22
25 {
26 CP_SDK_IL2CPP_INHERIT("CP_SDK.UI.DefaultComponents", DefaultCDropdown, Components::CDropdown);
27 CP_SDK_IL2CPP_DECLARE_CTOR_CHILD(DefaultCDropdown);
28 CP_SDK_IL2CPP_DECLARE_DTOR_MONOBEHAVIOUR_CHILD(DefaultCDropdown);
29
30 private:
37 int m_Value;
38 std::vector<std::u16string> m_Options;
39
40 _v::Event<int, std::u16string_view> m_OnValueChangeEvent;
41
42 public:
45
48
49 public:
54
55 public:
57 std::u16string_view GetValue_Impl();
58
59 public:
62 void SetInteractable_Impl(bool p_Interactable);
65 void SetOptions_Impl(const std::vector<std::u16string>& p_Options);
69 void SetValue_Impl(std::u16string_view p_Value, bool p_Notify = true);
70
71 private:
73 void Refresh();
75 void Notify();
77 void Button_OnClick();
78
79 };
80
81}
82
83CP_SDK_IL2CPP_INHERIT_HELPERS(CP_SDK::UI::DefaultComponents::DefaultCDropdown);
void SetInteractable_Impl(bool p_Interactable)
Set interactable state.
void SetValue_Impl(std::u16string_view p_Value, bool p_Notify=true)
Set value.
void SetOptions_Impl(const std::vector< std::u16string > &p_Options)
Set available options.
std::u16string_view GetValue_Impl()
Get value.
void Init_DefaultCDropdown()
On component creation.
void OnValueChanged_Impl(_v::CActionRef< int, std::u16string_view > p_Functor, bool p_Add=true)
On value changed event.
Event class helper.
Definition Event.hpp:100
Default generic components implementation.
Various platform utils like Delegate/Action/Function/Event system.
Definition Delegate.hpp:8