forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDConfig.py
More file actions
25 lines (13 loc) · 731 Bytes
/
DConfig.py
File metadata and controls
25 lines (13 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"This module contains a deprecated shim emulating the old DConfig API."
__all__ = []
from panda3d.core import (ConfigFlags, ConfigVariableBool, ConfigVariableInt,
ConfigVariableDouble, ConfigVariableString)
def GetBool(sym, default=False):
return ConfigVariableBool(sym, default, "DConfig", ConfigFlags.F_dconfig).value
def GetInt(sym, default=0):
return ConfigVariableInt(sym, default, "DConfig", ConfigFlags.F_dconfig).value
def GetDouble(sym, default=0.0):
return ConfigVariableDouble(sym, default, "DConfig", ConfigFlags.F_dconfig).value
def GetString(sym, default=""):
return ConfigVariableString(sym, default, "DConfig", ConfigFlags.F_dconfig).value
GetFloat = GetDouble