Difference between revisions of "List"
From Unofficial QEdit Wiki Guide
LunarFuror (Talk | contribs) (→Syntax) |
|||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
* register1 = Register to store selection value | * register1 = Register to store selection value | ||
− | * string = | + | * string = Message to display |
+ | * See list of [[Special characters]] | ||
==Use== | ==Use== | ||
Line 10: | Line 11: | ||
==Example== | ==Example== | ||
<span style='font-size:12px;font-family:courier'> | <span style='font-size:12px;font-family:courier'> | ||
− | <span style='color:blue'>100: </span><span style='color:green'>list </span>R1, 'Monkey<cr>Magic' <span style='color:orange'>//add 2 items to a list 0:Monkey, 1: Magic</span> | + | <span style='color:blue'>100: </span><span style='color:green'>list </span>R1, 'Monkey<cr>Magic' <span style='color:orange'>//add 2 items to a list 0:Monkey, 1:Magic</span> |
<span style='color:green'> switch_jmp </span>R1, 2:101:102 <span style='color:orange'>//jump to function depending on selection</span> | <span style='color:green'> switch_jmp </span>R1, 2:101:102 <span style='color:orange'>//jump to function depending on selection</span> | ||
<span style='color:blue'>101: </span><span style='color:green'>window_msg </span>'You selected "Monkey".' | <span style='color:blue'>101: </span><span style='color:green'>window_msg </span>'You selected "Monkey".' |
Latest revision as of 14:04, 9 April 2021
Contents
Syntax
Syntax: list register1, string
- register1 = Register to store selection value
- string = Message to display
- See list of Special characters
Use
Used to display a list of items and set the selection value to the specified register.
Example
100: list R1, 'Monkey<cr>Magic' //add 2 items to a list 0:Monkey, 1:Magic
switch_jmp R1, 2:101:102 //jump to function depending on selection
101: window_msg 'You selected "Monkey".'
winend
ret
102: window_msg 'You selected "Magic".'
winend
ret