ATNativeItemProperty.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace AnyThinkAds.Api{
  5. public class ATNativeItemProperty {
  6. public int x;
  7. public int y;
  8. public int width;
  9. public int height;
  10. public bool usesPixel;
  11. public string backgroundColor;
  12. public string textColor; //只是针对text的view有效
  13. public int textSize; //只是针对text的view有效
  14. public bool isCustomClick; //只针对Android
  15. public ATNativeItemProperty(int x, int y, int width, int height, string backgroundColor, string textColor, int textSize, bool usesPixel, bool isCustomClick)
  16. {
  17. this.x = x;
  18. this.y = y;
  19. this.width = width;
  20. this.height = height;
  21. this.usesPixel = usesPixel;
  22. this.backgroundColor = backgroundColor;
  23. this.textColor = textColor;
  24. this.textSize = textSize;
  25. this.isCustomClick = isCustomClick;
  26. }
  27. public ATNativeItemProperty(int x, int y, int width, int height, string backgroundColor, string textColor, int textSize, bool usesPixel)
  28. {
  29. this.x = x;
  30. this.y = y;
  31. this.width = width;
  32. this.height = height;
  33. this.usesPixel = usesPixel;
  34. this.backgroundColor = backgroundColor;
  35. this.textColor = textColor;
  36. this.textSize = textSize;
  37. }
  38. public ATNativeItemProperty(int x,int y,int width,int height,string backgroundColor,string textColor,int textSize){
  39. this.x = x;
  40. this.y = y;
  41. this.width = width;
  42. this.height = height;
  43. this.backgroundColor = backgroundColor;
  44. this.textColor = textColor;
  45. this.textSize = textSize;
  46. #if UNITY_ANDROID
  47. this.usesPixel = true;
  48. #else
  49. this.usesPixel = false;
  50. #endif
  51. }
  52. }
  53. }