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 OnRender(self): (x, y, width, height) = self.GetRect() if localeInfo.IsARABIC(): grp.SetColor(0x77000000) grp.RenderBar(x + 2, y + 45, 13, height - 45) grp.SetColor(0x77000000) grp.RenderBar(x, y, width, height) grp.SetColor(0x77000000) grp.RenderBox(x, y, width - 2, height) grp.SetColor(0x77000000) grp.RenderBox(x + 1, y + 1, width - 2, height) grp.SetColor(0xff989898) grp.RenderLine(x + width - 13, y + height - 1, 11, -11) grp.RenderLine(x + width - 9, y + height - 1, 7, -7) grp.RenderLine(x + width - 5, y + height - 1, 3, -3) else: grp.SetColor(0x77000000) grp.RenderBar(x + width - 15, y + 45, 13, height - 45) grp.SetColor(0x77000000) grp.RenderBar(x, y, width, height) grp.SetColor(0x77000000) grp.RenderBox(x, y, width - 2, height) grp.SetColor(0x77000000) grp.RenderBox(x + 1, y + 1, width - 2, height) grp.SetColor(0xff989898) grp.RenderLine(x + width - 13, y + height - 1, 11, -11) grp.RenderLine(x + width - 9, y + height - 1, 7, -7) grp.RenderLine(x + width - 5, y + height - 1, 3, -3) ##### chat.ArrangeShowingChat(self.chatID) if localeInfo.IsARABIC(): chat.SetPosition(self.chatID, x + width - 10, y + height - 25) else: chat.SetPosition(self.chatID, x + 10, y + height - 25) chat.SetHeight(self.chatID, height - 45 - 25) chat.Update(self.chatID) chat.Render(self.chatID)