启动界面

This commit is contained in:
chenxi 2023-06-08 17:30:16 +08:00
parent 695e9f1e7d
commit c9a3ab1d14

View File

@ -145,7 +145,9 @@ function First:initLaunchRequester()
-- 多选对话框
lr:SetShowDialogComplexAction(function(eCode, okCallback, cancelCallback)
local str = self.dialogStr[eCode] or ""
if eCode == 1 or eCode == 6 then -- 前往商店的时候设置一下确认按钮的文本
if eCode == 1 then -- 强制前往商店的时候设置一下确认按钮的文本
self:showDialog(str, okCallback, self.strGoto)
elseif eCode == 6 then -- 建议前往商店的时候设置一下确认按钮的文本
self:showDialogComplex(str, okCallback, cancelCallback, self.strGoto)
else
self:showDialogComplex(str, okCallback, cancelCallback)
@ -493,10 +495,10 @@ function First:setSliderPercentText(value)
end
-- 显示对话框, ok
function First:showDialog(contentStr, callback)
function First:showDialog(contentStr, callback, confirmStr)
self.dialogTrans.gameObject:SetActive(true)
self.contentText.text = contentStr
self.confirmText.text = self.strOK
self.confirmText.text = confirmStr or self.strOK
self.confirmCallback = callback
self.cancelBtnTrans.gameObject:SetActive(false)
self.confirmBtnTrans.localPosition = {
@ -515,7 +517,7 @@ function First:showDialogComplex(contentStr, okCallback, cancelCallback, confirm
self.cancelCallback = cancelCallback
self.cancelBtnTrans.gameObject:SetActive(true)
self.confirmBtnTrans.localPosition = {
x = 124,
x = -124,
y = -120,
z = 0
}