ChatPlexSDK-BS 1.0.1-v6.2.0
C++ ChatPlex BeatSaber SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Concepts
IHMUIViewController.hpp
1#pragma once
2
3#include "../../CP_SDK/UI/IViewController.hpp"
4
5#include <HMUI/ViewController.hpp>
6#include <UnityEngine/CanvasGroup.hpp>
7#include <UnityEngine/Color.hpp>
8#include <UnityEngine/RectTransform.hpp>
9#include <UnityEngine/Vector3.hpp>
10
11#include <string>
12
13namespace CP_SDK_BS::UI {
14
15 namespace _u
16 {
17 using namespace UnityEngine;
18 }
19 namespace _v
20 {
21 using namespace CP_SDK::UI;
22 using namespace CP_SDK::Utils;
23 }
24
26 class IHMUIViewController : public HMUI::ViewController
27 {
28 CP_SDK_IL2CPP_INHERIT("CP_SDK_BS.UI", IHMUIViewController, HMUI::ViewController);
29 CP_SDK_IL2CPP_DECLARE_CTOR_CHILD(IHMUIViewController);
30 CP_SDK_IL2CPP_DECLARE_DTOR_MONOBEHAVIOUR_CHILD(IHMUIViewController);
31 CP_SDK_IL2CPP_CTOR_FIELD();
32 CP_SDK_IL2CPP_DTOR_FIELD();
33
34 public:
36 _v::UIFieldRefDel<_u::RectTransform> ModalContainerRTransform;
38
39 public:
42 void ShowModal(_v::IModal* p_Modal);
45 void CloseModal(_v::IModal* p_Modal);
48
49 public:
55 void ShowColorPickerModal(_u::Color p_Value, bool p_Opacity, _v::CActionRef<_u::Color> p_Callback, _v::CActionRef<> p_CancelCallback = nullptr);
59 void ShowConfirmationModal(std::u16string_view p_Message, _v::CActionRef<bool> p_Callback);
64 void ShowDropdownModal(const std::vector<std::u16string>& p_Options, std::u16string_view p_Selected, _v::CActionRef<std::u16string_view> p_Callback);
70 void ShowKeyboardModal(std::u16string_view p_Value, _v::CActionRef<std::u16string_view> p_Callback, _v::CActionRef<> p_CancelCallback = nullptr, _v::KeyboardCustomKeys* p_CustomKeys = nullptr);
75 void ShowLoadingModal(std::u16string_view p_Message = {}, bool p_CancelButton = false, _v::CActionRef<> p_CancelCallback = nullptr);
79 void ShowMessageModal(std::u16string_view p_Message, _v::CActionRef<> p_Callback = nullptr);
80
81 public:
83 std::u16string_view KeyboardModal_GetValue();
86 void KeyboardModal_SetValue(std::u16string_view p_Value);
89 void KeyboardModal_Append(std::u16string_view p_ToAppend);
92 void LoadingModal_SetMessage(std::u16string_view p_Message);
93
94 public:
107
108 public:
112 void ShowTooltip(_u::Vector3 p_Position, std::u16string_view p_Text);
115
116 protected:
117 _v::Action<_v::IModal*> m_ShowModal;
118 _v::Action<_v::IModal*> m_CloseModal;
119 _v::Action<> m_CloseAllModals;
120
127
128 _v::Func<std::u16string_view> m_KeyboardModal_GetValue;
129 _v::Action<std::u16string_view> m_KeyboardModal_SetValue;
130 _v::Action<std::u16string_view> m_KeyboardModal_Append;
131 _v::Action<std::u16string_view> m_LoadingModal_SetMessage;
132
133 _v::Action<> m_CloseColorPickerModal;
134 _v::Action<> m_CloseConfirmationModal;
135 _v::Action<> m_CloseDropdownModal;
136 _v::Action<> m_CloseKeyboardModal;
137 _v::Action<> m_CloseLoadingModal;
138 _v::Action<> m_CloseMessageModal;
139
141 _v::Action<> m_HideTooltip;
142
143 };
144
145}
146
147CP_SDK_IL2CPP_INHERIT_HELPERS(CP_SDK_BS::UI::IHMUIViewController);
Abstract base modal component.
Definition IModal.hpp:22
Delegate helper class.
Definition Delegate.hpp:123
IHMUIViewController interface.
void CloseMessageModal()
Close the message modal.
void KeyboardModal_Append(std::u16string_view p_ToAppend)
Append.
void ShowConfirmationModal(std::u16string_view p_Message, _v::CActionRef< bool > p_Callback)
Show the confirmation modal.
void ShowLoadingModal(std::u16string_view p_Message={}, bool p_CancelButton=false, _v::CActionRef<> p_CancelCallback=nullptr)
Show the loading modal.
void LoadingModal_SetMessage(std::u16string_view p_Message)
Set message.
void CloseColorPickerModal()
Close color picker modal.
void ShowMessageModal(std::u16string_view p_Message, _v::CActionRef<> p_Callback=nullptr)
Show the message modal.
void ShowTooltip(_u::Vector3 p_Position, std::u16string_view p_Text)
Show the tooltip.
void ShowModal(_v::IModal *p_Modal)
Show a modal.
void CloseLoadingModal()
Close the loading modal.
void ShowDropdownModal(const std::vector< std::u16string > &p_Options, std::u16string_view p_Selected, _v::CActionRef< std::u16string_view > p_Callback)
Show the dropdown modal.
void CloseConfirmationModal()
Close the confirmation modal.
void CloseDropdownModal()
Close the dropdown modal.
void CloseAllModals()
Close all modals.
void KeyboardModal_SetValue(std::u16string_view p_Value)
Set value.
void HideTooltip()
Hide the tooltip.
std::u16string_view KeyboardModal_GetValue()
Get current value.
void CloseKeyboardModal()
Close the keyboard modal.
void CloseModal(_v::IModal *p_Modal)
Close a modal.
void ShowKeyboardModal(std::u16string_view p_Value, _v::CActionRef< std::u16string_view > p_Callback, _v::CActionRef<> p_CancelCallback=nullptr, _v::KeyboardCustomKeys *p_CustomKeys=nullptr)
Show the keyboard modal.
void ShowColorPickerModal(_u::Color p_Value, bool p_Opacity, _v::CActionRef< _u::Color > p_Callback, _v::CActionRef<> p_CancelCallback=nullptr)
Show color picker modal.
User interface components, views, flow coordinator, builders and factories.
Various platform utils like Delegate/Action/Function/Event system.
Definition Delegate.hpp:8
BeatSaber specific UI compoenents and utilities.