fcClouds.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //---------------------------------------------------------------------------
  2. #include <fmx.h>
  3. #pragma hdrstop
  4. #include "fcClouds.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma link "GBE.Clouds"
  8. #pragma resource "*.fmx"
  9. TFormClouds *FormClouds;
  10. //---------------------------------------------------------------------------
  11. __fastcall TFormClouds::TFormClouds(TComponent* Owner)
  12. : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TFormClouds::FormCreate(TObject *Sender)
  17. {
  18. GBEClouds1->AddTextureCloud(TextureMaterialSource1);
  19. GBEClouds1->AddTextureCloud(TextureMaterialSource2);
  20. GBEClouds1->AddTextureCloud(TextureMaterialSource3);
  21. GBEClouds1->NbClouds = 15;
  22. GBEClouds1->WindSpeed = 0.1;
  23. GBEClouds1->Limits = 100;
  24. GBEClouds1->ActiveWind = true;
  25. FloatAnimation1->Start();
  26. }
  27. //---------------------------------------------------------------------------
  28. void __fastcall TFormClouds::FloatAnimation1Process(TObject *Sender)
  29. {
  30. GBEClouds1->MoveClouds();
  31. }
  32. //---------------------------------------------------------------------------
  33. void __fastcall TFormClouds::ArcDial1Change(TObject *Sender)
  34. {
  35. GBEClouds1->RotationAngle->Y = ArcDial1->Value;
  36. }
  37. //---------------------------------------------------------------------------
  38. void __fastcall TFormClouds::SpinBox1Change(TObject *Sender)
  39. {
  40. if (SpinBox1->Value > 0)
  41. GBEClouds1->NbClouds = round(SpinBox1->Value);
  42. }
  43. //---------------------------------------------------------------------------
  44. void __fastcall TFormClouds::SpinBox2Change(TObject *Sender)
  45. {
  46. GBEClouds1->WindSpeed = 0.1 * SpinBox2->Value;
  47. }
  48. //---------------------------------------------------------------------------