Dlg holdBtn » 历史记录 » 版本 3
tejie, 2025-06-05 15:52
| 1 | 1 | tejie | h4. _*%{color:green}<holdBtn:%*_ |
|---|---|---|---|
| 2 | |||
| 3 | 3 | tejie | 对话框中放置一个支持长按的按钮,按钮在按下与抬起时,均可发出消息。 |
| 4 | 1 | tejie | |
| 5 | 3 | tejie | 标签:命令定义|dlg_holdBtn |
| 6 | 1 | tejie | |
| 7 | *格式* |
||
| 8 | 3 | tejie | |命令名 |参数1 |参数2|参数3|参数4 | |
| 9 | |holdBtn|图片资源|X坐标|Y坐标|跳转标识| |
||
| 10 | 1 | tejie | |
| 11 | *说明* |
||
| 12 | 3 | tejie | * 参数1: 配置按钮显示图片 |
| 13 | 1 | tejie | |
| 14 | 3 | tejie | * 参数2: 按钮在对话框中的X坐标 |
| 15 | |||
| 16 | * 参数3: 按钮在对话框中的Y坐标 |
||
| 17 | |||
| 18 | * 参数4: 按下按钮时的跳转标识 |
||
| 19 | |||
| 20 | * *{color:deepPink}按钮按下时,返回s0=0;按钮抬起时,返回s0=1* |
||
| 21 | |||
| 22 | 1 | tejie | - |
| 23 | - |
||
| 24 | |||
| 25 | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
||
| 26 | |||
| 27 | - |
||
| 28 | - |
||
| 29 | |||
| 30 | bq. <notextile>[@main]</notextile> |
||
| 31 | #say |
||
| 32 | 3 | tejie | <notextile><</notextile>*{color:green}holdBtn*:anniu_hui:50:50/<notextile>@</notextile>按钮事件> |
| 33 | 1 | tejie | <notextile></notextile> |
| 34 | 3 | tejie | [<notextile>@</notextile>按钮事件] |
| 35 | #if |
||
| 36 | 1 | tejie | #act |
| 37 | 3 | tejie | [[sendMsg]] 6 输出s0--><$str(s0)> |
| 38 | 1 | tejie | <notextile></notextile> |
| 39 | 3 | tejie | #if |
| 40 | [[equal]] s0 0 |
||
| 41 | 1 | tejie | #act |
| 42 | 3 | tejie | [[print]] 按钮已按下 |
| 43 | [[mov]] s$进度条 <text:努力加载中{scolor=248}:355:37> |
||
| 44 | [[inc]] s$进度条 <loadingBar:0:80:20:150:jingyantiao:jingyantiao_01:50:100/<notextile>@</notextile>关闭进度条> |
||
| 45 | [[goto]] <notextile>@</notextile>显示进度条 |
||
| 46 | <notextile></notextile> |
||
| 47 | #if |
||
| 48 | [[equal]] s0 1 |
||
| 49 | #act |
||
| 50 | [[print]] 按钮已抬起 |
||
| 51 | [[goto]] <notextile>@</notextile>关闭进度条 |
||
| 52 | <notextile></notextile> |
||
| 53 | [<notextile>@</notextile>显示进度条] |
||
| 54 | #act |
||
| 55 | [[addUiDlg]] 1 27,5 <$str(s$进度条)> 0,0 0 |
||
| 56 | <notextile></notextile> |
||
| 57 | <notextile>[@关闭进度条]</notextile> |
||
| 58 | #act |
||
| 59 | [[delUiDlg]] 1 27,5 0 |