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

Method constructEditControl

Engine/source/T3D/assets/CubemapAsset.cpp:193–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193GuiControl* GuiInspectorTypeCubemapAssetPtr::constructEditControl()
194{
195 // Create base filename edit controls
196 GuiControl* retCtrl = Parent::constructEditControl();
197 if (retCtrl == NULL)
198 return retCtrl;
199
200 // Change filespec
201 char szBuffer[512];
202 dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"CubemapAsset\", \"AssetBrowser.changeAsset\", %d, %s);",
203 mInspector->getIdString(), mCaption);
204 mBrowseButton->setField("Command", szBuffer);
205
206 setDataField(StringTable->insert("object"), NULL, String::ToString(mInspector->getInspectObject()).c_str());
207
208 // Create "Open in ShapeEditor" button
209 mShapeEdButton = new GuiBitmapButtonCtrl();
210
211 dSprintf(szBuffer, sizeof(szBuffer), "CubemapEditor.openCubemapAsset(%d.getText());", retCtrl->getId());
212 mShapeEdButton->setField("Command", szBuffer);
213
214 char bitmapName[512] = "ToolsModule:shape_editor_n_image";
215 mShapeEdButton->setBitmap(StringTable->insert(bitmapName));
216
217 mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
218 mShapeEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile");
219 mShapeEdButton->setDataField(StringTable->insert("hovertime"), NULL, "1000");
220 mShapeEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the Shape Editor");
221
222 mShapeEdButton->registerObject();
223 addObject(mShapeEdButton);
224
225 return retCtrl;
226}
227
228bool GuiInspectorTypeCubemapAssetPtr::updateRects()
229{

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected