项目

一般

简介

AddUiDlg » 历史记录 » 修订 12

修订 11 (tejie, 2025-07-24 14:32) → 修订 12/13 (tejie, 2025-07-24 14:33)

h4. _*%{color:green}addUiDlg%*_ 

 根据约定的ID向对应UI添加自定义内容 

 标签:命令定义^addUiDlg 

 *格式* 
 |命令名 		 |参数1 	 |参数2 	 |参数3 		 |参数4 		 |参数5 		 | 
 |addUiDlg 	 |内容id 	 |界面id 	 |显示内容 	 |坐标(x,y) 	 |平台 		 | 

 *说明* 
 |^.参数1|对话框id,模板模式 
 可以向指定系统界面添加多条内容,以此id区别 
 模板模式=1,开启模板模式;缺省为非模板模式| 
 |^.参数2|[[系统界面id设定]]  
 %{color:fireBrick}主界面设定% 
 参数2可写作 *27,锚点id* 
 27代表主界面 
 锚点id 1-9(屏幕9个区域:左上,中上,右上,左中,正中,右中,左下,中下,右下) 
 <notextile></notextile> 
 %{color:fireBrick}非主界面设定% 
 参数2可写作 系统界面id,子界面id,屏幕锚点id(可缺省) 
 举例 
 7,1(系统设置中基础设置界面内添加内容,以基础设置自身左上为锚点) 
 7,1,1(系统设置中基础设置界面内添加内容,以屏幕左上为锚点) 
 13(充值界面内添加内容,以充值界面自身左上为锚点) 
 13,,7(充值界面内添加内容,以屏幕左下为锚点)| 
 |^.参数3|需要显示的内容,支持文字、图片、图标、特效 
 参见自定义对话框命令| 
 |参数4|自定义内容在指定系统UI中的显示位置| 
 |^.参数5|平台设定 
  0 手机 
  1 PC| 

 - 
 - 

 h4. *%{color:deepskyblue}特戒引擎脚本示例:%* 

 bq. [<notextile>@</notextile>main] 
 <text:添加自定义UI:50:100/<notextile>@</notextile>添加自定义UI> 
 <text:删除自定义UI:50:200/<notextile>@</notextile>删除自定义UI> 
 &nbsp; 
 [<notextile>@</notextile>添加自定义UI] 
 &nbsp; 
 #act 
 mov s$name1 <text:充值更多优惠,上top166.com{fcolor=251}:0:0> 
 mov s$name2 <text:反馈更多问题,上top166.com{fcolor=251}:0:0> 
 mov s$name3 <text:玩游戏,上top166.com{fcolor=251}:0:0> 
 %{color:lightGrey};充值% 
 *{color:green}addUiDlg* 1 13 <$str(s$name1)> 580,-880 0 
 %{color:lightGrey};BUG建议% 
 *{color:green}addUiDlg* 1 7,6 <$str(s$name2)> 409,-605 0 
 %{color:lightGrey};账号% 
 addUiDlg 1 7,5 <$str(s$name3)> 409,-489 0 
 &nbsp; 
 %{color:lightGrey};充值% 
 *{color:green}addUiDlg* 1 13 <$str(s$name1)> 580,-880 1 
 %{color:lightGrey};BUG建议% 
 *{color:green}addUiDlg* 1 7,6 <$str(s$name2)> 409,-605 1 
 %{color:lightGrey};账号% 
 *{color:green}addUiDlg* 1 7,5 <$str(s$name3)> 409,-489 1 
 &nbsp; 
 [<notextile>@</notextile>删除自定义UI] 
 #act 
 [[delUiDlg]] 1 13 0 
 [[delUiDlg]] 1 7,5 0 
 [[delUiDlg]] 1 7,6 0 
 &nbsp; 
 [[delUiDlg]] 1 13 1 
 [[delUiDlg]] 1 7,5 1 
 [[delUiDlg]] 1 7,6 1 

 - 
 - 

 h4. *%{color:deepskyblue}模板模式脚本示例:%* 

 对于反复出现的对话框,可以通过模板模式,提升客户端性能。 

 bq. <notextile>[@main]</notextile> 
 %{color:lightGrey};--刷新 addUiDlg 对话框中的数据% 
 #if 
 #act 
 [[mov]] n0 0 
 <notextile></notextile> 
 #if 
 #say 
 <notextile><添加获得道具对话框/@添加获得道具对话框></notextile> 
 <notextile></notextile> 
 <notextile>[@添加获得道具对话框]</notextile> 
 %{color:lightGrey};--定义对话框数据模板% 
 #if 
 #act 
 [[mov]] s0 
 [[inc]] s0 <[[dlg_Img_|img]]:huodewupin_di:0:0:1:/@点地板占位> 
 [[inc]] s0 <[[dlg_Img_|img]]:buji_tanchu_wupinkuangdi:37:20:1::201:45> 
 [[inc]] s0 <[[dlg_Img_|img]]:ui_alpha0:165:-35:::250:130/<notextile>@</notextile>关闭> 
 [[inc]] s0 <[[dlg_ImgButton_|imgButton]]:ui_guanbianniu:200:0:/<notextile>@</notextile>关闭> 
 [[inc]] s0 <[[dlg_itemShow_|itemShow]],<notextile></notextile>*{color:purple}1*<notextile></notextile>:16501:<$str(n0)>:90:90:1> 
 [[inc]] s0 <[[dlg_textex_|textEx]]:获得道具:95:40,28:200,1:1:30> 
 [[inc]] s0 <[[dlg_textex_|textEx]],<notextile></notextile>*{color:purple}2*<notextile></notextile>:经验丹11:95:40,200:210,1:1:30> 
 [[inc]] s0 <[[dlg_Img_|img]]:ui_alpha0:0:200:::250:130/<notextile>@</notextile>使用> 
 [[inc]] s0 <[[dlg_ImgButton_|imgButton]]:ui_anniu_hong_02:60:250:/<notextile>@</notextile>使用> 
 [[inc]] s0 <[[dlg_textex_|textEx]]:使用:95:55,265:190,1:1:30> 
 <notextile></notextile> 
 <notextile></notextile> 
 #if 
 #act 
 [[addUiDlg]] 602,<notextile></notextile>*{color:red}1*<notextile></notextile> 27,5 <$str(s0)> 270,50,1 0 
 [[inc]] n0 1 
 <notextile></notextile> 
 %{color:lightGrey};--变动数据赋值% 
 [[setItemShow]] 1 [[dlg_itemShow_|itemShow]],<notextile></notextile>*{color:purple}1*<notextile></notextile>:16501:<$str(n0)>:90:90:1 27 
 [[setTextEx]] 2 [[dlg_textex_|textEx]],<notextile></notextile>*{color:purple}2*<notextile></notextile>:经验丹<$str(n0)>:95:40,200:210,1:1:30 27 
 <notextile></notextile> 
 <notextile>[@关闭]</notextile> 
 #if 
 #act 
 [[delUiDlg]] 602 27,5 0 2 

 - 
 - 

 h4. *%{color:deepskyblue}addUiDlg支持循环列表示例:%* 

 "脚本示例附件下载":http://112.124.36.36/redmine/attachments/1000/circleList.txt