|
|
using | Callback = std::function<void(Player&, int, FormCancelReason)> |
| |
|
using | ButtonCallback = std::function<void(Player&)> |
| |
|
using | RawFormCallback = std::function<void(Player&, std::optional<std::string>, FormCancelReason)> |
| |
|
|
LLNDAPI | SimpleForm (std::string const &title, std::string const &content={}) |
| |
|
LLAPI SimpleForm & | setTitle (std::string const &title) |
| |
|
LLAPI SimpleForm & | setContent (std::string const &content) |
| |
|
LLAPI SimpleForm & | appendHeader (std::string const &text) |
| |
|
LLAPI SimpleForm & | appendLabel (std::string const &text) |
| |
|
LLAPI SimpleForm & | appendDivider () |
| |
| LLAPI SimpleForm & | appendButton (std::string const &text, std::string const &imageData, std::string const &imageType, ButtonCallback callback={}) |
| | Append a button to the form.
|
| |
| LLAPI SimpleForm & | appendButton (std::string const &text, ButtonCallback callback={}) |
| | Append a button to the form.
|
| |
| LLAPI SimpleForm & | sendTo (Player &player, Callback callback=Callback()) |
| | Send the form to the player.
|
| |
|
LLAPI SimpleForm & | sendUpdate (Player &player, Callback callback=Callback()) |
| |
|
|
static LLAPI bool | sendRawTo (Player &player, std::string const &formData, RawFormCallback callback={}) |
| |
|
static LLAPI bool | sendRawUpdate (Player &player, std::string const &formData, RawFormCallback callback={}) |
| |
◆ appendButton() [1/2]
| LLAPI SimpleForm & ll::form::SimpleForm::appendButton |
( |
std::string const & | text, |
|
|
std::string const & | imageData, |
|
|
std::string const & | imageType, |
|
|
ButtonCallback | callback = {} ) |
Append a button to the form.
- Parameters
-
| text | The text of the button |
| imageData | The image data of the button |
| imageType | The type of the image (url or path) |
| callback | The callback of the button |
- Returns
- SimpleForm& *this
- Note
- If the
callback parameter of sendTo() is set, the callback of the button will be ignored
◆ appendButton() [2/2]
| LLAPI SimpleForm & ll::form::SimpleForm::appendButton |
( |
std::string const & | text, |
|
|
ButtonCallback | callback = {} ) |
Append a button to the form.
- Parameters
-
| text | The text of the button |
| callback | The callback of the button |
- Returns
- SimpleForm& *this
- Note
- If the
callback parameter of sendTo() is set, the callback of the button will be ignored
◆ sendTo()
| LLAPI SimpleForm & ll::form::SimpleForm::sendTo |
( |
Player & | player, |
|
|
Callback | callback = Callback() ) |
Send the form to the player.
- Parameters
-
| player | The player to receive the form |
| callback | The callback of the form(if set, the callback of the button will be ignored) |
- Returns
- SimpleForm& *this
- Note
- If
callback is set, the callbacks of each buttons will be ignored
The documentation for this class was generated from the following file: