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


Python NametagGlobals.setMax2dAlpha方法代碼示例

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


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

示例1: exit

# 需要導入模塊: from libotp import NametagGlobals [as 別名]
# 或者: from libotp.NametagGlobals import setMax2dAlpha [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('arrow_right')
        self.ignore('arrow_left')
        if config.GetBool('want-qa-regression', 0):
            self.notify.info('QA-REGRESSION: SHTICKERBOOK: Close')
開發者ID:Grant11,項目名稱:mf0DJnN,代碼行數:37,代碼來源:ShtikerBook.py

示例2: enter

# 需要導入模塊: from libotp import NametagGlobals [as 別名]
# 或者: from libotp.NametagGlobals import setMax2dAlpha [as 別名]
 def enter(self):
     if 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()
     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()
     if hasattr(localAvatar, 'newsButtonMgr') and localAvatar.newsButtonMgr:
         localAvatar.newsButtonMgr.hideNewIssueButton()
開發者ID:Grant11,項目名稱:mf0DJnN,代碼行數:31,代碼來源:ShtikerBook.py


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