mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
*** empty log message ***
This commit is contained in:
parent
572db949fc
commit
5eee96dc49
@ -65,7 +65,7 @@ class Loader:
|
|||||||
Attempt to load a texture from the given file path using
|
Attempt to load a texture from the given file path using
|
||||||
TexturePool class. Returns None if not found"""
|
TexturePool class. Returns None if not found"""
|
||||||
Loader.notify.info("Loading texture: %s" % (texturePath) )
|
Loader.notify.info("Loading texture: %s" % (texturePath) )
|
||||||
texture = self.__texturePool.loadTexture(Filename(texturePath))
|
texture = self.__texturePool.loadTexture(texturePath)
|
||||||
return texture
|
return texture
|
||||||
|
|
||||||
# sound loading funcs
|
# sound loading funcs
|
||||||
|
@ -4,10 +4,10 @@ from DirectNotifyGlobal import *
|
|||||||
from MessengerGlobal import *
|
from MessengerGlobal import *
|
||||||
from TaskManagerGlobal import *
|
from TaskManagerGlobal import *
|
||||||
from EventManagerGlobal import *
|
from EventManagerGlobal import *
|
||||||
from AudioManagerGlobal import *
|
|
||||||
from PythonUtil import *
|
from PythonUtil import *
|
||||||
import Task
|
import Task
|
||||||
import EventManager
|
import EventManager
|
||||||
|
import sys
|
||||||
|
|
||||||
class ShowBase:
|
class ShowBase:
|
||||||
|
|
||||||
@ -16,12 +16,11 @@ class ShowBase:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
# Get the dconfig object
|
# Get the dconfig object
|
||||||
self.config = getConfigShowbase()
|
self.config = ConfigConfigureGetConfigConfigShowbase
|
||||||
|
|
||||||
# Store dconfig variables
|
# Store dconfig variables
|
||||||
self.wantTk = self.config.GetBool('want-tk', 0)
|
self.wantTk = self.config.GetBool('want-tk', 0)
|
||||||
self.wantSound = self.config.GetBool('want-sound', 1)
|
self.wantSound = self.config.GetBool('want-sound', 1)
|
||||||
self.wantMusic = self.config.GetBool('want-music', 1)
|
|
||||||
|
|
||||||
import Loader
|
import Loader
|
||||||
|
|
||||||
@ -71,14 +70,19 @@ class ShowBase:
|
|||||||
|
|
||||||
self.taskMgr = taskMgr
|
self.taskMgr = taskMgr
|
||||||
|
|
||||||
self.audioMgr = audioMgr
|
self.createAudioManager()
|
||||||
|
|
||||||
self.wantTk = 0
|
|
||||||
self.createRootPanel()
|
self.createRootPanel()
|
||||||
|
|
||||||
self.restart()
|
self.restart()
|
||||||
|
|
||||||
|
def createAudioManager(self):
|
||||||
|
if self.wantSound:
|
||||||
|
from AudioManagerGlobal import *
|
||||||
|
self.audioMgr = audioMgr
|
||||||
|
self.audioMgr.spawnUpdate()
|
||||||
|
else:
|
||||||
|
self.audioMgr = None
|
||||||
|
|
||||||
def createRootPanel(self):
|
def createRootPanel(self):
|
||||||
if self.wantTk:
|
if self.wantTk:
|
||||||
from TkGlobal import *
|
from TkGlobal import *
|
||||||
@ -88,8 +92,6 @@ class ShowBase:
|
|||||||
|
|
||||||
def igloop(self, state):
|
def igloop(self, state):
|
||||||
self.win.update()
|
self.win.update()
|
||||||
if (self.wantSound):
|
|
||||||
self.audioMgr.update()
|
|
||||||
return Task.cont
|
return Task.cont
|
||||||
|
|
||||||
def restart(self):
|
def restart(self):
|
||||||
|
@ -17,6 +17,12 @@
|
|||||||
#include <nodePath.h>
|
#include <nodePath.h>
|
||||||
#include <dconfig.h>
|
#include <dconfig.h>
|
||||||
|
|
||||||
|
#define testint 1
|
||||||
|
#define testfloat 1.2345
|
||||||
|
#define testcstring "testcstring"
|
||||||
|
#include <string>
|
||||||
|
#define teststring string("teststring")
|
||||||
|
|
||||||
ConfigureDecl(config_showbase, EXPCL_DIRECT, EXPTP_DIRECT);
|
ConfigureDecl(config_showbase, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||||
typedef Config::Config<ConfigureGetConfig_config_showbase> ConfigShowbase;
|
typedef Config::Config<ConfigureGetConfig_config_showbase> ConfigShowbase;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user