| 1213 | } |
| 1214 | |
| 1215 | void enableAssetEditor(Asset* asset) |
| 1216 | { |
| 1217 | if (!asset) { return; } |
| 1218 | |
| 1219 | // For now, only the levels have an asset editor. |
| 1220 | // TODO: Other asset editors. |
| 1221 | if (asset->type == TYPE_LEVEL) |
| 1222 | { |
| 1223 | s_editorMode = EDIT_ASSET; |
| 1224 | s_editorAssetType = asset->type; |
| 1225 | LevelEditor::init(asset); |
| 1226 | } |
| 1227 | else |
| 1228 | { |
| 1229 | showMessageBox("Warning", "The selected asset '%s' does not yet have an Asset Editor.", asset->name.c_str()); |
| 1230 | } |
| 1231 | } |
| 1232 | |
| 1233 | void disableAssetEditor() |
| 1234 | { |
no test coverage detected