made onScreenDebug config-able

This commit is contained in:
Dave Schuyler 2003-11-05 01:23:08 +00:00
parent 6bc080f519
commit fc22e864eb

View File

@ -9,6 +9,7 @@ class OnScreenDebug:
def __init__(self):
fontPath = config.GetString("on-screen-debug-font", "cmtt12")
fontScale = config.GetFloat("on-screen-debug-font-scale", 0.05)
self.enabled = config.GetBool("on-screen-debug-enabled", 0)
font = loader.loadFont(fontPath)
if not font.isValid():
print "failed to load OnScreenDebug font", fontPath
@ -24,6 +25,8 @@ class OnScreenDebug:
self.data = {}
def render(self):
if not self.enabled:
return
self.onScreenText.clearText()
for k, v in self.data.items():
if v[0] == self.frame: