本文整理汇总了Python中pandac.PandaModules.WindowProperties.setFixedSize方法的典型用法代码示例。如果您正苦于以下问题:Python WindowProperties.setFixedSize方法的具体用法?Python WindowProperties.setFixedSize怎么用?Python WindowProperties.setFixedSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandac.PandaModules.WindowProperties
的用法示例。
在下文中一共展示了WindowProperties.setFixedSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pandac.PandaModules import WindowProperties [as 别名]
# 或者: from pandac.PandaModules.WindowProperties import setFixedSize [as 别名]
def __init__(self):
print("began")
self.taskMgr = taskMgr
with open('config.json') as data_file:
self.conf = json.load(data_file)
self.ServerConnection = ServerConnection()#uncomment when going live
self.ServerConnection.connect(self.conf['host'],self.conf['port'])#uncomment when going live
props = WindowProperties( )
props.setTitle( 'Log In' )
props.setFixedSize(True)
props.setSize(1280,740)
props.setOrigin(-2,-2)
base.win.requestProperties( props )
self.base = ShowBase
self.main_theme = base.loader.loadSfx("assets/sounds/terminator_theme.ogg")
self.main_theme.play()
self.username = ""
self.authConnection = AuthConnectionModel(self)#uncomment when going live
self.heartbeatConnection = HeartbeatConnectionModel()#uncomment when going live
self.ServerConnection.setupConnectionModel(self.heartbeatConnection)#uncomment when going live
self.globalChatConnection = ChatConnectionModel(self)
self.ServerConnection.setupConnectionModel(self.globalChatConnection)
self.queueConnection = QueueConnectionModel(self)
self.ServerConnection.setupConnectionModel(self.authConnection)#uncomment when going live
self.friendConnection = FriendConnectionModel(self)
self.ServerConnection.setupConnectionModel(self.friendConnection)
self.taskMgr.doMethodLater(self.conf['heartbeatRate'], self.doHeartbeat, "heartbeat")#uncomment when going live
self.taskMgr.doMethodLater(self.conf['heartbeatRate'], self.doHeartbeat, "heartbeat")
self.screen = Login(self)#uncomment when going live
#self.screen = Menu(self)#comment this one when you are trying to log into it like normal
self.ServerConnection.setupConnectionModel(self.queueConnection)
self.taskMgr.doMethodLater(self.conf['heartbeatRate'], self.doHeartbeat, "heartbeat")
self.taskMgr.doMethodLater(1, self.doSong, "song")
self.screenType = "login"
self.screen.run()
示例2: __init__
# 需要导入模块: from pandac.PandaModules import WindowProperties [as 别名]
# 或者: from pandac.PandaModules.WindowProperties import setFixedSize [as 别名]
def __init__(self, World):
#just comment out the two lines below
#self.appRunner = None#added this to overide the login
self.playerList = []
self.World = World
self.WhichScreen = "";
self.lastSelectedFriend = None
# variable to save game selected DD or RR
self.selectedGame = None
#self.taskMgr = World.taskMgr#added this to overide the login
props = WindowProperties()
props.setTitle( 'Main Menu' )
props.setFixedSize(True)
props.setSize(1400,740)
props.setOrigin(-2,-2)
base.win.requestProperties( props )
self.selectedCar = 0
self.screenBtns = []
self.globalChat = []
self.privateChat = {}
self.chatOffset = 0
self.car = None
self.onReturnMatch = self.createMatchMaking
self.createSocialization()
self.World.queueConnection.setHandler(self.handleQueueNotification)
self.World.globalChatConnection.setHandler(self.handleChatNotification)
self.World.friendConnection.setHandlers(self.handleFriendNotification,self.handleFriendListNotification)
#self.World.privateChatConnection.setHandler(self.handlePrivateChatNotification)
self.navi()
self.accept('enter', self.sendMessage)