MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / constructEditControl

Method constructEditControl

Engine/source/T3D/assets/ParticleAsset.cpp:146–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146GuiControl* GuiInspectorTypeParticleAssetPtr::constructEditControl()
147{
148 // Create base filename edit controls
149 GuiControl *retCtrl = Parent::constructEditControl();
150 if (retCtrl == NULL)
151 return retCtrl;
152
153 // Change filespec
154 char szBuffer[512];
155 dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ParticleAsset\", \"AssetBrowser.changeAsset\", %d, %s);",
156 mInspector->getIdString(), mCaption);
157 mBrowseButton->setField("Command", szBuffer);
158
159 // Create "Open in ShapeEditor" button
160 mSMEdButton = new GuiBitmapButtonCtrl();
161
162 dSprintf(szBuffer, sizeof(szBuffer), "echo(\"Game Object Editor not implemented yet!\");", retCtrl->getId());
163 mSMEdButton->setField("Command", szBuffer);
164
165 char bitmapName[512] = "ToolsModule:shape_editor_n_image";
166 mSMEdButton->setBitmap(StringTable->insert(bitmapName));
167
168 mSMEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
169 mSMEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile");
170 mSMEdButton->setDataField(StringTable->insert("hovertime"), NULL, "1000");
171 mSMEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the State Machine Editor");
172
173 mSMEdButton->registerObject();
174 addObject(mSMEdButton);
175
176 return retCtrl;
177}
178
179bool GuiInspectorTypeParticleAssetPtr::updateRects()
180{

Callers

nothing calls this directly

Calls 8

dSprintfFunction · 0.85
getIdStringMethod · 0.80
setFieldMethod · 0.80
getIdMethod · 0.65
setBitmapMethod · 0.45
insertMethod · 0.45
setDataFieldMethod · 0.45
registerObjectMethod · 0.45

Tested by

no test coverage detected