| 458 | } |
| 459 | |
| 460 | GuiControl* GuiInspectorTypeTerrainAssetPtr::constructEditControl() |
| 461 | { |
| 462 | // Create base filename edit controls |
| 463 | GuiControl* retCtrl = Parent::constructEditControl(); |
| 464 | if (retCtrl == NULL) |
| 465 | return retCtrl; |
| 466 | |
| 467 | // Change filespec |
| 468 | char szBuffer[512]; |
| 469 | dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"TerrainAsset\", \"AssetBrowser.changeAsset\", %s, %s);", |
| 470 | mInspector->getIdString(), mCaption); |
| 471 | mBrowseButton->setField("Command", szBuffer); |
| 472 | |
| 473 | setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString()); |
| 474 | |
| 475 | // Create "Open in ShapeEditor" button |
| 476 | mShapeEdButton = new GuiBitmapButtonCtrl(); |
| 477 | |
| 478 | mShapeEdButton->setField("Command", "EditorGui.setEditor(TerrainEditorPlugin);"); |
| 479 | |
| 480 | char bitmapName[512] = "ToolsModule:TerrainBlock_image"; |
| 481 | mShapeEdButton->setBitmap(StringTable->insert(bitmapName)); |
| 482 | |
| 483 | mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); |
| 484 | mShapeEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); |
| 485 | mShapeEdButton->setDataField(StringTable->insert("hovertime"), NULL, "1000"); |
| 486 | mShapeEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the Shape Editor"); |
| 487 | |
| 488 | mShapeEdButton->registerObject(); |
| 489 | addObject(mShapeEdButton); |
| 490 | |
| 491 | return retCtrl; |
| 492 | } |
| 493 | |
| 494 | bool GuiInspectorTypeTerrainAssetPtr::updateRects() |
| 495 | { |
nothing calls this directly
no test coverage detected