SysSizeView.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class SysSizeView : BaseView
  6. {
  7. public GameObject viewOpen;
  8. public GameObject viewClose;
  9. public Text textName;
  10. private SysSizeConfig ssc;
  11. public override void init(int i, BaseConfig c, int vi)
  12. {
  13. base.init(i, c, vi);
  14. ssc = (SysSizeConfig)c;
  15. textName.text = ssc.text;
  16. viewOpen.SetActive(!ssc.isChoose);
  17. viewClose.SetActive(ssc.isChoose);
  18. }
  19. public void chooseView()
  20. {
  21. switch(viewIndex)
  22. {
  23. case 0:
  24. CustomInfo.mWidth = 1920;
  25. CustomInfo.mHight = 1080;
  26. break;
  27. case 1:
  28. CustomInfo.mWidth = 1280;
  29. CustomInfo.mHight = 720;
  30. break;
  31. case 2:
  32. CustomInfo.mWidth = 640;
  33. CustomInfo.mHight = 360;
  34. break;
  35. }
  36. CustomInfo.mWidth = 1920;
  37. CustomInfo.mHight = 1080;
  38. CustomInfo.camIndex = viewIndex + 1;
  39. baselist.updateConfig(CustomInfo.sscList);
  40. }
  41. }