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


Python NametagGlobals.setMin2dAlpha方法代码示例

本文整理汇总了Python中src.otp.nametag.NametagGlobals.setMin2dAlpha方法的典型用法代码示例。如果您正苦于以下问题:Python NametagGlobals.setMin2dAlpha方法的具体用法?Python NametagGlobals.setMin2dAlpha怎么用?Python NametagGlobals.setMin2dAlpha使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在src.otp.nametag.NametagGlobals的用法示例。


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

示例1: enter

# 需要导入模块: from src.otp.nametag import NametagGlobals [as 别名]
# 或者: from src.otp.nametag.NametagGlobals import setMin2dAlpha [as 别名]
    def enter(self):
        if base.config.GetBool('want-qa-regression', 0):
            self.notify.info('QA-REGRESSION: SHTICKERBOOK: Open')
        if self.entered:
            return
        self.entered = 1
        messenger.send('releaseDirector')
        messenger.send('stickerBookEntered')
        base.playSfx(self.openSound)
        base.disableMouse()
        base.render.hide()
        base.setBackgroundColor(0.05, 0.15, 0.4)
        base.setCellsAvailable([base.rightCells[0]], 0)

        self.oldMin2dAlpha = NametagGlobals.getMin2dAlpha()
        self.oldMax2dAlpha = NametagGlobals.getMax2dAlpha()
        NametagGlobals.setMin2dAlpha(0.8)
        NametagGlobals.setMax2dAlpha(1.0)
        self.__isOpen = 1
        self.__setButtonVisibility()
        self.show()
        self.showPageArrows()
        self.tempLeft = 'arrow_left'
        self.tempRight = 'arrow_right'
        if not self.safeMode:
            self.accept('shtiker-page-done', self.__pageDone)
            self.accept(ToontownGlobals.StickerBookHotkey, self.__close)
            self.accept(ToontownGlobals.OptionsPageHotkey, self.__close)


            self.pageTabFrame.show()
        self.pages[self.currPageIndex].enter()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:34,代码来源:ShtikerBook.py

示例2: exit

# 需要导入模块: from src.otp.nametag import NametagGlobals [as 别名]
# 或者: from src.otp.nametag.NametagGlobals import setMin2dAlpha [as 别名]
    def exit(self):
        if not self.entered:
            return
        self.entered = 0
        messenger.send('stickerBookExited')
        base.playSfx(self.closeSound)
        self.pages[self.currPageIndex].exit()
        base.render.show()
        setBlackBackground = 0
        for obj in base.cr.doId2do.values():
            if isinstance(obj, DistributedFireworkShow.DistributedFireworkShow) or isinstance(obj, DistributedPartyFireworksActivity.DistributedPartyFireworksActivity):
                setBlackBackground = 1

        if setBlackBackground:
            base.setBackgroundColor(Vec4(0, 0, 0, 1))
        else:
            base.setBackgroundColor(ToontownGlobals.DefaultBackgroundColor)
        gsg = base.win.getGsg()
        if gsg:
            base.render.prepareScene(gsg)
        NametagGlobals.setMin2dAlpha(self.oldMin2dAlpha)
        NametagGlobals.setMax2dAlpha(self.oldMax2dAlpha)
        base.setCellsAvailable([base.rightCells[0]], 1)


        self.__isOpen = 0
        self.hide()
        self.hideButton()
        cleanupDialog('globalDialog')
        self.pageTabFrame.hide()
        self.ignore('shtiker-page-done')
        self.ignore(ToontownGlobals.StickerBookHotkey)
        self.ignore(ToontownGlobals.OptionsPageHotkey)
        self.ignore(self.tempRight)
        self.ignore(self.tempLeft)
        self.ignore('disable-hotkeys')
        self.ignore('enable-hotkeys')
        if base.config.GetBool('want-qa-regression', 0):
            self.notify.info('QA-REGRESSION: SHTICKERBOOK: Close')
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:41,代码来源:ShtikerBook.py


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