mirror of
https://github.com/BeamMP/Docs.git
synced 2026-05-19 16:20:28 +00:00
Try to fix content tabs again
This commit is contained in:
@@ -347,4 +347,35 @@ If multiple pages are provided, or the hook is triggered multiple times, then th
|
||||
|
||||
### Dialogue
|
||||
|
||||
todo
|
||||
Dialogue is used in the *A Rocky Start* campaign to display information about a mission. It is a centered, vertically aligned popup with a specific layout. It does not support embedding HTML.
|
||||
|
||||
```lua
|
||||
ui_missionInfo.openDialogue({
|
||||
title = "Dialogue title",
|
||||
type = "Custom", -- isn't actually displayed
|
||||
typeName = "typeName",
|
||||
data = {
|
||||
{label = "objective", value = "reward"}
|
||||
-- add more...
|
||||
},
|
||||
buttons = {
|
||||
{action = "accept", text = "Accept", cmd = ""},
|
||||
{action = 'decline',text = "Decline", cmd = ""}
|
||||
-- add more...
|
||||
}
|
||||
})
|
||||
|
||||
ui_missionInfo.closeDialogue()
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
Only one Dialogue can be displayed at once. Any existing Dialogue is overridden.
|
||||
|
||||
!!! info
|
||||
|
||||
`#!lua ui_missionInfo.closeDialogue()` must be used to close a dialogue.
|
||||
|
||||
Make sure you call this function when any button is pressed.
|
||||
|
||||
Reference in New Issue
Block a user