From c9a3ab1d1459b203e18daf9d114b76144da4bcf1 Mon Sep 17 00:00:00 2001 From: chenxi Date: Thu, 8 Jun 2023 17:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/first/first.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/app/first/first.lua b/lua/app/first/first.lua index 81d15463..c98aabf4 100644 --- a/lua/app/first/first.lua +++ b/lua/app/first/first.lua @@ -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 }