LeviLamina
Loading...
Searching...
No Matches
FormBase.h
1
#pragma once
2
3
#include "mc/network/packet/ModalFormCancelReason.h"
4
#include "mc/world/actor/player/Player.h"
5
6
namespace
ll::form {
7
8
enum class
FormType { None = -1,
SimpleForm
,
ModalForm
,
CustomForm
};
9
10
using
FormCancelReason = std::optional<ModalFormCancelReason>;
11
12
class
Form
{
13
protected
:
14
virtual
~Form
() =
default
;
15
16
public
:
17
using
RawFormCallback = std::function<void(
Player
&, std::optional<std::string>, FormCancelReason)>;
18
19
LLAPI
static
bool
sendRawTo(
Player
& player, std::string
const
& formData, RawFormCallback callback = {});
20
21
LLAPI
static
bool
sendRawUpdate(
Player
& player, std::string
const
& formData, RawFormCallback callback = {});
22
};
23
24
}
// namespace ll::form
Player
Definition
Player.h:125
ll::form::CustomForm
Definition
CustomForm.h:11
ll::form::Form
Definition
FormBase.h:12
ll::form::ModalForm
Definition
ModalForm.h:16
ll::form::SimpleForm
Definition
SimpleForm.h:9
src
ll
api
form
FormBase.h
Generated on
for LeviLamina by
1.16.1