--- 拉起充值界面(统一配置)
HUI:ConfigUre('Pay', {
bg = 'pay/bg6.png', ---背景图
close = 'base/btn_close2.png', --- 关闭按钮
nclose = 'base/btn_close3.png', --- 关闭点击后按钮
close_x = 0, --- 关闭按钮偏移x
close_y = 0, --- 关闭按钮偏移y
margin = 50, ---支付方式间距
x = 50, ---支付方式偏移x
y = 30, ---支付方式偏移y
m_color = '#00ff00', --- 金额显示颜色
m_size = 26, --- 金额显示大小
m_name = '', -- 金额前显示名称
m_x = 10, --- 金额显示偏移
m_y = -55, --- 金额显示偏移
})
--- 充值选择分类(统一配置)
HUI:ConfigUre('PayData', {
id = 1,
name = '支付宝',
color = '#00ff00',
img = 'base/k31.png',
nimg = 'base/k31.png',
mode = 1, -- 官方
},
{
id = 2,
name = '微信',
color = '#00ff00',
img = 'base/k31.png',
nimg = 'base/k31.png',
mode = 1, -- 官方
},
{
id = 50,
name = '代币',
color = '#00ff00',
img = 'base/k31.png',
nimg = 'base/k31.png',
mode = 2, -- 自定义代币
}
})
-- 拉起充值,点击分类返回方法
local click_pay = function (parent, id, money)
self:sendMsgToServer('pay', { payType = id, id = self.nav_id }) -- 发送消息
GUI:Win_Close(parent) -- 关闭界面
end
-- 创建拉起充值界面
self.payParent = HUI:Create_Pay(click_pay, money)