Example #1
0
    def __init__(self):

        self.allChatMode = True
        self.chatInputSet = None

        ui.Window.__init__(self)
        self.AddFlag("float")
        self.AddFlag("movable")
        self.SetWindowName("ChatLogWindow")
        self.__CreateChatInputSet()
        self.__CreateWindow()
        self.__CreateButton()
        self.__CreateScrollBar()

        self.chatID = chat.CreateChatSet(chat.CHAT_SET_LOG_WINDOW)
        chat.SetBoardState(self.chatID, chat.BOARD_STATE_LOG)
        for i in self.CHAT_MODE_INDEX:
            chat.EnableChatMode(self.chatID, i)

        self.SetPosition(20, 20)
        self.SetSize(self.CHAT_LOG_WINDOW_MINIMUM_WIDTH,
                     self.CHAT_LOG_WINDOW_MINIMUM_HEIGHT)
        self.btnSizing.SetPosition(
            self.CHAT_LOG_WINDOW_MINIMUM_WIDTH - self.btnSizing.GetWidth(),
            self.CHAT_LOG_WINDOW_MINIMUM_HEIGHT - self.btnSizing.GetHeight() +
            2)

        self.OnResize()
Example #2
0
    def ToggleAllChatMode(self):
        if self.allChatMode:
            return

        self.allChatMode = True

        for i in self.CHAT_MODE_INDEX:
            chat.EnableChatMode(self.chatID, i)
        for btn in self.modeButtonList:
            btn.SetUp()
Example #3
0
    def ToggleChatMode(self, mode):
        if self.allChatMode:
            self.allChatMode = False
            for i in self.CHAT_MODE_INDEX:
                chat.DisableChatMode(self.chatID, i)
            chat.EnableChatMode(self.chatID, mode)
            self.btnAll.SetUp()

        else:
            chat.ToggleChatMode(self.chatID, mode)
 def ToggleChatMode(self, mode):
     if self.allChatMode:
         self.allChatMode = False
         for i in self.CHAT_MODE_INDEX:
             chat.DisableChatMode(self.chatID, i)
         chat.EnableChatMode(self.chatID, mode)
         self.btnAll.SetUp()
     else:
         chat.ToggleChatMode(self.chatID, mode)
         import app
         if app.FIX_CHAT_HISTORY_UPDATE:
             ison, modeflag = chat.GetChatMode(self.chatID)
             if not ison:
                 self.btnAll.Down()
                 self.ToggleAllChatMode()