MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / enableAssetEditor

Function enableAssetEditor

TheForceEngine/TFE_Editor/editor.cpp:1215–1231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

drawInfoPanelFunction · 0.85

Calls 3

showMessageBoxFunction · 0.85
c_strMethod · 0.80
initFunction · 0.50

Tested by

no test coverage detected