public override void OnInitialize() { Instance = this; }
public void Init() { //Erase all previous value Erase(); if (m_itemSource == null) { visible = false; return; } sizeMultplier = iZoom * uIScale * screenMult; allConnection = new List <ItemConnection>(); allBasePanel = new List <ItemSkillPanel>(); allText = new List <ItemSkillText>(); backGround = new UIPanel(); backGround.SetPadding(0); backGround.Left.Set(0, 0f); backGround.Top.Set(0, 0f); backGround.Width.Set(Main.screenWidth, 0f); backGround.Height.Set(Main.screenHeight, 0f); backGround.BackgroundColor = new Color(73, 94, 171, 150); Append(backGround); string points = "Evolution Points : " + m_itemSource.GetEvolutionPoints + " / " + m_itemSource.GetMaxEvolutionPoints; if (m_itemSource.Ascention > 0) { points += "\nAscend Points : " + m_itemSource.GetAscendPoints + " / " + m_itemSource.GetMaxAscendPoints; } skillPointsLeft = new UIText(points); skillPointsLeft.Left.Set(150, 0f); skillPointsLeft.Top.Set(150, 0f); backGround.Append(skillPointsLeft); ResetText = new UIText("RESET", 1 * screenMult, true) { TextColor = Color.Gray }; ResetText.Left.Set(150 * screenMult, 0f); ResetText.Top.Set(250 * screenMult, 0f); ResetText.Width.Set(0, 0f); ResetText.Height.Set(0, 0f); ResetText.OnClick += new MouseEvent(ResetStats); ResetText.OnMouseOver += new MouseEvent(ResetTextHover); ResetText.OnMouseOut += new MouseEvent(ResetTextOut); backGround.Append(ResetText); backGround.OnMouseDown += new UIElement.MouseEvent(DragStart); backGround.OnMouseUp += new UIElement.MouseEvent(DragEnd); backGround.OnScrollWheel += new ScrollWheelEvent(iScrollUpDown); Instance = this; for (int i = 0; i < m_itemSource.GetItemTree.GetSize; i++) { SkillInit(m_itemSource.GetItemTree.GetNode(i)); } int listSize = allConnection.Count; for (int i = 0; i < listSize; i++) { backGround.Append(allConnection[i]); } listSize = allBasePanel.Count; for (int i = 0; i < listSize; i++) { backGround.Append(allBasePanel[i]); } // }