源战役客户端
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

81 líneas
2.6 KiB

GuildActiveOpenTipsView = GuildActiveOpenTipsView or BaseClass(BaseView)
local GuildActiveOpenTipsView = GuildActiveOpenTipsView
GuildActiveOpenTipsView.CONTENT =
{
[1] = "开启时间:<color@1>每周六20:30</color>准时开启\n活动规则:各国的<color@5>本国团战第一名社团</color>可参与",
[2] = "开启时间:<color@1>每周四20:30</color>准时开启\n活动规则:参与<color@1>本服团战</color>的所有社团均可参加,根据<color@1>本服团战中的社团排序</color>进行划分战场",
[3] = "开启时间:<color@1>每周二20:30</color>准时开启\n活动规则:<color@1>本服所有社团</color>均可参与,活动结束后,根据战场积分进行<color@1>社团排序</color>",
}
function GuildActiveOpenTipsView:__init()
self.base_file = "guild"
self.layout_file = "GuildActiveOpenTipsView"
self.layer_name = "Activity"
self.destroy_imm = true
self.use_background = true
self.blur_activity_bg = true
self.use_show_anim = true
self.use_hide_anim = true
self.model = GuildModel:getInstance()
self.auto_approve_power = 0
self.load_callback = function ()
self:LoadSuccess()
self:AddEvent()
end
self.open_callback = function ( )
self:OpenSuccess()
end
self.destroy_callback = function ( )
self:DestroySuccess()
end
end
function GuildActiveOpenTipsView:Open( )
--self.data = data
BaseView.Open(self)
end
function GuildActiveOpenTipsView:LoadSuccess()
local nodes = {
"contain/title_bg:raw",
"contain/close_btn:obj",
"contain/bg:raw",
"contain/content_1:tmp",
"contain/content_2:tmp",
"contain/content_3:tmp",
}
self:GetChildren(nodes)
lua_resM:setOutsideRawImage(self, self.bg_raw, GameResPath.GetViewBigBg("guild_active_open_bg"), false)
lua_resM:setOutsideRawImage(self,self.title_bg_raw,GameResPath.GetGuildImage("guild_active_open_title"), false)
end
function GuildActiveOpenTipsView:AddEvent()
local function click_event(target)
if target == self.close_btn_obj then -- 关闭界面
self:Close()
end
end
AddClickEvent(self.close_btn_obj, click_event)
end
function GuildActiveOpenTipsView:OpenSuccess()
self:UpdateView()
end
-- reset:重置为默认
function GuildActiveOpenTipsView:UpdateView(reset)
self.content_1_tmp.text = ChuanWenManager:getInstance():FormatColorTag2(GuildActiveOpenTipsView.CONTENT[1], true)
self.content_2_tmp.text = ChuanWenManager:getInstance():FormatColorTag2(GuildActiveOpenTipsView.CONTENT[2], true)
self.content_3_tmp.text = ChuanWenManager:getInstance():FormatColorTag2(GuildActiveOpenTipsView.CONTENT[3], true)
end
function GuildActiveOpenTipsView:DestroySuccess( )
end