ChatPlexSDK-BS 1.0.1-v6.2.0
C++ ChatPlex BeatSaber SDK
Loading...
Searching...
No Matches
DefaultCTextSegmentedControl.hpp
1#pragma once
2
3#include "../Components/CTextSegmentedControl.hpp"
4#include "../../Utils/Event.hpp"
5
6#include <UnityEngine/UI/Button.hpp>
7
9
10 namespace _u
11 {
12 using namespace UnityEngine;
13 using namespace UnityEngine::UI;
14 }
15 namespace _v
16 {
17 using namespace CP_SDK::Utils;
18 }
19
22 {
23 CP_SDK_IL2CPP_INHERIT("CP_SDK.UI.DefaultComponents", DefaultCTextSegmentedControl, Components::CTextSegmentedControl);
24 CP_SDK_IL2CPP_DECLARE_CTOR_CHILD(DefaultCTextSegmentedControl);
25 CP_SDK_IL2CPP_DECLARE_DTOR_MONOBEHAVIOUR_CHILD(DefaultCTextSegmentedControl);
26
27 private:
31 std::vector<_v::MonoPtr<_u::Button>> m_Controls;
32
33 int m_ActiveControl;
34
35 _v::Event<int> m_OnActiveChangedEvent;
36
37 public:
40
43
44 public:
48 void OnActiveChanged_Impl(_v::CActionRef<int> p_Functor, bool p_Add = true);
49
50 public:
55
56 public:
60 void SetActiveText_Impl(int p_Index, bool p_Notify = true);
63 void SetTexts_Impl(const std::vector<std::u16string>& p_Texts);
64
65 private:
69 void OnControlClicked(_u::Button* p_Button, bool p_Notify);
70
71 };
72
73}
74
void SetActiveText_Impl(int p_Index, bool p_Notify=true)
Set active text.
void OnActiveChanged_Impl(_v::CActionRef< int > p_Functor, bool p_Add=true)
On active text changed event.
void SetTexts_Impl(const std::vector< std::u16string > &p_Texts)
Set texts.
Event class helper.
Definition Event.hpp:100
Default generic components implementation.
Various platform utils like Delegate/Action/Function/Event system.
Definition Delegate.hpp:8