forked from Mirrors/openclonk
Add EditorInitialize callback
parent
693c0124b9
commit
bce09d272d
|
@ -53,6 +53,11 @@
|
||||||
<col></col>
|
<col></col>
|
||||||
<col>When the object is removed.</col>
|
<col>When the object is removed.</col>
|
||||||
</row>
|
</row>
|
||||||
|
<row id="EditorInitialize">
|
||||||
|
<literal_col>EditorInitialize</literal_col>
|
||||||
|
<col></col>
|
||||||
|
<col>Called after Construction and Initialize when the object is placed in the editor.</col>
|
||||||
|
</row>
|
||||||
<row id="Hit">
|
<row id="Hit">
|
||||||
<literal_col>Hit</literal_col>
|
<literal_col>Hit</literal_col>
|
||||||
<col></col>
|
<col></col>
|
||||||
|
|
|
@ -1368,6 +1368,7 @@ void C4ControlEMMoveObject::Execute() const
|
||||||
#endif
|
#endif
|
||||||
C4Object *obj = ::Game.CreateObject(C4ID(StringParam), nullptr, NO_OWNER, fixtoi(tx), fixtoi(ty), 0, create_centered);
|
C4Object *obj = ::Game.CreateObject(C4ID(StringParam), nullptr, NO_OWNER, fixtoi(tx), fixtoi(ty), 0, create_centered);
|
||||||
if (container && obj && container->Status && obj->Status) obj->Enter(container);
|
if (container && obj && container->Status && obj->Status) obj->Enter(container);
|
||||||
|
if (obj && obj->Status) obj->Call(P_EditorInitialize); // specific initialization when placed in editor
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EMMO_Transform:
|
case EMMO_Transform:
|
||||||
|
@ -1383,7 +1384,7 @@ void C4ControlEMMoveObject::Execute() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// update property dlg & status bar
|
// update property dlg & status bar
|
||||||
if (fLocalCall && eAction != eAction)
|
if (fLocalCall && eAction != EMMO_Move)
|
||||||
Console.EditCursor.OnSelectionChanged();
|
Console.EditCursor.OnSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -289,6 +289,7 @@ C4StringTable::C4StringTable()
|
||||||
P[P_EditorHelp] = "EditorHelp";
|
P[P_EditorHelp] = "EditorHelp";
|
||||||
P[P_Description] = "Description";
|
P[P_Description] = "Description";
|
||||||
P[P_AllowEditing] = "AllowEditing";
|
P[P_AllowEditing] = "AllowEditing";
|
||||||
|
P[P_EditorInitialize] = "EditorInitialize";
|
||||||
P[DFA_WALK] = "WALK";
|
P[DFA_WALK] = "WALK";
|
||||||
P[DFA_FLIGHT] = "FLIGHT";
|
P[DFA_FLIGHT] = "FLIGHT";
|
||||||
P[DFA_KNEEL] = "KNEEL";
|
P[DFA_KNEEL] = "KNEEL";
|
||||||
|
|
|
@ -513,6 +513,7 @@ enum C4PropertyName
|
||||||
P_EditorHelp,
|
P_EditorHelp,
|
||||||
P_Description,
|
P_Description,
|
||||||
P_AllowEditing,
|
P_AllowEditing,
|
||||||
|
P_EditorInitialize,
|
||||||
// Default Action Procedures
|
// Default Action Procedures
|
||||||
DFA_WALK,
|
DFA_WALK,
|
||||||
DFA_FLIGHT,
|
DFA_FLIGHT,
|
||||||
|
|
Loading…
Reference in New Issue