コード例 #1
0
    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)
コード例 #2
0
 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)