【灵脉秘境】提交
parent
9e507326fd
commit
c9e465f662
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -2247,6 +2247,7 @@ GENERAL_POPUP_TYPE={
|
|||
QiJieSingleTreasure = 47, --七界试炼单个遗物
|
||||
YuJianXingRecord = 51, --御剑行竞猜界面
|
||||
YuJianXingBetSelectNum = 53,--御剑行竞猜数量界面
|
||||
LingMaiJump = 56,--灵脉跳转界面
|
||||
|
||||
--大号通用弹窗
|
||||
YiJingBaoKu = 30,--易经宝库
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ local TEXTLIST = {
|
|||
[3] = "距灵脉秘境关闭:%s",
|
||||
[4] = "当前state为0",
|
||||
}
|
||||
local veinName = {
|
||||
[3] = "l_lmmj_huangjilingmai",
|
||||
[4] = "l_lmmj_xuanjilingmai",
|
||||
[5] = "l_lmmj_dijilingmai",
|
||||
[6] = "l_lmmj_tianjilingmai",
|
||||
}
|
||||
--初始化组件(用于子类重写)
|
||||
function LingMaiMiJingPanel:InitComponent()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
|
|
@ -81,19 +87,19 @@ function LingMaiMiJingPanel:BindEvent()
|
|||
self:OnShow()
|
||||
end)
|
||||
Util.AddClick(self.jumpBtn,function()
|
||||
if self.inputField.text ~= "" then
|
||||
local num = tonumber(self.inputField.text)
|
||||
if num > #self.groupList/5 then
|
||||
num = #self.groupList/5
|
||||
elseif num < 0 then
|
||||
num = 1
|
||||
end
|
||||
LingMaiMiJingManager.curPage = num
|
||||
self:OnShow()
|
||||
self.inputField.text = ""
|
||||
else
|
||||
PopupTipPanel.ShowTip("请输入要前往的位置")
|
||||
end
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.LingMaiJump,#self.groupList/5)
|
||||
-- if self.inputField.text ~= "" then
|
||||
-- local num = tonumber(self.inputField.text)
|
||||
-- if num > #self.groupList/5 then
|
||||
-- num = #self.groupList/5
|
||||
-- elseif num < 0 then
|
||||
-- num = 1
|
||||
-- end
|
||||
-- LingMaiMiJingManager.curPage = num
|
||||
-- self:OnShow()
|
||||
-- else
|
||||
-- PopupTipPanel.ShowTip("请输入要前往的位置")
|
||||
-- end
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -129,6 +135,7 @@ function LingMaiMiJingPanel:OnShow()
|
|||
self.nextBtn:SetActive(LingMaiMiJingManager.curPage + 1 <= 50)
|
||||
local bool = LingMaiMiJingManager.CheckRecord()
|
||||
self.recordRed:SetActive(bool)
|
||||
self.inputField.text = LingMaiMiJingManager.curPage
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -170,16 +177,19 @@ function LingMaiMiJingPanel:SetVeins()
|
|||
for i = 1, 5 do
|
||||
local go = self.veinList[i]
|
||||
local data = self.data.lingmaiData[i]
|
||||
local title = Util.GetGameObject(go,"title/Name"):GetComponent("Text")
|
||||
local num = Util.GetGameObject(go,"title/Num"):GetComponent("Text")
|
||||
local nameImg = Util.GetGameObject(go,"title/NameImg"):GetComponent("Image")
|
||||
local obtain = Util.GetGameObject(go,"obtain")
|
||||
local obtainImg = Util.GetGameObject(go,"obtain"):GetComponent("Image")
|
||||
local name = Util.GetGameObject(go,"obtain/name"):GetComponent("Text")
|
||||
local grid = Util.GetGameObject(go,"obtain/grid")
|
||||
local rewardPre = Util.GetGameObject(grid,"rewardPre")
|
||||
rewardPre:SetActive(false)
|
||||
obtain:SetActive(LingMaiMiJingManager.state == 1)
|
||||
|
||||
title.text = data.veinName
|
||||
local img = data.uid == PlayerManager.uid and "l_lmmj_lingmaixinxidi01" or "l_lmmj_lingmaixinxidi"
|
||||
obtainImg.sprite = self.spLoader:LoadSprite(img)
|
||||
nameImg.sprite = self.spLoader:LoadSprite(veinName[data.Quality])
|
||||
num.text = data.No
|
||||
name.text = string.format( "%s %s",data.servername,data.name)
|
||||
if not self.itemList[i] then
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ local contentScripts = {
|
|||
[GENERAL_POPUP_TYPE.YuJianXingRecord] = {view = require("Modules/Popup/View/GeneralPopup_YuJianXingRecord"), panelName = "GeneralPopup_YuJianXingRecord"},
|
||||
--御剑行竞猜调整数量界面
|
||||
[GENERAL_POPUP_TYPE.YuJianXingBetSelectNum] = {view = require("Modules/Popup/View/GeneralPopup_YuJianXingBetSelectNum"), panelName = "GeneralPopup_YuJianXingBetSelectNum"},
|
||||
--灵脉跳转界面
|
||||
[GENERAL_POPUP_TYPE.LingMaiJump] = {view = require("Modules/Popup/View/GeneralPopup_LingMaiJump"), panelName = "GeneralPopup_LingMaiJump"},
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
----灵脉跳转界面 -----
|
||||
local this = {}
|
||||
--传入父脚本模块
|
||||
local parent
|
||||
--传入特效层级
|
||||
local sortingOrder=0
|
||||
|
||||
function this:InitComponent(gameObject)
|
||||
self.spLoader = SpriteLoader.New()
|
||||
self.add1 = Util.GetGameObject(gameObject,"Btns/Add1")
|
||||
self.add10 = Util.GetGameObject(gameObject,"Btns/Add10")
|
||||
self.re1 = Util.GetGameObject(gameObject,"Btns/Re1")
|
||||
self.re10 = Util.GetGameObject(gameObject,"Btns/Re10")
|
||||
self.inputField = Util.GetGameObject(gameObject, "Btns/InputField"):GetComponent("InputField")
|
||||
|
||||
self.btnSure = Util.GetGameObject(gameObject,"BtnSure")
|
||||
self.btnCancel = Util.GetGameObject(gameObject,"BtnCancel")
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(self.add1,function()
|
||||
self.curPage = self.curPage + 1
|
||||
if self.curPage > 50 then
|
||||
self.curPage = 50
|
||||
end
|
||||
self:Refresh()
|
||||
end)
|
||||
Util.AddClick(self.add10,function()
|
||||
self.curPage = self.curPage + 10
|
||||
if self.curPage > 50 then
|
||||
self.curPage = 50
|
||||
end
|
||||
self:Refresh()
|
||||
end)
|
||||
Util.AddClick(self.re1,function()
|
||||
self.curPage = self.curPage - 1
|
||||
if self.curPage < 1 then
|
||||
self.curPage = 1
|
||||
end
|
||||
self:Refresh()
|
||||
end)
|
||||
Util.AddClick(self.re10,function()
|
||||
self.curPage = self.curPage - 10
|
||||
if self.curPage < 1 then
|
||||
self.curPage = 1
|
||||
end
|
||||
self:Refresh()
|
||||
end)
|
||||
Util.AddClick(self.btnSure,function()
|
||||
|
||||
if self.inputField.text ~= "" then
|
||||
local num = tonumber(self.inputField.text)
|
||||
if num > self.pageNum then
|
||||
num = self.pageNum
|
||||
elseif num < 1 then
|
||||
num = 1
|
||||
end
|
||||
LingMaiMiJingManager.curPage = num
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.LingMaiMiJing.RefreshPanel)
|
||||
self.parent:ClosePanel()
|
||||
else
|
||||
PopupTipPanel.ShowTip("请输入要前往的位置")
|
||||
return
|
||||
end
|
||||
|
||||
end)
|
||||
Util.AddClick(self.btnCancel,function()
|
||||
self.parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
end
|
||||
|
||||
function this:OnShow(_parent,_pageNum)
|
||||
self.parent = _parent
|
||||
self.curPage = LingMaiMiJingManager.curPage
|
||||
self.pageNum = _pageNum
|
||||
self:Refresh()
|
||||
end
|
||||
|
||||
function this:Refresh()
|
||||
self.inputField.text = self.curPage
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d8fb54cb31903254eb22ab3fbf9fc78b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue