當前位置: 首頁>>代碼示例>>Python>>正文


Python GUI.delRoot方法代碼示例

本文整理匯總了Python中GUI.delRoot方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.delRoot方法的具體用法?Python GUI.delRoot怎麽用?Python GUI.delRoot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GUI的用法示例。


在下文中一共展示了GUI.delRoot方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __destroyMainWindow

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
 def __destroyMainWindow(self):
     if self.__window.parent is not None:
         self.__window.parent.delChild(self.__window)
     else:
         GUI.delRoot(self.__window)
     self.__window = None
     return
開發者ID:webiumsk,項目名稱:WOT-0.9.14-CT,代碼行數:9,代碼來源:debugview.py

示例2: clear

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
def clear():
    for x in GUI.roots():
        GUI.delRoot(x)

    GUI.mcursor().visible = True
    GUI.mcursor().clipped = False
    BigWorld.setCursor(GUI.mcursor())
開發者ID:webiumsk,項目名稱:WOT-0.9.14-CT,代碼行數:9,代碼來源:guitest.py

示例3: __destroyGUI

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
 def __destroyGUI(self):
     assert self._guiName.parent is None
     assert self._guiValue.parent is None
     GUI.delRoot(self._guiName)
     self._guiName = None
     GUI.delRoot(self._guiValue)
     self._guiValue = None
開發者ID:kblw,項目名稱:wot_client,代碼行數:9,代碼來源:debugview.py

示例4: rebuild

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
    def rebuild(self):
        saved_parent = self.getParent()
        saved_position = self.getPosition()
        saved_size = self.getSize()
        saved_textureName = self.getTextureName()
        saved_visible = self.getVisible()
        for curItem in self.__dictItems.itervalues():
            self.__window.delChild(curItem._guiName)
            self.__window.delChild(curItem._guiValue)

        GUI.delRoot(self.__window)
        self.__window = None
        for curItem in self.__dictItems.itervalues():
            curItem._rebuild()

        self.__createMainWindow(saved_parent)
        self.setPosition(saved_position)
        self.setSize(saved_size)
        self.setTextureName(saved_textureName)
        self.setVisible(saved_visible)
        for curItem in self.__dictItems.itervalues():
            self.__window.addChild(curItem._guiName)
            self.__window.addChild(curItem._guiValue)

        if self.__bAutoUpdate:
            self.update()
        return
開發者ID:webiumsk,項目名稱:WOT-0.9.14-CT,代碼行數:29,代碼來源:debugview.py

示例5: __destroyGUI

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
 def __destroyGUI(self):
     raise self._guiName.parent is None or AssertionError
     raise self._guiValue.parent is None or AssertionError
     GUI.delRoot(self._guiName)
     self._guiName = None
     GUI.delRoot(self._guiValue)
     self._guiValue = None
     return
開發者ID:webiumsk,項目名稱:WOT-0.9.14-CT,代碼行數:10,代碼來源:debugview.py

示例6: active

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
 def active(self, state):
     if self.isActive != state:
         self.isActive = state
         if state:
             GUI.addRoot(self.component)
             self.component.size = self.flashSize
         else:
             GUI.delRoot(self.component)
開發者ID:kblw,項目名稱:wot_client,代碼行數:10,代碼來源:flash.py

示例7: myOnVehicleLeaveWorld

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
def myOnVehicleLeaveWorld(vehicle):
    vehicleID = vehicle.id
    #MYLOG('VehicleLeaveWorld: %s (%s)' % (vehicle.typeDescriptor.type.name, vehicleID))
    if minimapentries.has_key(vehicleID):
        minimap._Minimap__ownUI.delEntry(minimapentries[vehicleID])
        minimapentries.pop(vehicleID)
    if spotentries.has_key(vehicleID):
        GUI.delRoot(spotentries[vehicleID].component)
        spotentries.pop(vehicleID)
開發者ID:wotmods,項目名稱:MinimapTankview,代碼行數:11,代碼來源:minimap_tankview_extended.py

示例8: myOnVehicleKilled

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
def myOnVehicleKilled(vehicleID, *args):
    global playerVehicleID
    global indicator
    #MYLOGLIVE('myOnVehicleKilled (%s, own %s)' % (vehicleID, playerVehicleID))
    if vehicleID == playerVehicleID:
        playerVehicleID = None
        #MYLOGLIVE("Oh no! We've got killed :(")
        GUI.delRoot(indicator.window)
        indicator = None
開發者ID:IJOL,項目名稱:autoaim_indicator,代碼行數:11,代碼來源:autoaim_indicator.py

示例9: myOnVehicleKilled

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
def myOnVehicleKilled(vehicleID, *args):
    global playerVehicleID
    #MYLOGLIVE('myOnVehicleKilled (%s, own %s)' % (vehicleID, playerVehicleID))
    if vehicleID == playerVehicleID:
        playerVehicleID = None
        #MYLOGLIVE("Oh no! We've got killed :(")
    else:
        if minimapentries.has_key(vehicleID):
            minimap._Minimap__ownUI.delEntry(minimapentries[vehicleID])
            minimapentries.pop(vehicleID)
        if spotentries.has_key(vehicleID):
            GUI.delRoot(spotentries[vehicleID].component)
            spotentries.pop(vehicleID)
開發者ID:wotmods,項目名稱:MinimapTankview,代碼行數:15,代碼來源:minimap_tankview_extended.py

示例10: _hideTimer

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
 def _hideTimer(self):
     if self.toggleFromHierarchy:
         if self.parent is not None:
             if self.component.parent is not None:
                 self.parent.delChild(self.component)
             else:
                 self.parent.addChild(self.component)
         elif self.component in GUI.roots():
             GUI.delRoot(self.component)
         else:
             GUI.addRoot(self.component)
     else:
         self.component.visible = not self.component.visible
     BigWorld.callback(1.0, self._hideTimer)
     return
開發者ID:webiumsk,項目名稱:WOT-0.9.14-CT,代碼行數:17,代碼來源:guitest.py

示例11: _setparent

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
 def _setparent(self, parent):
     if self.isActive:
         if not self._parent:
             GUI.delRoot(self.component)
         else:
             self._parent.delChild(self.component)
     if parent:
         self._parent = weakref.proxy(parent)
     else:
         self._parent = parent
     if self.isActive:
         if not self._parent:
             GUI.addRoot(self.component)
         else:
             self._parent.addChild(self.component)
開發者ID:webiumsk,項目名稱:WOT-0.9.12-CT,代碼行數:17,代碼來源:pyguibase.py

示例12: test

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
    def test():
        global testUI
        for x in GUI.roots():
            GUI.delRoot(x)

        testUI = ScrollableText().component
        GUI.addRoot(testUI)
        testUI.script.appendLine("AAAA\nBBBB\\CCCC\nDDDD")
        testUI.script.appendLine("XYZ")
        testUI.script.appendLine("ABCD")
        testUI.script.appendLine("EFG")
        testUI.script.appendLine("HIJKL")
        testUI.script.appendLine("VRRRRFRF")
        testUI.script.appendLine("\\cFF0000FF;test one two three four")
        testUI.script.appendLine("\\c00FF00FF;the fat cat sat on the MAT")
        testUI.script.appendLine("\\c0000FFFF;The quick brown fox jumped over the lazy dog")
開發者ID:webiumsk,項目名稱:WOT-0.9.12-CT,代碼行數:18,代碼來源:scrollabletext.py

示例13: cleanUp

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
def cleanUp():
    global old_autoAim
    global old_onAutoAimVehicleLost
    global indicator
    global playerVehicleID
    global myEventsAttached
    playerVehicleID = None
    if myEventsAttached:
        player = BigWorld.player()
        player.autoAim = old_autoAim
        old_autoAim = None
        player.onAutoAimVehicleLost = old_onAutoAimVehicleLost
        old_onAutoAimVehicleLost = None
        player.arena.onVehicleKilled -= myOnVehicleKilled
        myEventsAttached = False
    if not indicator is None:
        GUI.delRoot(indicator.window)
        indicator = None                
開發者ID:IJOL,項目名稱:autoaim_indicator,代碼行數:20,代碼來源:autoaim_indicator.py

示例14: cleanUp

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
def cleanUp():
    global playerVehicleID
    global myEventsAttached    
    playerVehicleID = None
    if myEventsAttached:
        player = BigWorld.player()
        player.onVehicleEnterWorld -= myOnVehicleEnterWorld
        player.onVehicleLeaveWorld -= myOnVehicleLeaveWorld
        player.arena.onVehicleKilled -= myOnVehicleKilled
        myEventsAttached = False
    minimap = g_windowsManager.battleWindow.minimap
    for vehicleID in minimapentries.iterkeys():
        minimap._Minimap__ownUI.delEntry(minimapentries[vehicleID])
    minimapentries.clear()
    eligible.clear()
    for vehicleID in spotentries.iterkeys():
        GUI.delRoot(spotentries[vehicleID].component)
    spotentries.clear()
開發者ID:wotmods,項目名稱:MinimapTankview,代碼行數:20,代碼來源:minimap_tankview_extended.py

示例15: active

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import delRoot [as 別名]
 def active(self, state):
     if state == self.isActive:
         return
     if not self.component:
         return
     self.isActive = state
     if state:
         if not self._parent:
             GUI.addRoot(self.component)
         else:
             self._parent.addChild(self.component)
         self.component.mouseButtonFocus = True
         self.component.moveFocus = True
         self.component.crossFocus = True
     else:
         if not self._parent:
             GUI.delRoot(self.component)
         else:
             self._parent.delChild(self.component)
         self.component.mouseButtonFocus = False
         self.component.moveFocus = False
         self.component.crossFocus = False
     self.listeners.activated(state)
開發者ID:webiumsk,項目名稱:WOT-0.9.12-CT,代碼行數:25,代碼來源:pyguibase.py


注:本文中的GUI.delRoot方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。