当前位置: 首页>>代码示例>>Python>>正文


Python SCElement.SCElement类代码示例

本文整理汇总了Python中SCElement.SCElement的典型用法代码示例。如果您正苦于以下问题:Python SCElement类的具体用法?Python SCElement怎么用?Python SCElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SCElement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, title, menu = None):
     SCElement.__init__(self)
     self.title = title
     scGui = loader.loadModel(SCMenu.GuiModelName)
     self.scArrow = scGui.find('**/chatArrow')
     self.menu = None
     self.setMenu(menu)
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:7,代码来源:SCMenuHolder.py

示例2: privSetSettingsRef

 def privSetSettingsRef(self, settingsRef):
     SCElement.privSetSettingsRef(self, settingsRef)
     if self._handleWhisperModeFC is None:
         self._handleWhisperModeFC = FunctionCall(self._handleWhisperModeSVChanged, self._handleWhisperModeSV)
         self._handleWhisperModeFC.pushCurrentState()
     self._handleWhisperModeSV.set(self.settingsRef is not None and not self.isWhisperable())
     return
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:7,代码来源:SCTerminal.py

示例3: destroy

 def destroy(self):
     self._handleWhisperModeSV.set(False)
     if self._handleWhisperModeFC:
         self._handleWhisperModeFC.destroy()
     
     self._handleWhisperModeSV.destroy()
     SCElement.destroy(self)
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:7,代码来源:SCTerminal.py

示例4: enterVisible

    def enterVisible(self):
        SCElement.enterVisible(self)
        if hasattr(self, 'lastEmoteIconColor'):
            if self.getEmoteIconColor() != self.lastEmoteIconColor:
                self.invalidate()
            
        
        
        def handleWhisperModeChange(whisperMode, self = self):
            if self.hasLinkedEmote():
                if self.isVisible() and not self.isWhispering():
                    self.updateEmoteIcon()
                
            

        self.accept(self.getEventName(SCWhisperModeChangeEvent), handleWhisperModeChange)
        
        def handleEmoteEnableStateChange(self = self):
            if self.hasLinkedEmote():
                if self.isVisible() and not self.isWhispering():
                    self.updateEmoteIcon()
                
            

        if self.hasLinkedEmote():
            if Emote.globalEmote:
                self.accept(Emote.globalEmote.EmoteEnableStateChanged, handleEmoteEnableStateChange)
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:27,代码来源:SCTerminal.py

示例5: __init__

 def __init__(self, linkedEmote = None):
     SCElement.__init__(self)
     self.setLinkedEmote(linkedEmote)
     scGui = loader.loadModel(SCMenu.GuiModelName)
     self.emotionIcon = scGui.find('**/emotionIcon')
     self.setDisabled(False)
     self._SCTerminal__numCharges = -1
     self._handleWhisperModeSV = StateVar(False)
     self._handleWhisperModeFC = None
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:9,代码来源:SCTerminal.py

示例6: enterActive

 def enterActive(self):
     SCElement.enterActive(self)
     self.showMenu()
     if hasattr(self, 'button'):
         r, g, b = self.getColorScheme().getMenuHolderActiveColor()
         a = self.getColorScheme().getAlpha()
         self.button.frameStyle[DGG.BUTTON_READY_STATE].setColor(r, g, b, a)
         self.button.updateFrameStyle()
     else:
         self.notify.warning('SCMenuHolder has no button (has finalize been called?).')
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:10,代码来源:SCMenuHolder.py

示例7: finalize

 def finalize(self, dbArgs = {}):
     if not self.isDirty():
         return
     args = {}
     if self.hasLinkedEmote():
         self.lastEmoteIconColor = self.getEmoteIconColor()
         self.emotionIcon.setColorScale(*self.lastEmoteIconColor)
         args.update({'image': self.emotionIcon,
          'image_pos': (self.width - 0.6, 0, -self.height * 0.5)})
     if self.isDisabled():
         args.update({'rolloverColor': (0, 0, 0, 0),
          'pressedColor': (0, 0, 0, 0),
          'rolloverSound': None,
          'clickSound': None,
          'text_fg': self.getColorScheme().getTextDisabledColor() + (1,)})
     args.update(dbArgs)
     SCElement.finalize(self, dbArgs=args)
     return
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:18,代码来源:SCTerminal.py

示例8: finalize

 def finalize(self, dbArgs = { }):
     if not self.isDirty():
         return None
     
     (r, g, b) = self.getColorScheme().getArrowColor()
     a = self.getColorScheme().getAlpha()
     self.scArrow.setColorScale(r, g, b, a)
     if self.menu is not None:
         self.menu.setPos(self.getMenuOffset())
     
     if self.isActive():
         (r, g, b) = self.getColorScheme().getMenuHolderActiveColor()
         a = self.getColorScheme().getAlpha()
         frameColor = (r, g, b, a)
     else:
         frameColor = SCMenuHolder.DefaultFrameColor
     args = {
         'image': self.scArrow,
         'image_pos': (self.width - 0.5, 0, -(self.height) * 0.5),
         'frameColor': frameColor }
     args.update(dbArgs)
     SCElement.finalize(self, dbArgs = args)
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:22,代码来源:SCMenuHolder.py

示例9: getMinDimensions

 def getMinDimensions(self):
     width, height = SCElement.getMinDimensions(self)
     if self.hasLinkedEmote():
         width += 1.3
     return (width, height)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:5,代码来源:SCTerminal.py

示例10: onMouseClick

 def onMouseClick(self, event):
     if not self.isDisabled():
         SCElement.onMouseClick(self, event)
         self.handleSelect()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:4,代码来源:SCTerminal.py

示例11: exitVisible

 def exitVisible(self):
     SCElement.exitVisible(self)
     self.ignore(self.getEventName(SCWhisperModeChangeEvent))
     if Emote.globalEmote:
         self.ignore(Emote.globalEmote.EmoteEnableStateChanged)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:5,代码来源:SCTerminal.py

示例12: exitActive

 def exitActive(self):
     SCElement.exitActive(self)
     self.hideMenu()
     self.button.frameStyle[DGG.BUTTON_READY_STATE].setColor(*SCMenuHolder.DefaultFrameColor)
     self.button.updateFrameStyle()
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:5,代码来源:SCMenuHolder.py

示例13: onMouseClick

 def onMouseClick(self, event):
     SCElement.enterActive(self)
     self.parentMenu.memberSelected(self)
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:3,代码来源:SCMenuHolder.py

示例14: destroy

 def destroy(self):
     if self.menu is not None:
         self.menu.destroy()
         self.menu = None
     SCElement.destroy(self)
     return
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:6,代码来源:SCMenuHolder.py

示例15: invalidate

 def invalidate(self):
     SCElement.invalidate(self)
     if self.menu is not None:
         self.menu.invalidate()
     return
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:5,代码来源:SCMenuHolder.py


注:本文中的SCElement.SCElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。