| 381 | } |
| 382 | |
| 383 | GuiControl * GuiInspectorTypeSoundAssetPtr::constructEditControl() |
| 384 | { |
| 385 | // Create base filename edit controls |
| 386 | GuiControl* retCtrl = Parent::constructEditControl(); |
| 387 | if (retCtrl == NULL) |
| 388 | return retCtrl; |
| 389 | |
| 390 | // Change filespec |
| 391 | char szBuffer[512]; |
| 392 | dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"SoundAsset\", \"AssetBrowser.changeAsset\", %s, \"\");", |
| 393 | getIdString()); |
| 394 | mBrowseButton->setField("Command", szBuffer); |
| 395 | |
| 396 | setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString()); |
| 397 | |
| 398 | // Create "Open in Editor" button |
| 399 | mEditButton = new GuiBitmapButtonCtrl(); |
| 400 | |
| 401 | dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.editAsset(%d.getText());", retCtrl->getId()); |
| 402 | mEditButton->setField("Command", szBuffer); |
| 403 | |
| 404 | char bitmapName[512] = "ToolsModule:SFXEmitter_image"; |
| 405 | mEditButton->setBitmap(StringTable->insert(bitmapName)); |
| 406 | |
| 407 | mEditButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); |
| 408 | mEditButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); |
| 409 | mEditButton->setDataField(StringTable->insert("hovertime"), NULL, "1000"); |
| 410 | mEditButton->setDataField(StringTable->insert("tooltip"), NULL, "Test play this sound"); |
| 411 | |
| 412 | mEditButton->registerObject(); |
| 413 | addObject(mEditButton); |
| 414 | |
| 415 | return retCtrl; |
| 416 | } |
| 417 | |
| 418 | bool GuiInspectorTypeSoundAssetPtr::updateRects() |
| 419 | { |
nothing calls this directly
no test coverage detected