| 199 | } |
| 200 | |
| 201 | GuiControl* GuiInspectorTypeMaterialName::construct(const char* command) |
| 202 | { |
| 203 | GuiControl* retCtrl = new GuiTextEditCtrl(); |
| 204 | |
| 205 | retCtrl->setDataField( StringTable->insert("profile"), NULL, "GuiInspectorTextEditProfile" ); |
| 206 | |
| 207 | _registerEditControl( retCtrl ); |
| 208 | |
| 209 | char szBuffer[512]; |
| 210 | dSprintf( szBuffer, 512, "%d.apply(%d.getText());",getId(), retCtrl->getId() ); |
| 211 | retCtrl->setField("AltCommand", szBuffer ); |
| 212 | retCtrl->setField("Validate", szBuffer ); |
| 213 | |
| 214 | //return retCtrl; |
| 215 | mBrowseButton = new GuiBitmapButtonCtrl(); |
| 216 | |
| 217 | RectI browseRect( Point2I( ( getLeft() + getWidth()) - 26, getTop() + 2), Point2I(20, getHeight() - 4) ); |
| 218 | |
| 219 | dSprintf( szBuffer, 512, command, getId()); |
| 220 | mBrowseButton->setField( "Command", szBuffer ); |
| 221 | |
| 222 | //temporary static button name |
| 223 | char bitmapName[512] = "tools/materialEditor/gui/change-material-btn"; |
| 224 | mBrowseButton->setBitmap( bitmapName ); |
| 225 | |
| 226 | mBrowseButton->setDataField( StringTable->insert("Profile"), NULL, "GuiButtonProfile" ); |
| 227 | mBrowseButton->registerObject(); |
| 228 | addObject( mBrowseButton ); |
| 229 | |
| 230 | // Position |
| 231 | mBrowseButton->resize( browseRect.point, browseRect.extent ); |
| 232 | |
| 233 | return retCtrl; |
| 234 | } |
| 235 | |
| 236 | GuiControl* GuiInspectorTypeMaterialName::constructEditControl() |
| 237 | { |
nothing calls this directly
no test coverage detected