10 public void HideMouseInfo()
12 this.transRight.SetActive(
false);
16 public void SetDragImage(Image i,
string text =
null, UIText uiText =
null)
20 this.imageDrag.SetActive(
false);
21 this.SetDragText(
null,
null);
24 this.imageDrag.sprite = i.sprite;
25 this.imageDrag.SetNativeSize();
26 this.imageDrag.color = i.color;
27 RectTransform rectTransform = this.imageDrag.Rect();
28 RectTransform rectTransform2 = i.Rect();
29 rectTransform.sizeDelta = rectTransform2.sizeDelta;
30 rectTransform.localScale = rectTransform2.localScale;
31 rectTransform.pivot = rectTransform2.pivot;
34 RectTransform rectTransform3 = this.textDrag2.rectTransform;
35 RectTransform rectTransform4 = uiText.rectTransform;
36 rectTransform3.pivot = rectTransform4.pivot;
37 rectTransform3.anchorMin = rectTransform4.anchorMin;
38 rectTransform3.anchorMax = rectTransform4.anchorMax;
39 this.textDrag2.size = uiText.size;
40 this.textDrag2.fontStyle = uiText.fontStyle;
41 this.imageDrag.transform.position = i.transform.position;
42 rectTransform3.position = rectTransform4.position;
44 this.imageDrag.transform.position = EInput.mpos + (EClass.game.UseGrid ? this.imageDragFix2 : this.imageDragFix2);
45 this.SetDragText(text,
null);
46 Util.ClampToScreen(this.imageDrag.Rect(),
this.marginImageDrag);
47 this.imageDrag.SetActive(
true);
51 public void SetDragText(
string text =
null,
string text2 =
null)
53 if (text !=
null && text != this.textDrag.text)
55 this.textDrag.text = text.lang();
57 this.textDrag.transform.parent.SetActive(!text.IsEmpty());
58 if (text2 !=
null && text2 != this.textDrag2.text)
60 this.textDrag2.text = text2.lang();
62 this.textDrag2.SetActive(!text2.IsEmpty());
69 public Transform frame;
75 public Image imageDrag;
78 public Image imageCover;
81 public CanvasGroup cgDrag;
84 public UIText textDrag;
87 public UIText textDrag2;
90 public UIText textMouseHintRight;
93 public UIText textMouseHintLeft;
96 public Vector3 imageDragFix;
99 public Vector3 imageDragFix2;
102 public Vector3 textMouseHintFix;
105 public Vector3 textMouseHintFixLeft;
108 public int marginImageDrag;
111 public Image imageRight;
114 public UIText textRight;
117 public UIText textLeft;
120 public UIText textMiddle;
123 public UIText textWheel;
126 public Transform transRight;
129 public Vector2 rightTextPos;
132 public Vector2 leftTextPos;
135 public Vector2 wheelTextPos;
138 public Vector2 wheelTextPos2;
141 public Vector3 transRightPos;