def RefreshViewChat(self): if systemSetting.IsViewChat(): self.viewChatButtonList[0].Down() self.viewChatButtonList[1].SetUp() else: self.viewChatButtonList[0].SetUp() self.viewChatButtonList[1].Down()
def OnRender(self): if chat.GetVisibleLineCount(self.chatID) != self.visibleLineCount: self.visibleLineCount = chat.GetVisibleLineCount(self.chatID) self.Refresh() if self.curHeightBar != self.heightBar: self.curHeightBar += (self.heightBar - self.curHeightBar) / 10 if self.boardState == chat.BOARD_STATE_EDIT: grp.SetColor(self.BOARD_MIDDLE_COLOR) grp.RenderBar( self.xBar, self.yBar + (self.heightBar - self.curHeightBar) + 10, self.widthBar, self.curHeightBar) chat.Render(self.chatID) elif self.boardState == chat.BOARD_STATE_VIEW: if systemSetting.IsViewChat(): grp.RenderGradationBar( self.xBar, self.yBar + (self.heightBar - self.curHeightBar), self.widthBar, self.curHeightBar, self.BOARD_START_COLOR, self.BOARD_END_COLOR) chat.Render(self.chatID)
def OnUpdate(self): if self.boardState == chat.BOARD_STATE_EDIT: chat.Update(self.chatID) elif self.boardState == chat.BOARD_STATE_VIEW: if systemSetting.IsViewChat(): chat.Update(self.chatID)