summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs
blob: 7dcf0aac1ce666647ed071a1d04abb9b4a88302b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
using System;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;

namespace XMainClient.UI
{
	internal class AuctionBillBehaviour : DlgBehaviourBase
	{
		public IXUISprite m_maskSprite;

		public IXUILabel m_billTitleTxt;

		public GameObject m_ItemTpl;

		public IXUISprite m_iconSprite;

		public IXUILabel m_RecentPrice;

		public IXUILabel m_TotalPrice;

		public IXUILabel m_ProcedurePrice;

		public IXUILabel m_RecommondTxt;

		public IXUITable m_sellOper;

		public AuctionNumberOperate m_SinglePriceOperate;

		public AuctionNumberOperate m_CountOperate;

		public IXUIButton m_LeftButton;

		public IXUIButton m_RightButton;

		public IXUIButton m_CloseButton;

		private IXUILabel m_rightButtonLabel;

		private IXUILabel m_leftButtonLabel;

		private Vector3 m_leftPosition = new Vector3(-137f, -162f, 0f);

		private Vector3 m_rightPosition = new Vector3(137f, -162f, 0f);

		private Vector3 m_middlePosition = new Vector3(0f, -162f, 0f);

		private void Awake()
		{
			this.m_billTitleTxt = (base.transform.Find("Detail/Title").GetComponent("XUILabel") as IXUILabel);
			this.m_ItemTpl = base.transform.Find("Detail/ItemTpl").gameObject;
			this.m_iconSprite = (base.transform.Find("Detail/ItemTpl/Icon").GetComponent("XUISprite") as IXUISprite);
			this.m_RecentPrice = (base.transform.Find("Detail/SellSuccess/RecentPrice").GetComponent("XUILabel") as IXUILabel);
			this.m_TotalPrice = (base.transform.Find("Detail/SellSuccess/Grid/Total/Label").GetComponent("XUILabel") as IXUILabel);
			this.m_ProcedurePrice = (base.transform.Find("Detail/SellSuccess/Grid/Procedure/Label").GetComponent("XUILabel") as IXUILabel);
			this.m_SinglePriceOperate = new AuctionNumberOperate(base.transform.Find("Detail/SellSuccess/Grid/Price").gameObject, new Vector3(-98f, 96f, 0f));
			this.m_CountOperate = new AuctionNumberOperate(base.transform.Find("Detail/SellSuccess/Grid/Free").gameObject, new Vector3(-98f, 36f, 0f));
			this.m_LeftButton = (base.transform.Find("Detail/LeftButton").GetComponent("XUIButton") as IXUIButton);
			this.m_RightButton = (base.transform.Find("Detail/RightButton").GetComponent("XUIButton") as IXUIButton);
			this.m_maskSprite = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
			this.m_RecommondTxt = (base.transform.Find("Detail/SellSuccess/Recommond").GetComponent("XUILabel") as IXUILabel);
			this.m_rightButtonLabel = (base.transform.Find("Detail/RightButton/Label").GetComponent("XUILabel") as IXUILabel);
			this.m_leftButtonLabel = (base.transform.Find("Detail/LeftButton/Label").GetComponent("XUILabel") as IXUILabel);
			this.m_CloseButton = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
			this.m_sellOper = (base.transform.Find("Detail/SellSuccess/Grid").GetComponent("XUITable") as IXUITable);
			this.m_leftPosition = this.m_LeftButton.gameObject.transform.localPosition;
			this.m_rightPosition = this.m_RightButton.gameObject.transform.localPosition;
			this.m_middlePosition = new Vector3(0f, this.m_leftPosition.y, 0f);
		}

		public void SetButtonPosition(string[] seq)
		{
			int num = 0;
			bool flag = !string.IsNullOrEmpty(seq[0]);
			if (flag)
			{
				this.m_RightButton.SetVisible(true);
				this.m_rightButtonLabel.SetText(seq[0]);
				num++;
			}
			else
			{
				this.m_RightButton.SetVisible(false);
			}
			bool flag2 = !string.IsNullOrEmpty(seq[1]);
			if (flag2)
			{
				this.m_LeftButton.SetVisible(true);
				this.m_leftButtonLabel.SetText(seq[1]);
				num++;
			}
			else
			{
				this.m_LeftButton.SetVisible(false);
			}
			bool flag3 = num == 1;
			if (flag3)
			{
				this.m_RightButton.gameObject.transform.localPosition = this.m_middlePosition;
			}
			else
			{
				bool flag4 = num == 2;
				if (flag4)
				{
					this.m_LeftButton.gameObject.transform.localPosition = this.m_leftPosition;
					this.m_RightButton.gameObject.transform.localPosition = this.m_rightPosition;
				}
			}
		}
	}
}