ChatPlexSDK-BS 1.0.1-v6.2.0
C++ ChatPlex BeatSaber SDK
Loading...
Searching...
No Matches
ModButton.hpp
1#pragma once
2
3#include "../Utils/Il2cpp.hpp"
4#include "../Utils/Delegate.hpp"
5
6#include <memory>
7#include <string>
8
9namespace CP_SDK::UI {
10
11 namespace _v
12 {
13 using namespace CP_SDK::Utils;
14 }
15
18 {
19 CP_SDK_NO_DEF_CTORS(ModButton);
20 CP_SDK_PRIV_TAG();
21
22 static constexpr std::u16string_view _default_Tooltip = u"";
23
24 private:
25 std::u16string m_Text;
26 std::u16string m_Tooltip;
27 bool m_Interactable;
28 _v::Action<> m_OnClick;
29
30 public:
31 std::u16string_view Text();
32 std::u16string_view Tooltip();
33 bool Interactable();
34
35 public:
36 using Ptr = std::shared_ptr<ModButton>;
37
43 ModButton(CP_SDK_PRIV_TAG_ARG(), std::u16string_view p_Text, _v::CActionRef<> p_OnClick, std::u16string_view p_Tooltip = _default_Tooltip, bool p_Interactable = true);
46
47 public:
53 static Ptr Make(std::u16string_view p_Text, _v::CActionRef<> p_OnClick, std::u16string_view p_Tooltip = _default_Tooltip, bool p_Interactable = true);
54
55 public:
58
59 };
60
61}
void FireOnClick()
Fire on click event.
ModButton(CP_SDK_PRIV_TAG_ARG(), std::u16string_view p_Text, _v::CActionRef<> p_OnClick, std::u16string_view p_Tooltip=_default_Tooltip, bool p_Interactable=true)
Constructor.
~ModButton()
Destructor.
static Ptr Make(std::u16string_view p_Text, _v::CActionRef<> p_OnClick, std::u16string_view p_Tooltip=_default_Tooltip, bool p_Interactable=true)
Constructor.
Tooltip widget.
Definition Tooltip.hpp:26
User interface components, views, flow coordinator, builders and factories.
Various platform utils like Delegate/Action/Function/Event system.
Definition Delegate.hpp:8