Dim SLOT_COUNT = 9
Dim BP_LIST() = Array("Lucky Band", "Luna")
//UI设置
Dim UI_HEIGHT = 1100
Dim UI_MAIN_NAME = "主UI"
Dim UI_COMMON_BUTTON_PAGE_HEIGHT = 200
Call CreateUI()
Function CreateUI()
//创建新UI
UI.NewLayout UI_MAIN_NAME, 1, 1080, UI_HEIGHT
//设置分区
UI.AddTabHost UI_MAIN_NAME, "标签页1", UI_HEIGHT - UI_COMMON_BUTTON_PAGE_HEIGHT
UI.AddTab ("标签页1", "制作设定标签页","制作设定")
For index = 1 to SLOT_COUNT
UI.AddSpinner "制作设定标签页", "tb_Slot" & index & "_BP", BP_LIST, 0
UI.AddCheckBox "制作设定标签页", "cb_slot" & index & "CraftEnable", index, True
UI.NewRow("制作设定标签页", "new_row_" & index)
Next
//底部按钮分区
UI.AddTabHost UI_MAIN_NAME, "通用按钮标签页", UI_COMMON_BUTTON_PAGE_HEIGHT
UI.AddTab ("通用按钮标签页", "通用按钮子标签页1","通用按钮")
UI.AddButton "通用按钮子标签页1", "关闭按钮", "关闭"
UI.SetOnClick "关闭按钮", 关闭脚本
//显示界面
UI.Show (UI_MAIN_NAME)
End Function
Function 关闭脚本
//测试获取第一个多选框数值
Dim elementId = "tb_Slot" & 1 & "_BP"
Dim temp = UI.GetValue(elementId)
TracePrint temp[elementId]