forked from Mirrors/openclonk
Qt Editor: Add HideInCreator DefCore setting
Hides internal definitions, libraries, etc. from the object creator in the editor.qteditor
parent
d3ede324be
commit
0206e9a74a
|
@ -275,6 +275,11 @@
|
|||
<col>Integer</col>
|
||||
<col>0 or 1. If 1 the object's pathfinding will ignore any transfer zones.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>HideInCreator</literal_col>
|
||||
<col>Boolean</col>
|
||||
<col>false (default) or true. If true, the definition is not shown in the object creator window of the editor. Should be used for internal definitions, libraries, etc.</col>
|
||||
</row>
|
||||
</table>
|
||||
</text>
|
||||
</part>
|
||||
|
|
|
@ -63,6 +63,8 @@ void C4ConsoleQtDefinitionListModel::ReInit()
|
|||
int32_t index = 0; C4Def *def;
|
||||
while (def = ::Definitions.GetDef(index++))
|
||||
{
|
||||
// Ignore hidden defs
|
||||
if (def->HideInCreator) continue;
|
||||
// Build path leading to this definition
|
||||
DefListNode *node_parent = root.get();
|
||||
StdCopyStrBuf fn(def->Filename), fn2;
|
||||
|
|
|
@ -132,6 +132,7 @@ void C4Def::DefaultDefCore()
|
|||
ConSizeOff=0;
|
||||
NoGet=0;
|
||||
NoTransferZones=0;
|
||||
HideInCreator = false;
|
||||
}
|
||||
|
||||
bool C4Def::LoadDefCore(C4Group &hGroup)
|
||||
|
@ -279,6 +280,7 @@ void C4Def::CompileFunc(StdCompiler *pComp)
|
|||
|
||||
pComp->Value(mkNamingAdapt(mkBitfieldAdapt<int32_t>(AllowPictureStack, AllowPictureStackModes), //undocumented
|
||||
"AllowPictureStack", 0 ));
|
||||
pComp->Value(mkNamingAdapt(HideInCreator, "HideInCreator", false));
|
||||
}
|
||||
|
||||
//-------------------------------- C4Def -------------------------------------------------------
|
||||
|
|
|
@ -149,6 +149,7 @@ public:
|
|||
int32_t RotatedEntrance; // 0 entrance not rotateable, 1 entrance always, 2-360 entrance within this rotation
|
||||
int32_t NoTransferZones;
|
||||
int32_t AllowPictureStack; // allow stacking of multiple items in menus even if some attributes do not match. APS_*-values
|
||||
bool HideInCreator; // If true, the definition is not visible in the object creator of the editor
|
||||
public:
|
||||
void DefaultDefCore();
|
||||
bool LoadDefCore(C4Group &hGroup);
|
||||
|
|
Loading…
Reference in New Issue