mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
added removeAllWithPrefix
This commit is contained in:
parent
0eee6f63b6
commit
09e9ed12df
@ -69,5 +69,14 @@ class OnScreenDebug:
|
||||
def remove(self, key):
|
||||
del self.data[key]
|
||||
|
||||
def removeAllWithPrefix(self, prefix):
|
||||
toRemove = []
|
||||
for key in self.data.keys():
|
||||
if len(key) >= len(prefix):
|
||||
if key[:len(prefix)] == prefix:
|
||||
toRemove.append(key)
|
||||
for key in toRemove:
|
||||
self.remove(key)
|
||||
|
||||
def append(self, text):
|
||||
self.text += text
|
||||
|
Loading…
x
Reference in New Issue
Block a user