Example #1
0
/////////////////////////////////////////////////////////////////////
// TPreferencesDialog
// ------------------
//
void TPreferencesDialog::WTextureDblClk ()
{
   // Don't select empty texture !
   if ( WTextureName[0] == '\0' || strcmp (WTextureName, "-") == 0 )
      return;
   
   // Create modeless dialog box
   if ( pWTextureDialog == NULL || pWTextureDialog->IsWindow() == FALSE )
   {
      delete pWTextureDialog;
      pWTextureDialog = new TDisplayWallTextureDialog (Parent);
      pWTextureDialog->Create();
   }
   
   if ( pWTextureDialog->IsWindow() )
   {
      TextureInfo *info = FindTextureByName(WTextureName);
      
      if ( pWTextureDialog->SelectBitmap2 (info->filename) < 0 )
	 Notify ("Error: Cannot select the texture name \"%s\" in the "
		 "dialog box of Wall Texture view ! (BUG)",
		 WTextureName);
   }
   else
      Notify ("Error: Cannot create dialog box of Wall "
	      "Texture view !");
}
Example #2
0
////////////////////////////////////////////////////////////
// TViewBitmapListDialog
// -----------------
//	Display sprite whose name was double clicked
void TViewBitmapListDialog::LBNDblclk ()
{
	char BitmapName[MAX_BITMAPNAME + 1];

	if ( pBitmapList->GetSelString (BitmapName, MAX_BITMAPNAME) > 1 )
	{
	   TextureInfo *info = FindTextureByName(BitmapName);
	   pBitmapControl->SelectBitmap2 (info->filename);
	}
}