diff options
author | Treeki <treeki@gmail.com> | 2012-12-04 03:44:02 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-12-04 03:44:02 +0100 |
commit | 652d8a1f3ac020b62c96caaeb72b95353c5ea7bd (patch) | |
tree | 4bbaeaad2f5b94fbe15b4fd70fef5de90a8b6449 /src | |
parent | 8d8c0287ee0f6dac9caebfcdedde410a532cb35f (diff) | |
download | koopatlas-652d8a1f3ac020b62c96caaeb72b95353c5ea7bd.tar.gz koopatlas-652d8a1f3ac020b62c96caaeb72b95353c5ea7bd.zip |
added the title level to world editor.. how did I forget to commit this
Diffstat (limited to 'src')
-rw-r--r-- | src/mapdata.py | 9 | ||||
-rw-r--r-- | src/worldeditor.py | 8 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index 7a61a64..88e1dcb 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -175,15 +175,15 @@ class KPPathTileLayer(KPLayer): self.cache = ['DUMMY_FLAG'] - if pathnode is None: - return - self.tileset = '' self.objects = [] self.doodads = [] self.associate = pathnode self.folder = '' + if pathnode is None: + return + self.updateCache() def _visibilityChanged(self, value): @@ -549,7 +549,7 @@ class KPPathLayer(KPLayer): @mapfile.dumpable('world_definition') class KPWorldDef(object): - __dump_attribs__ = ('uniqueKey', 'name', 'worldID', 'fsHintColours', 'fsTextColours', 'hudHintTransform', 'hudTextColours', 'musicTrackID') + __dump_attribs__ = ('uniqueKey', 'name', 'worldID', 'fsHintColours', 'fsTextColours', 'hudHintTransform', 'hudTextColours', 'musicTrackID', 'titleScreenID') def __init__(self): self.uniqueKey = -1 @@ -563,6 +563,7 @@ class KPWorldDef(object): self.hudTextColours = ((255,255,255,255),(255,255,255,255)) self.musicTrackID = 0 + self.titleScreenID = '01-40' @mapfile.dumpable('map_root') diff --git a/src/worldeditor.py b/src/worldeditor.py index 0993f35..d6cb308 100644 --- a/src/worldeditor.py +++ b/src/worldeditor.py @@ -20,7 +20,8 @@ class KPWorldTableModel(QtCore.QAbstractTableModel): 'FS Text 1', 'FS Text 2', 'FS Hint 1', 'FS Hint 2', 'HUD Text 1', 'HUD Text 2', - 'HUD Hue', 'HUD Saturation', 'HUD Lightness') + 'HUD Hue', 'HUD Saturation', 'HUD Lightness', + 'Title Level') def __init__(self, kpmap, parent=None): QtCore.QAbstractTableModel.__init__(self, parent) @@ -66,6 +67,8 @@ class KPWorldTableModel(QtCore.QAbstractTableModel): return editableColourStr(entry.hudTextColours[col - 7]) elif col >= 9 and col <= 11: return entry.hudHintTransform[col - 9] + elif col == 12: + return entry.titleScreenID if role == Qt.DecorationRole: if col == 3 or col == 4: @@ -122,6 +125,9 @@ class KPWorldTableModel(QtCore.QAbstractTableModel): new[col - 9] = v entry.hudHintTransform = new success = True + elif col == 12: + entry.titleScreenID = str(value.toString()) + success = True if success: self.dataChanged.emit(index, index) |