summaryrefslogtreecommitdiff
path: root/classy.py
diff options
context:
space:
mode:
authormegazig <megazig@megazig.(none)>2012-01-07 01:12:46 -0600
committermegazig <megazig@megazig.(none)>2012-01-07 01:12:46 -0600
commitfa78f7be38f64a8c4b94f3220cc70b75b986f5dd (patch)
tree0448e3520af4d3baf8036c4f745611120787206a /classy.py
parenta1f4b6b06cf1459557ad662fc643eac3d35c085d (diff)
downloadclassy-fa78f7be38f64a8c4b94f3220cc70b75b986f5dd.tar.gz
classy-fa78f7be38f64a8c4b94f3220cc70b75b986f5dd.zip
Added deleting a class
Diffstat (limited to '')
-rw-r--r--classy.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/classy.py b/classy.py
index b032e94..54cb12d 100644
--- a/classy.py
+++ b/classy.py
@@ -596,6 +596,19 @@ def create_class():
Refresh()
+@menu_item('Delete Class')
+def delete_class():
+ cls = choose_class('Choose the class to delete', False)
+ if base != None:
+ name = cls.name
+ del db.class_by_struct[cls.struct]
+ del db.class_by_name[cls.name]
+ print("Deleted class %s" % name)
+ else:
+ Warning("No class chosen")
+ Refresh()
+
+
@menu_item('Set VTable')
def set_vtable():
cls = choose_class()