コード例 #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 RefreshBoardEditState(self):

        (x, y, width, height) = self.GetRect()
        (btnX, btnY) = self.btnChatSizing.GetGlobalPosition()

        self.xBar = x
        self.yBar = btnY
        self.widthBar = width
        self.heightBar = y - btnY + self.EDIT_LINE_HEIGHT
        self.curHeightBar = self.heightBar

        if localeInfo.IsARABIC():
            chat.SetPosition(self.chatID, x + width - 10, y)
        else:
            chat.SetPosition(self.chatID, x + 10, y)

        chat.SetHeight(self.chatID, y - btnY - self.EDIT_LINE_HEIGHT)
        chat.ArrangeShowingChat(self.chatID)

        if btnY > y:
            self.btnChatSizing.SetPosition(btnX, y)
            self.heightBar = self.EDIT_LINE_HEIGHT