diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index 7ebbce74..92303811 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -280,7 +280,7 @@ Protocol = { -- 进入亲友圈 WEB_FG_GET_ONLINE_MEMBER = "group/get_online_member", -- 退出亲友圈 - WEB_FG_GET_OFFLINE_MEMBER = "get_offline_member", + WEB_FG_GET_OFFLINE_MEMBER = "group/get_offline_member", -------------- group-log--------------------- -- 获取奖励日志 WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log", diff --git a/lua_probject/base_project/Game/View/Family/FamilyMyfamilyList.lua b/lua_probject/base_project/Game/View/Family/FamilyMyfamilyList.lua index 10ad6ec8..4781a6a9 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyMyfamilyList.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyMyfamilyList.lua @@ -71,7 +71,7 @@ function FamilyMyfamilyList:Init() local loader_icon = obj:GetChild("loader_icon") tex_familyId.text = group.id - tex_familyName.text = group.name + tex_familyName.text = Utils.TextOmit(group.name, 6) tex_familyNumber.text = group.total_member_num ImageLoad.Load(group.o_portrait, loader_icon) diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index a34b1985..8668cabe 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -26,7 +26,14 @@ local M = FamilyView local function FamilyOnline(groupId) local fgCtr = ControllerManager.GetController(NewGroupController) fgCtr:FG_Get_Online_Member(groupId, function(res) - + + end) +end + +local function FamilyOffline(groupId) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_Get_Offline_Member(groupId, function(res) + end) end @@ -127,6 +134,11 @@ function M:InitCloseClick() self.btn_close.onClick:Set(function() print("lingmengfamily", self.lastType, self.familyType.selectedIndex) if not self.lastType or self.familyType.selectedIndex == 1 then + + if self._group then + FamilyOffline(self._group.id) + end + ControllerManager.ChangeController(LoddyController) ViewManager.ChangeView(ViewManager.View_Lobby) else @@ -329,6 +341,10 @@ function M:ChangeNumber(fgCtr, group_id, limit, num, minus_only, sort_type) end function M:ConnetFamilyRoom(fgCtr, id) + if self._group then + FamilyOffline(self._group.id) + end + fgCtr:FG_EnterGroup(id, function(res) ViewUtil:CloseModalWait() if res.ReturnCode ~= 0 then @@ -563,8 +579,7 @@ function M:ConnetFamily(index, groups, isCreate) obj:GetChild("title").emojies = EmojiDitc.EmojiesDitc obj.text = Utils.TextOmit(groups[j].name, 6) obj.onClick:Add(function() - - if groups[j].id == self._group.id then + if groups[j].id == self._group.id then ViewUtil.ShowBannerOnScreenCenter("已在家族中") return end diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua index 05dc7a7e..c0f206b2 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua @@ -5,6 +5,19 @@ local EXSettingView = {} local M = EXSettingView setmetatable(M, { __index = BaseWindow }) +function EXSettingView:Show(room) + self._room = room + local roomOwner = self._room.owner_id + + if roomOwner == DataManager.SelfUser.account_id then + self.cBtn.selectedIndex = 1 + else + self.cBtn.selectedIndex = 0 + end + + BaseWindow.Show(self) +end + function EXSettingView.new(main_view) local self = setmetatable({}, { __index = M }) self.class = 'EXSettingView' @@ -23,6 +36,9 @@ function M:init(url) local btn_music = view:GetChild('btn_vedio_music') local btn_sound = view:GetChild('btn_vedio_sound') + self.cBtn = self._view:GetController('cBtn') + + -- slider_sound.value = GameApplication.Instance.SoundValue -- slider_music.value = GameApplication.Instance.MusicValue @@ -55,6 +71,14 @@ function M:init(url) _gamectr:AskDismissRoom() end end) + + self._view:GetChild("btn_cancelRoom").onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:LevelRoom(function(res) + print("退出房间") + pt(res) + end) + end) end return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua index a7e42722..8f9a482f 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -84,7 +84,7 @@ function M:InitView(url) self._showNextName = nil end) - local btn_closeRoom = self._view:GetChild("btn_setting") + local btn_setting = self._view:GetChild("btn_setting") self._view:GetChild('btn_closeRoom').onClick:Set(function() ---[[ @@ -124,9 +124,9 @@ function M:InitView(url) --]] end) - btn_closeRoom.onClick:Add(handler(self, function() + btn_setting.onClick:Add(handler(self, function() local settingView = SettingView.new(self) - settingView:Show() + settingView:Show(self._room) end)) -------- diff --git a/wb_new_ui/assets/Common/MessageBox.xml b/wb_new_ui/assets/Common/MessageBox.xml index ef8659a4..0a60f806 100644 --- a/wb_new_ui/assets/Common/MessageBox.xml +++ b/wb_new_ui/assets/Common/MessageBox.xml @@ -1,20 +1,18 @@ - + - + + - - -