UIChat页面:输入状态
This commit is contained in:
parent
5f7b872bdf
commit
bc0ec479f8
@ -1229,24 +1229,16 @@ function UIChatView:OnValueChanged_InputToolBarToggleGroup(toggle, toggleType, i
|
||||
end
|
||||
|
||||
function UIChatView:ShowInputToolBarWindow(toggleType, windowData)
|
||||
self:CloseAllInputToolBarToggles()
|
||||
--self:CloseAllInputToolBarToggles()
|
||||
self.InputBarToggles[toggleType].on:SetActive(true)
|
||||
self.InputBarToggles[toggleType].off:SetActive(false)
|
||||
self.InputBarWindows[toggleType]:SetActive(true)
|
||||
--self.chatLayer2.loopListView.layoutElement.preferredHeight = UnityEngine.Screen.height - CONST_TITLE_HEIGHT - CONST_INPUT_BAR_HEIGHT - CONST_INPUT_WINDOW_HEIGHT
|
||||
self.chatLayer2.inputPanel.layoutElement.preferredHeight = 1000
|
||||
|
||||
self.chatLayer2.AnyBtn:SetActive(true)
|
||||
self.chatLayer2.inputToolBar:SetActive(true)
|
||||
currInputToolBarToggleType = toggleType
|
||||
if self.currChatData then
|
||||
self.delayFrameTimer = FrameTimer.New(function()
|
||||
LogError("ShowInputToolBarWindow MovePanelToItemIndex: "..(#self.currChatData.chats))
|
||||
self.chatLayer2.loopListView.loopListView:ResetListView(false)
|
||||
self.chatLayer2.loopListView.loopListView:MovePanelToItemIndex(#self.currChatData.chats, 0)
|
||||
self.chatLayer2.loopListView.loopListView:RefreshAllShownItem()
|
||||
end, 10)
|
||||
self.delayFrameTimer:Start()
|
||||
end
|
||||
self:UpInputBar()
|
||||
|
||||
if toggleType == CONST_TOGGLE_STORY then
|
||||
local storyDatas = windowData
|
||||
@ -1259,10 +1251,33 @@ function UIChatView:ShowInputToolBarWindow(toggleType, windowData)
|
||||
end
|
||||
end
|
||||
|
||||
function UIChatView:CloseAllInputToolBarToggles()
|
||||
function UIChatView:UpInputBar()
|
||||
self.chatLayer2.inputPanel.layoutElement.preferredHeight = 1000
|
||||
if self.currChatData then
|
||||
self.delayShowInputFrameTimer = FrameTimer.New(function()
|
||||
self.chatLayer2.loopListView.loopListView:ResetListView(false)
|
||||
self.chatLayer2.loopListView.loopListView:MovePanelToItemIndex(#self.currChatData.chats, 0)
|
||||
self.chatLayer2.loopListView.loopListView:RefreshAllShownItem()
|
||||
end, 3)
|
||||
self.delayShowInputFrameTimer:Start()
|
||||
end
|
||||
end
|
||||
|
||||
function UIChatView:DownInputBar()
|
||||
self.chatLayer2.inputPanel.layoutElement.preferredHeight = 270
|
||||
--self.chatLayer2.loopListView.layoutElement.preferredHeight = UnityEngine.Screen.height - CONST_TITLE_HEIGHT - CONST_INPUT_BAR_HEIGHT
|
||||
self.chatLayer2.loopListView.loopListView:RefreshAllShownItem()
|
||||
if self.currChatData then
|
||||
self.delayHideInputFrameTimer = FrameTimer.New(function()
|
||||
self.chatLayer2.loopListView.loopListView:ResetListView(false)
|
||||
self.chatLayer2.loopListView.loopListView:MovePanelToItemIndex(#self.currChatData.chats, 0)
|
||||
self.chatLayer2.loopListView.loopListView:RefreshAllShownItem()
|
||||
end, 3)
|
||||
self.delayHideInputFrameTimer:Start()
|
||||
end
|
||||
end
|
||||
|
||||
function UIChatView:CloseAllInputToolBarToggles()
|
||||
self:DownInputBar()
|
||||
for k, v in pairs(self.InputBarToggles) do
|
||||
v.on:SetActive(false)
|
||||
v.off:SetActive(true)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user