ManageTips(通用弹窗)
<p>[TOC]</p>
<h3>提示警告框</h3>
<pre><code>ManageTips.openAlertBox(param)
</code></pre>
<pre><code>local function callback(event)
if event.button == 1 then
-- 点击了确认按钮
end
end
ManageTips.openAlertBox({
title = &quot;&lt;font color=&#039;#00ff00&#039;&gt;增加货币&lt;/font&gt;&quot;,
content = string.format(&quot;确定要给玩家&lt;font color=&#039;#ffff00&#039;&gt;%s&lt;/font&gt;增加&lt;font color=&#039;#00ff00&#039;&gt;%s&lt;/font&gt;&lt;font color=&#039;#ff0000&#039;&gt;%s&lt;/font&gt;吗?&quot;,PanelToolPlayer.getName(),co.InputBox:getValue(inputCount),player:get_item_name(co.InputBox:getValue(inputId))),
func = callback,
})</code></pre>
<h3>提示奖励框</h3>
<pre><code>ManageTips.openAwardBox(p)
</code></pre>
<pre><code>
p.title or &quot;&quot; --标题文本,支持富文本
p.tcolor or co.c3b(255,255,255) --标题颜色
p.tfont or 18 --标题字体大小
p.tx or 0 --标题偏移坐标x
p.ty or 0 --标题偏移坐标y
p.btnName or &quot;确认&quot; --按钮名称,默认确认
p.bx or 0 --按钮偏移坐标x
p.by or 0 --按钮偏移坐标y
p.pos or 2 --道具列表显示位置,1左对齐,2居中,3右对齐,默认居中
p.items --物品数据
p.ix or 0 --道具列表偏移坐标x
p.iy or 0 --道具列表偏移坐标y
p.iconScale --道具itemShow缩放比例
p.func --({button = 1确认2取消,checkBox = true勾选})</code></pre>
<pre><code>### 道具充值框</code></pre>
<p>ManageTips.openItemPayBox(param)</p>
<pre><code>### 物品输入框</code></pre>
<p>ManageTips.openItemInputBox(param)</p>
<pre><code>### 物品购买框</code></pre>
<p>ManageTips.openBuyItemBox(param)</p>
<pre><code>### 次数购买框</code></pre>
<p>ManageTips.openBuyCountBox(param)</p>
<p> ManageTips.openBuyCountBox({
content = "请输入要捐献灵符数量",
callback = function(value)
-- 判断玩家输入数量是否大于0
if value and value >= (cls.data[1].min or 1) then
-- 检查玩家货币是否满足数量
if player:check_items({{cls.data[1].money_id, value}}, true) then
-- 发送消息通知后端玩家捐献数量
player:push_lua_table(cls.name, {
action = "donate",
data = {
count = value
}
})
end
else
player:alert(9, 3, string.format("捐献数量不能小于%s%s", (cls.data[1].min or 1),
player:get_item_name(cls.data[1].money_id)))
end</p>
<p> end,
min = cls.data.min or 1,
max = cls.data.max or 2100000000
})</p>
<pre><code>### 回收奖励框</code></pre>
<p>ManageTips.openRecyAwardBox(param)</p>
<pre><code>### 显示奖励列表框</code></pre>
<p>ManageTips.openShowAwardBox(param)</p>
<pre><code>### 活动展示框</code></pre>
<p>ManageTips.openActivityBox(param)</p>
<pre><code>### 通用描述框</code></pre>
<p>ManageTips.openDescBox(param)</p>
<pre><code></code></pre>
<p>-- 直接使用
ManageTips.openDescBox({
-- descId = 3010,
title = "解锁说明",
content = "<font color='#00ff00' size='16' >解锁一套:</font><font color='#ff0000' size='16' >攻击力+10</font><br><font color='#00ff00' size='16' >解锁二套:</font><font color='#ff0000' size='16' >攻击力+20、</font><font color='#00ffe8' size='16' >伤害减免2%</font><br><font color='#00ff00' size='16' >解锁三套:</font><font color='#ff0000' size='16' >攻击力+40、</font><font color='#00ffe8' size='16' >伤害减免4%、</font><font color='#ff0000' size='16' >首刀斩杀怪物1%血量</font><br><font color='#00ff00' size='16' >解锁四套:</font><font color='#ff0000' size='16' >攻击力+60、</font><font color='#00ffe8' size='16' >伤害减免6%、</font><font color='#ff0000' size='16' >首刀斩杀怪物2%血量</font><br><font color='#00ff00' size='16' >解锁五套:</font><font color='#ff0000' size='16' >攻击力+80、</font><font color='#00ffe8' size='16' >伤害减免8%、</font><font color='#ff0000' size='16' >首刀斩杀怪物3%血量</font><br><font color='#00ff00' size='16' >解锁六套:</font><font color='#ff0000' size='16' >攻击力+100、</font><font color='#00ffe8' size='16' >伤害减免10%、</font><font color='#ff0000' size='16' >首刀斩杀怪物5%血量</font>",
node = sender,
width = 450,
pos = 3
})</p>
<pre><code></code></pre>
<p>-- 通过ManageDesc id来开启
ManageTips.openDescBox({descId = cls.data.descId,node = sender,pos = 2})</p>
<pre><code>### 通用重新分配阵营</code></pre>
<p>ManageTips.openRecampBox(param)</p>
<pre><code>### 通用比武对决</code></pre>
<p>ManageTips.openBiWuVsBox(param)</p>
<pre><code>### 通用比武结果</code></pre>
<p>ManageTips.openBiWuBox(param)</p>
<pre><code>### 通用比武决赛倒计时进入战场</code></pre>
<p>ManageTips.openBiWuNoticeBox(param)</p>
<pre><code>### 通用选择充值渠道类型</code></pre>
<p>ManageTips.openSelectPayType(param)</p>
<pre><code>### 打开ImageTips</code></pre>
<p>ManageTips.openTipsById(id,t)</p>
<pre><code>
### 关闭Tips</code></pre>
<p>ManageTips.closeTipsById(id)</p>
<pre><code></code></pre>