SetTetureDlg.cpp
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:3k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. // SetTetureDlg.cpp : 实现文件
  2. //
  3. #include "stdafx.h"
  4. #include "OGRESceneMgr.h"
  5. #include "SetTetureDlg.h"
  6. #include ".setteturedlg.h"
  7.  CString importtextruename;
  8. // CSetTetureDlg 对话框
  9. IMPLEMENT_DYNAMIC(CSetTetureDlg, CDialog)
  10. CSetTetureDlg::CSetTetureDlg(CWnd* pParent /*=NULL*/)
  11. : CDialog(CSetTetureDlg::IDD, pParent)
  12. {
  13. bimporttexture=false;
  14. texturename=0;
  15. }
  16. CSetTetureDlg::~CSetTetureDlg()
  17. {
  18. }
  19. void CSetTetureDlg::DoDataExchange(CDataExchange* pDX)
  20. {
  21. CDialog::DoDataExchange(pDX);
  22. DDX_Control(pDX, IDC_COMBOTEXTURE, SetTextureCombo);
  23. SetTextureCombo.AddString("Examples/EnvMappedRustySteel");
  24. SetTextureCombo.AddString("Examples/DarkMaterial");
  25. SetTextureCombo.AddString("Examples/SpaceSkyBox");
  26. SetTextureCombo.AddString("Examples/OgreLogo");
  27. SetTextureCombo.AddString("Examples/SceneSkyBox1");
  28. SetTextureCombo.AddString("Examples/SceneCubeMap1");
  29. SetTextureCombo.AddString("Examples/SceneSkyBox2");
  30. SetTextureCombo.AddString("Examples/SceneCubeMap2");
  31. SetTextureCombo.AddString("Examples/CloudyNoonSkyBox");
  32. SetTextureCombo.AddString("Examples/StormySkyBox");
  33. SetTextureCombo.AddString("Examples/MorningSkyBox");
  34. SetTextureCombo.AddString("Examples/EveningSkyBox");
  35. SetTextureCombo.AddString("Examples/CloudySky");
  36. SetTextureCombo.AddString("Examples/RustySteel");
  37. SetTextureCombo.AddString("Examples/Chrome");
  38. SetTextureCombo.AddString("Examples/SpaceSkyPlane");
  39. SetTextureCombo.AddString("Examples/TextureEffect1");
  40. SetTextureCombo.AddString("Examples/TextureEffect2");
  41. SetTextureCombo.AddString("Examples/TextureEffect3");
  42. SetTextureCombo.AddString("Examples/TextureEffect4");
  43. SetTextureCombo.AddString("Examples/BumpyMetal");
  44. SetTextureCombo.AddString("Examples/TransparentTest");
  45. SetTextureCombo.AddString("Examples/Flare");
  46. SetTextureCombo.AddString("Examples/Flare2");
  47. SetTextureCombo.AddString("Examples/Droplet");
  48. SetTextureCombo.AddString("Examples/Hilite/Yellow");
  49. SetTextureCombo.AddString("Examples/Rocky");
  50. SetTextureCombo.AddString("Examples/10PointBlock");
  51. SetTextureCombo.AddString("Material__25");
  52. SetTextureCombo.AddString("2 - Default");
  53. SetTextureCombo.AddString("Material #8");
  54. SetTextureCombo.AddString("Material #3");
  55. SetTextureCombo.AddString("Material #9");
  56. SetTextureCombo.AddString("Examples/Fish");
  57. SetTextureCombo.AddString("Examples/Ninja");
  58. SetTextureCombo.AddString("Examples/Robot");
  59. }
  60. BEGIN_MESSAGE_MAP(CSetTetureDlg, CDialog)
  61. ON_BN_CLICKED(IDC_BUTTONIMPORTTEXTURE, OnBnClickedButtonimporttexture)
  62. END_MESSAGE_MAP()
  63. // CSetTetureDlg 消息处理程序
  64. void CSetTetureDlg::OnBnClickedButtonimporttexture()
  65. {
  66. // TODO: 在此添加控件通知处理程序代码
  67. this->SetTextureCombo.GetLBText(this->SetTextureCombo.GetCurSel(),importtextruename);
  68. texturename=importtextruename.GetBuffer(importtextruename.GetLength());
  69. if(0==strlen(texturename)){
  70. MessageBox("纹理名不可为空!");}
  71. else
  72. bimporttexture=true;
  73. }