Documentation
¶
Index ¶
- type Button
- type Closer
- type Custom
- type Divider
- type Dropdown
- type Element
- type Form
- type Header
- type Input
- type Label
- type Menu
- func (m Menu) AddButton(button Button) Menu
- func (m Menu) AddDivider(divider Divider) Menu
- func (m Menu) AddHeader(header Header) Menu
- func (m Menu) AddLabel(label Label) Menu
- func (m Menu) Body() string
- func (m Menu) Buttons() []Button
- func (m Menu) Elements() []MenuElement
- func (m Menu) MarshalJSON() ([]byte, error)
- func (m Menu) SubmitJSON(b []byte, submitter Submitter, tx *world.Tx) error
- func (m Menu) Title() string
- func (m Menu) WithBody(body ...any) Menu
- func (m Menu) WithButtons(buttons ...Button) Menu
- func (m Menu) WithElements(elements ...MenuElement) Menu
- type MenuElement
- type MenuSubmittable
- type Modal
- type ModalSubmittable
- type Slider
- type StepSlider
- type Submittable
- type Submitter
- type Toggle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
func (Button) MarshalJSON ¶
type Custom ¶
type Custom struct {
// contains filtered or unexported fields
}
func New ¶
func New(submittable Submittable, title ...any) Custom
func (Custom) MarshalJSON ¶
func (Custom) SubmitJSON ¶
type Dropdown ¶
type Dropdown struct {
Text string
Options []string
DefaultIndex int
Tooltip string
// contains filtered or unexported fields
}
func (Dropdown) MarshalJSON ¶
func (Dropdown) WithTooltip ¶
type Input ¶
type Input struct {
Text string
Default string
Placeholder string
Tooltip string
// contains filtered or unexported fields
}
func (Input) MarshalJSON ¶
func (Input) WithTooltip ¶
type Menu ¶
type Menu struct {
// contains filtered or unexported fields
}
func NewMenu ¶
func NewMenu(submittable MenuSubmittable, title ...any) Menu
func (Menu) AddDivider ¶
func (Menu) Elements ¶
func (m Menu) Elements() []MenuElement
func (Menu) MarshalJSON ¶
func (Menu) SubmitJSON ¶
func (Menu) WithButtons ¶
func (Menu) WithElements ¶
func (m Menu) WithElements(elements ...MenuElement) Menu
type MenuElement ¶
type MenuSubmittable ¶
type Modal ¶
type Modal struct {
// contains filtered or unexported fields
}
func NewModal ¶
func NewModal(submittable ModalSubmittable, title ...any) Modal
func (Modal) MarshalJSON ¶
func (Modal) SubmitJSON ¶
type ModalSubmittable ¶
type ModalSubmittable MenuSubmittable
type Slider ¶
type Slider struct {
Text string
Min, Max float64
StepSize float64
Default float64
Tooltip string
// contains filtered or unexported fields
}
func (Slider) MarshalJSON ¶
func (Slider) WithTooltip ¶
type StepSlider ¶
type StepSlider Dropdown
func NewStepSlider ¶
func NewStepSlider(text string, options []string, defaultIndex int) StepSlider
func (StepSlider) MarshalJSON ¶
func (s StepSlider) MarshalJSON() ([]byte, error)
func (StepSlider) Value ¶
func (s StepSlider) Value() int
func (StepSlider) WithTooltip ¶
func (s StepSlider) WithTooltip(tooltip string) StepSlider
type Submittable ¶
type Toggle ¶
type Toggle struct {
Text string
Default bool
Tooltip string
// contains filtered or unexported fields
}
func (Toggle) MarshalJSON ¶
func (Toggle) WithTooltip ¶
Click to show internal directories.
Click to hide internal directories.