--社团协助感谢快捷前往
|
|
GuildSupportTipView = GuildSupportTipView or BaseClass(BaseView)
|
|
local GuildSupportTipView = GuildSupportTipView
|
|
|
|
function GuildSupportTipView:__init()
|
|
self.base_file = "guild"
|
|
self.layout_file = "GuildSupportTipView"
|
|
self.layer_name = "Main"
|
|
self.destroy_imm = true
|
|
self.use_background = false
|
|
self.hide_maincancas = false --全屏界面需要放开隐藏主UI
|
|
self.change_scene_close = false
|
|
self.append_to_ctl_queue = false --是否要添加进界面堆栈
|
|
self.need_show_money = false --是否要显示顶部的金钱栏
|
|
self.model = GuildModel:getInstance()
|
|
self.item_list = {}
|
|
|
|
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 GuildSupportTipView:DestroySuccess()
|
|
|
|
end
|
|
|
|
function GuildSupportTipView:LoadSuccess()
|
|
local nodes = {
|
|
"closeBtn:obj", "titleText:tmp", "sendBtn:obj",
|
|
}
|
|
self:GetChildren(nodes)
|
|
|
|
self.titleText_tmp.text = "发送感谢"
|
|
self.transform_x = ScreenWidth/2-380--380是对右边的值
|
|
self.transform_y = -ScreenHeight/2+185--200是对下边的值
|
|
SetAnchoredPosition(self.transform,self.transform_x,self.transform_y)
|
|
|
|
if self.need_refreshData then
|
|
self:UpdateView( )
|
|
end
|
|
end
|
|
|
|
function GuildSupportTipView:AddEvent()
|
|
local function onBtnClickHandler(target,x,y)
|
|
if target == self.closeBtn_obj then--关闭
|
|
self:Close()
|
|
elseif target == self.sendBtn_obj then--发送感谢
|
|
self:Close()
|
|
self.model:Fire(GuildModel.OPEN_GUILD_SUPPORT_IFNO_VIEW, GuildModel.SupportTab.Thank, self.support_data)
|
|
end
|
|
end
|
|
AddClickEvent(self.closeBtn_obj,onBtnClickHandler, LuaSoundManager.SOUND_UI.NONE)
|
|
AddClickEvent(self.sendBtn_obj,onBtnClickHandler, LuaSoundManager.SOUND_UI.NONE)
|
|
end
|
|
|
|
function GuildSupportTipView:Open( support_data )
|
|
self.support_data = support_data
|
|
BaseView.Open(self)
|
|
end
|
|
|
|
function GuildSupportTipView:OpenSuccess( )
|
|
self:UpdateView()
|
|
end
|
|
|
|
function GuildSupportTipView:UpdateView( support_data )
|
|
self.support_data = support_data or self.support_data
|
|
if self.is_loaded then
|
|
self.need_refreshData = false
|
|
else
|
|
self.need_refreshData = true
|
|
return
|
|
end
|
|
|
|
end
|
|
|