diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua
index 0d0155e7..d925f9b3 100644
--- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua
+++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua
@@ -257,7 +257,7 @@ function M:OnEvtUpdateRoom(evt_data)
end
for _, room in pairs(cmds) do
- for _, palyingUser in pairs(room.plist) do
+ for _, palyingUser in pairs(room.plist or {}) do
local _player = group.memberMap[palyingUser.aid]
_player.playing = "startPlaying"
end
@@ -360,11 +360,18 @@ function M:FG_CLOSE_ISOPEN_CHATROOM(groupId, callback)
end
-- 拉取聊天室数据
-function M:FG_ENTER_CHATROOM(groupId, callback)
+function M:FG_ENTER_CHATROOM(groupId, getData, callback)
local _data = {}
_data.groupId = groupId
_data.uid = DataManager.SelfUser.account_id
+ _data.getData = getData
self._mgr_client:send(Protocol.FGMGR_EVT_ENTER_CHATROOM, _data, function(res)
+ --[[
+ if _data.getData then
+ local group = DataManager.groups:get(_data.groupId)
+ group.records = res.Data.records
+ end
+ ]]
callback(res)
end)
end
@@ -446,14 +453,24 @@ function M:FG_Isopen_ChatRoom(evt_data)
end
function M:FG_Data_ChatRoom(evt_data)
- print("收到是否开启聊天室推送")
+ print("收到聊天室数据")
pt(evt_data)
+
+ if evt_data.getData then
+ local group = DataManager.groups:get(evt_data.groupId)
+ group.records = evt_data.records
+ end
+
DispatchEvent(self._dispatcher, GroupMgrEvent.ChatRoomData, evt_data)
end
function M:FG_Data_NewChat(evt_data)
print("收到新聊天室推送")
pt(evt_data)
+ local gid = evt_data.gid
+ local messageCount = evt_data.messageCount
+ local group = DataManager.groups:get(gid)
+ group.messageCount = tonumber(messageCount)
DispatchEvent(self._dispatcher, GroupMgrEvent.OnNewRecord, evt_data)
end
diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua
index 22da8435..e57fbdff 100644
--- a/lua_probject/base_project/Game/Controller/NewGroupController.lua
+++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua
@@ -46,6 +46,7 @@ function M:FG_GroupList(callback)
group.isWatch = tem.isWatch
group.wechatId = tem.wechatId
group.groupDiamo = tem.groupDiamo
+ group.messageCount = tem.messageCount
l_groups:add(group)
end
end
diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua
index 91de46d5..ac572d32 100644
--- a/lua_probject/base_project/Game/Protocol.lua
+++ b/lua_probject/base_project/Game/Protocol.lua
@@ -400,7 +400,7 @@ Protocol = {
-- 设置不允许成员查看聊天室
FGMGR_EVT_CLOSE_ISOPEN_CHATROOM = "13002",
-- 监听聊天室是否开启
- FGMGR_EVT_ISOPEN_CHATROOM = "12011",
+ FGMGR_EVT_ISOPEN_CHATROOM = "12012",
-- 进入聊天室
FGMGR_EVT_ENTER_CHATROOM = "13004",
-- 聊天室协议
diff --git a/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua b/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua
index 437303be..0c7e03d4 100644
--- a/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua
+++ b/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua
@@ -1,5 +1,3 @@
-require 'FairyGUI'
-
--region LOCAL
local function SetBigWiller(totalScore)
@@ -37,7 +35,7 @@ end
local function ChatItemRenderer(index, obj, self)
--local data = self.ChatRoomData.records[index + 1]
- local data = self.ChatRoomData[1].records[index + 1]
+ local data = self.group.records[index + 1]
local totalScore = json.decode(data.totalScore)
local hpData = json.decode(data.hpData)
SetBigWiller(totalScore)
@@ -98,6 +96,8 @@ function FamilyChatRoom:Init(com, root)
self.list_chat = self._view:GetChild("list_chat")
self.btn_quit = self._view:GetChild("btn_quit")
+ self.list_chat:SetVirtual()
+
self.list_chat.itemRenderer = function(index, obj)
ChatItemRenderer(index, obj, self)
end
@@ -112,15 +112,22 @@ end
function FamilyChatRoom:Close()
local cChatRoom = self.root._view:GetController("cIsChatRoom")
cChatRoom.selectedIndex = 0
+
+ self.group.messageCount = 0
+ self.root:ReflashChatRoomRedPoint()
end
function FamilyChatRoom:Refalsh()
- pt(self.ChatRoomData[1])
- self.list_chat.numItems = #self.ChatRoomData[1].records or 0
+ --self.list_chat.numItems = #self.ChatRoomData.records or 0
+ self.list_chat.numItems = #self.group.records or 0
end
-- 新战绩推到时刷新一条
function FamilyChatRoom:OnNewChatRefalsh(arg)
+
+ self.list_chat.numItems = #self.group.records or 0
+
+ --[[
local groupId = arg.gid
local maxRound = arg.datas.maxRound
local round = arg.datas.round
@@ -143,8 +150,9 @@ function FamilyChatRoom:OnNewChatRefalsh(arg)
local roundTex = round .. "/" .. maxRound
tex_roomIdRound.text = roomId .. "\n" .. roundTex
- for _, player in pairs(playerlist) do
+ SetBigWiller(playerlist)
+ for _, player in pairs(playerlist) do
local pObj = list_players:AddItemFromPool()
local tex_name = pObj:GetChild("tex_name")
@@ -156,10 +164,28 @@ function FamilyChatRoom:OnNewChatRefalsh(arg)
tex_id.text = player.accId
tex_score.text = player.score
ImageLoad.Load(player.portrait, loader_icon)
+
+ if player.winer then
+ pObj:GetController("cWiner").selectedIndex = 1
+ else
+ pObj:GetController("cWiner").selectedIndex = 0
+ end
end
+ ]]
end
function FamilyChatRoom:Show()
+ local mgr_ctr = ControllerManager.GetController(GroupMgrController)
+
+
+ local groupId = self.root._group.id
+ self.group = DataManager.groups:get(groupId)
+
+ local getData = self.group.records == nil
+
+ mgr_ctr:FG_ENTER_CHATROOM(self.root._group.id, getData, function(res)
+ end)
+
local cChatRoom = self.root._view:GetController("cIsChatRoom")
cChatRoom.selectedIndex = 1
end
diff --git a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua
index 4d009eb3..55c1209d 100644
--- a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua
+++ b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua
@@ -210,9 +210,6 @@ function M:_evtChatRoomData(...)
if view.class ~= "FamilyMainView" then
return
end
- local arg = { ... } --totalScore
- view.com_FamilyChatRoom.ChatRoomData = arg
- --view.com_FamilyChatRoom.list_chat.numItems = #arg
view.com_FamilyChatRoom:Refalsh()
end
@@ -223,6 +220,7 @@ function M:_evtOnNewRecord(...)
end
local arg = { ... }
view.com_FamilyChatRoom:OnNewChatRefalsh(arg[1])
+ view:ReflashChatRoomRedPoint()
end
function M:_evtOnMemberState(...)
diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua
index 28064007..10da066f 100644
--- a/lua_probject/base_project/Game/View/FamilyView.lua
+++ b/lua_probject/base_project/Game/View/FamilyView.lua
@@ -108,6 +108,8 @@ function M:init(url)
self.btn_quitMyfamilyTab = view:GetChild("btn_quitMyfamilyTab")
self.btn_chatRoom = view:GetChild("btn_chatRoom")
+ self.cChatRoomRedPoint = self.btn_chatRoom:GetController("cRedPoint")
+
self:InitCloseClick()
fgCtr:FG_GroupList(function(res)
@@ -468,12 +470,6 @@ function M:OnEnterGroupCallBack()
end)
self._view:GetController('familyBan').selectedIndex = self._group.ban and 1 or 0
- local mgr_ctr = ControllerManager.GetController(GroupMgrController)
- mgr_ctr:FG_ENTER_CHATROOM(self._group.id, function(res)
- print("拉取到聊天室数据")
- pt(res)
- end)
-
FamilyOnline(self._group.id, self)
ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......")
@@ -485,6 +481,8 @@ function M:OnEnterGroupCallBack()
ViewUtil.ShowModalWait(self._root_view, "正在加载房间列表中......")
self:UpdateFamilyRoom(fgCtr, self._group.id)
ViewUtil.CloseModalWait()
+
+ self:ReflashChatRoomRedPoint()
end
function M:UpdateFamilyRoom(fgCtr, id)
@@ -1037,6 +1035,23 @@ function M:RefalshMoreBtn()
self:ChangeMore()
end
+function M:ReflashChatRoomRedPoint()
+
+ self.cChatRoomRedPoint.selectedIndex = 0
+
+ if self._group.messageCount > 0 then
+ self.cChatRoomRedPoint.selectedIndex = 1
+ end
+
+ local tex = self._group.messageCount
+ if self._group.messageCount > 99 then
+ tex = "99+"
+ end
+
+ local tex_redPoint = self.btn_chatRoom:GetChild("tex_redPoint")
+ tex_redPoint.text = tex
+end
+
function M:Close()
print("家族界面退出")
self._familyEventView:RemoveAll()
diff --git a/lua_probject/base_project/Main.lua b/lua_probject/base_project/Main.lua
index 33fa1095..9d62a6e6 100644
--- a/lua_probject/base_project/Main.lua
+++ b/lua_probject/base_project/Main.lua
@@ -91,6 +91,7 @@ function Main()
FairyGUI.DynamicFont.New("AlibabaPuHuiTi-3-105-Heavy", "base/static/fonts/AlibabaPuHuiTi-3-105-Heavy.ttf"), null)
FairyGUI.FontManager.RegisterFont(
FairyGUI.DynamicFont.New("AlibabaPuHuiTi-3-115-Black", "base/static/fonts/AlibabaPuHuiTi-3-115-Black.ttf"), null)
+ FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("兰亭黑简", "base/static/fonts/兰亭黑简.TTF"), null)
--FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("HYFangLiJ","base/static/fonts/HYFangLiJ.ttf"),null)
_game_info = json.decode(GameApplication.Instance.GameInfo)
--_game_info["login_url"]="http://8.134.59.224:8101/"
diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua
index 2e07ef6f..1529ac3f 100644
--- a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua
+++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua
@@ -312,8 +312,9 @@ function M:EventInit()
local index = self:GetPos(win_seat)
local info = self._player_card_info[index]
self:RemoveCursor()
- info:UpdateHandCard(false, false)
+ --info:UpdateHandCard(false, false)
+ info:ShowHuCard(win_card)
local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card_jiangxi")
obj_win_card.icon = "ui://Main_Majiang/b202_" .. win_card
obj_win_card:GetController("bg").selectedIndex = 1
diff --git a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua
index 7174c2e4..0262ac3d 100644
--- a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua
+++ b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua
@@ -460,16 +460,19 @@ function M:ResetCardType()
end
function M:ShowHand(cards)
-
- --local verticalList =
-
- --if
-
self._view_handCardList:RemoveChildren()
- for _,card in pairs(cards) do
- local obj = self._view_handCardList:AddItemFromPool()
- obj:GetChild("icon").url = 'ui://Main_Majiang/' .. "b202_" .. card
+ for _, card in pairs(cards) do
+ if self.winCard ~= card then
+ local obj = self._view_handCardList:AddItemFromPool()
+ obj:GetChild("icon").url = 'ui://Main_Majiang/' .. "b202_" .. card
+ end
end
end
+function M:ShowHuCard(card)
+ self.winCard = card
+ local btn_card = self._view_getCard:GetChildAt(0)
+ btn_card:GetChild("icon").url = 'ui://Main_Majiang/' .. "b202_" .. card
+end
+
return M
diff --git a/lua_probject/main_project/main/majiang/MJSettingViewNew.lua b/lua_probject/main_project/main/majiang/MJSettingViewNew.lua
index b84a9845..ec884b60 100644
--- a/lua_probject/main_project/main/majiang/MJSettingViewNew.lua
+++ b/lua_probject/main_project/main/majiang/MJSettingViewNew.lua
@@ -63,6 +63,9 @@ end
function M:init(url)
BaseWindow.init(self, url)
+ self.btn_singleClick = self._view:GetChild("btn_singleClick")
+ self.btn_doubleClick = self._view:GetChild("btn_doubleClick")
+
self.slider_sound = self._view:GetChild('slider_vedio_sound')
self.slider_music = self._view:GetChild('slider_vedio_music')
@@ -73,24 +76,35 @@ function M:init(url)
self.cBtn = self._view:GetController('cBtn')
+
+ self.btn_singleClick.onChanged:Set(function()
+
+ end)
+
+ self.btn_doubleClick.onChanged:Set(function()
+
+ end)
+
self.slider_music.onChanged:Add(function()
- -- GameApplication.Instance.MusicValue = slider_music.value
- -- btn_music.selected = false
- -- GameApplication.Instance.MusicMute = false;
+ GameApplication.Instance.MusicValue = self.slider_music.value
+ self.btn_music.selected = false
+ GameApplication.Instance.MusicMute = false;
end)
self.slider_sound.onChanged:Add(function()
- -- GameApplication.Instance.SoundValue = slider_sound.value
- -- btn_sound.selected = false
- -- GameApplication.Instance.SoundMute = false;
+ GameApplication.Instance.SoundValue = self.slider_sound.value
+ self.btn_sound.selected = false
+ GameApplication.Instance.SoundMute = false;
end)
self.btn_sound.onClick:Add(function()
- -- GameApplication.Instance.SoundMute = btn_sound.selected;
+ self.slider_sound.value = 0
+ GameApplication.Instance.SoundMute = self.btn_sound.selected;
end)
self.btn_music.onClick:Add(function()
- -- GameApplication.Instance.MusicMute = btn_music.selected;
+ self.slider_music.value = 0
+ GameApplication.Instance.MusicMute = self.btn_music.selected;
end)
@@ -105,7 +119,6 @@ function M:init(url)
end)
self.btn_closeRoom.onClick:Set(function()
-
if self._flag_witness then
local _room = DataManager.CurrenRoom
self._mainView._gamectr:ExitWitnessGame(_room.play_id, _room.game_id, _room.room_id)
diff --git a/wb_new_ui/assets/Family/Main/Component/btn_chatRoom.xml b/wb_new_ui/assets/Family/Main/Component/btn_chatRoom.xml
index e06fe1cf..1d0cb72f 100644
--- a/wb_new_ui/assets/Family/Main/Component/btn_chatRoom.xml
+++ b/wb_new_ui/assets/Family/Main/Component/btn_chatRoom.xml
@@ -1,10 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wb_new_ui/assets/Lobby/Setting.xml b/wb_new_ui/assets/Lobby/Setting.xml
index df8e4a94..6f9bb10e 100644
--- a/wb_new_ui/assets/Lobby/Setting.xml
+++ b/wb_new_ui/assets/Lobby/Setting.xml
@@ -5,26 +5,18 @@
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
diff --git a/wb_new_ui/assets/Lobby/component/Setting/Component/btn_switchAccount.xml b/wb_new_ui/assets/Lobby/component/Setting/Component/btn_switchAccount.xml
index 3c98180e..adf6ae55 100644
--- a/wb_new_ui/assets/Lobby/component/Setting/Component/btn_switchAccount.xml
+++ b/wb_new_ui/assets/Lobby/component/Setting/Component/btn_switchAccount.xml
@@ -2,7 +2,9 @@
-
+
+
+
\ No newline at end of file
diff --git a/wb_new_ui/assets/Lobby/package.xml b/wb_new_ui/assets/Lobby/package.xml
index bedce0b0..9877a9ff 100644
--- a/wb_new_ui/assets/Lobby/package.xml
+++ b/wb_new_ui/assets/Lobby/package.xml
@@ -581,6 +581,7 @@
+
diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml
index 3b59dca5..ad85a948 100644
--- a/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml
+++ b/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml
@@ -4,16 +4,17 @@
+
-
+
-
+
diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes
index 05fc3d4f..691c992f 100644
Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png
index de4ea809..0af85add 100644
Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png
index 1ec7dce4..84de0d06 100644
Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png
index 64e3fede..48e3c339 100644
Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png
index ee4fe821..899ab17d 100644
Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png
index c4d8b1f9..ee4fe821 100644
Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png
index fbc43d87..c4d8b1f9 100644
Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes
index 6a7a6444..76c2e1c2 100644
Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes differ
diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes
index 62875d1b..3ea7a6d8 100644
Binary files a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes differ