Skip to content

Commit 60049d9

Browse files
authored
Merge pull request #306 from RainlessSky/rainlesssky-5
Try to fix content tabs again
2 parents fdbae24 + 9154d25 commit 60049d9

4 files changed

Lines changed: 49 additions & 409 deletions

File tree

docs/en/beamng/css-snippets.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!!! warning "This site is under construction!"
1+
S!!! warning "This site is under construction!"
22

33
This site is being actively worked on.
44

@@ -10,7 +10,7 @@
1010

1111
## Common variables
1212

13-
=== BeamNG Orange
13+
=== "BeamNG Orange"
1414

1515
```css
1616
var(--bng-orange) /*Common orange*/
@@ -20,7 +20,7 @@
2020
var(--bng-orange-shade2opaque)
2121
```
2222

23-
=== Monochrome
23+
=== 'Monochrome"
2424

2525
```css
2626
--- Monochrome
@@ -43,9 +43,9 @@
4343
var(--white-3) /*20% opacity*/
4444
```
4545

46-
=== BeamNG UI Color Palette
46+
=== "BeamNG UI Color Palette"
4747

48-
=== Orange
48+
=== "Orange"
4949

5050
```css
5151
var(--bng-orange-50)
@@ -60,7 +60,7 @@
6060
var(--bng-orange-900)
6161
```
6262

63-
=== Cool Gray
63+
=== "Cool Gray"
6464

6565
```css
6666
var(--bng-cool-gray-50)
@@ -75,7 +75,7 @@
7575
var(--bng-cool-gray-900)
7676
```
7777

78-
=== Ter Blue
78+
=== "Ter Blue"
7979

8080
```css
8181
var(--bng-ter-blue-50)
@@ -90,7 +90,7 @@
9090
var(--bng-ter-blue-900)
9191
```
9292

93-
=== Add Blue
93+
=== "Add Blue"
9494

9595
```css
9696
var(--bng-add-blue-50)
@@ -105,7 +105,7 @@
105105
var(--bng-add-blue-900)
106106
```
107107

108-
=== Add Green
108+
=== "Add Green"
109109

110110
```css
111111
var(--bng-add-green-50)
@@ -120,7 +120,7 @@
120120
var(--bng-add-green-900)
121121
```
122122

123-
=== Add Yellow
123+
=== "Add Yellow"
124124

125125
```css
126126
var(--bng-add-yellow-50)
@@ -135,7 +135,7 @@
135135
var(--bng-add-yellow-900)
136136
```
137137

138-
=== Add Peach
138+
=== "Add Peach"
139139

140140
```css
141141
var(--bng-add-peach-50)
@@ -150,7 +150,7 @@
150150
var(--bng-add-peach-900)
151151
```
152152

153-
=== Add Red
153+
=== "Add Red"
154154

155155
```css
156156
var(--bng-add-red-50)
@@ -166,7 +166,7 @@
166166
```
167167

168168

169-
=== Extra color presets
169+
=== "Extra color presets"
170170

171171
```css
172172
var(--bng-filter-orange) /*Filter preset to force SVGs to use bng-orange*/
@@ -176,7 +176,7 @@
176176
var(--bng-black-o2) /*20% opacity*/
177177
```
178178

179-
=== Corner rounding presets
179+
=== "Corner rounding presets"
180180

181181
```css
182182
var(--bng-corners-1) /*0.25rem*/

docs/en/beamng/imgui-snippets.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ im.End()
3131

3232
## General
3333

34-
=== Basic Formatting
34+
=== "Basic Formatting"
3535

3636
```lua
3737
im.Text("")
@@ -52,7 +52,7 @@ im.End()
5252
im.Unindent()
5353
```
5454

55-
=== Inputs
55+
=== "Inputs"
5656

5757
```lua
5858
im.Button("", im.ImVec2(0,0)) -- 0 = fit to content
@@ -66,7 +66,7 @@ im.End()
6666
im.RadioButton2("", im.IntPtr(), 0) -- arg. 3: 0 or 1 for disabled or enabled
6767
```
6868

69-
=== Other
69+
=== "Other"
7070

7171
```lua
7272
im.Bullet()

docs/en/beamng/lua-snippets.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,35 @@ If multiple pages are provided, or the hook is triggered multiple times, then th
347347

348348
### Dialogue
349349

350-
todo
350+
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.
351+
352+
```lua
353+
ui_missionInfo.openDialogue({
354+
title = "Dialogue title",
355+
type = "Custom", -- isn't actually displayed
356+
typeName = "typeName",
357+
data = {
358+
{label = "objective", value = "reward"}
359+
-- add more...
360+
},
361+
buttons = {
362+
{action = "accept", text = "Accept", cmd = ""},
363+
{action = 'decline',text = "Decline", cmd = ""}
364+
-- add more...
365+
}
366+
})
367+
368+
ui_missionInfo.closeDialogue()
369+
```
370+
371+
<figure class="image image_resized" style="width:75%" markdown>
372+
![The Dialogue snippet displayed in BeamNG.drive](../../assets/content/Dialogue.png)
373+
</figure>
374+
375+
Only one Dialogue can be displayed at once. Any existing Dialogue is overridden.
376+
377+
!!! info
378+
379+
`#!lua ui_missionInfo.closeDialogue()` must be used to close a dialogue.
380+
381+
Make sure you call this function when any button is pressed.

0 commit comments

Comments
 (0)