| 191 | } |
| 192 | |
| 193 | GuiControl* 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 | |
| 228 | bool GuiInspectorTypeCubemapAssetPtr::updateRects() |
| 229 | { |
nothing calls this directly
no test coverage detected