Skip to content

Commit 94d1fd8

Browse files
committed
feat: script ui orientation
Signed-off-by: Lessica <82flex@gmail.com>
1 parent b2910f1 commit 94d1fd8

6 files changed

Lines changed: 338 additions & 314 deletions

File tree

docs/lua-manual/dialog.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dialog = dialog:set_config(config_section) -- Set dialog config section
5757
- dialog *dialog object*
5858
- config_section *string*
5959

60-
### Configure Dialog Auto-Dismiss Time (**dialog:set_timeout**)
60+
### Configure Dialog Auto-Dismiss Time (**dialog\:set\_timeout**)
6161

6262
#### Declaration
6363

@@ -81,7 +81,7 @@ dialog():set_timeout(3):show() -- 3 seconds timeout without submission
8181
dialog():set_timeout(3, true):show() -- 3 seconds timeout with submission
8282
```
8383

84-
### Configure Dialog Title (**dialog:set_title**)
84+
### Configure Dialog Title (**dialog\:set\_title**)
8585

8686
#### Declaration
8787

@@ -100,7 +100,7 @@ dialog = dialog:set_title(title_text)
100100
dialog():set_title('Title'):show()
101101
```
102102

103-
### Add a Group to the Dialog (**dialog:add_group**)
103+
### Add a Group to the Dialog (**dialog\:add\_group**)
104104

105105
#### Declaration
106106

@@ -140,7 +140,7 @@ dialog()
140140
:show()
141141
```
142142

143-
### Add a Label to the Dialog (**dialog:add_label**)
143+
### Add a Label to the Dialog (**dialog\:add\_label**)
144144

145145
#### Declaration
146146

@@ -188,7 +188,7 @@ dialog()
188188
:show()
189189
```
190190

191-
### Add an Input Box to the Dialog (**dialog:add_input**)
191+
### Add an Input Box to the Dialog (**dialog\:add\_input**)
192192

193193
#### Declaration
194194

@@ -295,7 +295,7 @@ dialog("MyWorld")
295295
:show()
296296
```
297297

298-
### Add a Switch to the Dialog (**dialog:add_switch**)
298+
### Add a Switch to the Dialog (**dialog\:add\_switch**)
299299

300300
#### Declaration
301301

@@ -352,7 +352,7 @@ dialog("MyWorld")
352352
:show()
353353
```
354354

355-
### Add a Slider to the Dialog (**dialog:add_range**)
355+
### Add a Slider to the Dialog (**dialog\:add\_range**)
356356

357357
#### Declaration
358358

@@ -414,7 +414,7 @@ dialog("MyWorld")
414414
:show()
415415
```
416416

417-
### Add a Single Picker to the Dialog (**dialog:add_picker**)
417+
### Add a Single Picker to the Dialog (**dialog\:add\_picker**)
418418

419419
#### Declaration
420420

@@ -464,7 +464,7 @@ dialog("MyWorld")
464464
:show()
465465
```
466466

467-
### Add a Multiple Picker to the Dialog (**dialog:add_multiple_picker**)
467+
### Add a Multiple Picker to the Dialog (**dialog\:add\_multiple\_picker**)
468468

469469
#### Declaration
470470

@@ -517,7 +517,7 @@ dialog("MyWorld")
517517
:show()
518518
```
519519

520-
### Add an Ordered Picker to the Dialog (**dialog:add_ordered_picker**)
520+
### Add an Ordered Picker to the Dialog (**dialog\:add\_ordered\_picker**)
521521

522522
#### Declaration
523523

@@ -573,7 +573,7 @@ dialog("MyWorld")
573573
:show()
574574
```
575575

576-
### Add a Radio Group to the Dialog (**dialog:add_radio**)
576+
### Add a Radio Group to the Dialog (**dialog\:add\_radio**)
577577

578578
#### Declaration
579579

@@ -621,7 +621,7 @@ dialog("MyWorld")
621621
:show()
622622
```
623623

624-
### Add a Checkbox Group to the Dialog (**dialog:add_checkbox**)
624+
### Add a Checkbox Group to the Dialog (**dialog\:add\_checkbox**)
625625

626626
#### Declaration
627627

@@ -675,7 +675,7 @@ dialog("MyWorld")
675675
:show()
676676
```
677677

678-
### Add a Stepper to the Dialog (**dialog:add_stepper**)
678+
### Add a Stepper to the Dialog (**dialog\:add\_stepper**)
679679

680680
#### Declaration
681681

@@ -732,7 +732,7 @@ dialog("MyWorld")
732732
:show()
733733
```
734734

735-
### Add a DateTime Picker to the Dialog (**dialog:add_datetime**)
735+
### Add a DateTime Picker to the Dialog (**dialog\:add\_datetime**)
736736

737737
#### Declaration
738738

@@ -811,7 +811,7 @@ dialog("MyWorld")
811811
:show()
812812
```
813813

814-
### Add a Text Area to the Dialog (**dialog:add_textarea**)
814+
### Add a Text Area to the Dialog (**dialog\:add\_textarea**)
815815

816816
#### Declaration
817817

@@ -872,7 +872,7 @@ dialog("MyWorld")
872872
:show()
873873
```
874874

875-
### Add a Key-Value Display to the Dialog (**dialog:add_value**)
875+
### Add a Key-Value Display to the Dialog (**dialog\:add\_value**)
876876

877877
#### Declaration
878878

@@ -926,7 +926,7 @@ dialog("MyWorld")
926926
:show()
927927
```
928928

929-
### Add an Image to the Dialog (**dialog:add_image**)
929+
### Add an Image to the Dialog (**dialog\:add\_image**)
930930

931931
#### Declaration
932932

@@ -971,7 +971,7 @@ dialog("MyWorld")
971971
:show()
972972
```
973973

974-
### Add a Button to the Dialog (**dialog:add_button**)
974+
### Add a Button to the Dialog (**dialog\:add\_button**)
975975

976976
#### Declaration 1
977977

@@ -1058,7 +1058,7 @@ require("thread")(function () -- Enable thread module
10581058
end)
10591059
```
10601060

1061-
### Link to a Sub-Dialog (**dialog:add_link**)
1061+
### Link to a Sub-Dialog (**dialog\:add\_link**)
10621062

10631063
#### Declaration
10641064

@@ -1087,7 +1087,7 @@ dialog("MyWorld")
10871087
:show()
10881088
```
10891089

1090-
### 🚥 Show the Dialog and Return User’s Selection (**dialog:show**)
1090+
### 🚥 Show the Dialog and Return User’s Selection (**dialog\:show**)
10911091

10921092
#### Declaration
10931093

@@ -1103,6 +1103,10 @@ submitted, options_table = dialog:show()
11031103
- options_table
11041104
- *table*, returns a key-value table mapped by **title**
11051105

1106+
#### Description
1107+
1108+
The orientation of the dialog defaults to the orientation set by the last call to [`screen.init`](./screen.md#initialize-rotated-coordinate-system-screeninit).
1109+
11061110
#### Simple Example
11071111

11081112
```lua title="dialog:show"
@@ -1161,7 +1165,7 @@ nLog("Your favorite game: " .. selects["Favorite Game"])
11611165
sys.alert(print.out())
11621166
```
11631167

1164-
### Get Dialog Config Without Displaying the Dialog (**dialog:load**)
1168+
### Get Dialog Config Without Displaying the Dialog (**dialog\:load**)
11651169

11661170
#### Declaration
11671171

0 commit comments

Comments
 (0)