private void InitializePage() { int num1 = 270; int num2 = 20; this._container = new UIElement() { HAlign = 0.0f, VAlign = 0.0f, Width = new StyleDimension(0.0f, 1f), Height = new StyleDimension((float)(-num1 - num2), 1f), Top = new StyleDimension((float)num1, 0.0f) }; this.Append(this._container); PowerStripUIElement powerStripUiElement1 = new PowerStripUIElement("strip 0", this.CreateMainPowerStrip()); powerStripUiElement1.HAlign = 0.0f; powerStripUiElement1.VAlign = 0.5f; powerStripUiElement1.Left = new StyleDimension(20f, 0.0f); PowerStripUIElement powerStripUiElement2 = powerStripUiElement1; powerStripUiElement2.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); powerStripUiElement2.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); this._mainPowerStrip = powerStripUiElement2; PowerStripUIElement powerStripUiElement3 = new PowerStripUIElement("strip 1", this.CreateTimePowerStrip()); powerStripUiElement3.HAlign = 0.0f; powerStripUiElement3.VAlign = 0.5f; powerStripUiElement3.Left = new StyleDimension(80f, 0.0f); PowerStripUIElement powerStripUiElement4 = powerStripUiElement3; powerStripUiElement4.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); powerStripUiElement4.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); this._timePowersStrip = powerStripUiElement4; PowerStripUIElement powerStripUiElement5 = new PowerStripUIElement("strip 1", this.CreateWeatherPowerStrip()); powerStripUiElement5.HAlign = 0.0f; powerStripUiElement5.VAlign = 0.5f; powerStripUiElement5.Left = new StyleDimension(80f, 0.0f); PowerStripUIElement powerStripUiElement6 = powerStripUiElement5; powerStripUiElement6.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); powerStripUiElement6.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); this._weatherPowersStrip = powerStripUiElement6; PowerStripUIElement powerStripUiElement7 = new PowerStripUIElement("strip 1", this.CreatePersonalPowerStrip()); powerStripUiElement7.HAlign = 0.0f; powerStripUiElement7.VAlign = 0.5f; powerStripUiElement7.Left = new StyleDimension(80f, 0.0f); PowerStripUIElement powerStripUiElement8 = powerStripUiElement7; powerStripUiElement8.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); powerStripUiElement8.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); this._personalPowersStrip = powerStripUiElement8; UICreativeInfiniteItemsDisplay infiniteItemsDisplay = new UICreativeInfiniteItemsDisplay((UIState)this); infiniteItemsDisplay.HAlign = 0.0f; infiniteItemsDisplay.VAlign = 0.5f; infiniteItemsDisplay.Left = new StyleDimension(80f, 0.0f); infiniteItemsDisplay.Width = new StyleDimension(480f, 0.0f); infiniteItemsDisplay.Height = new StyleDimension(-88f, 1f); this._infiniteItemsWindow = infiniteItemsDisplay; this.RefreshElementsOrder(); this.OnUpdate += new UIElement.ElementEvent(this.UICreativePowersMenu_OnUpdate); }
private void InitializePage() { int num = 270; int num2 = 20; _container = new UIElement { HAlign = 0f, VAlign = 0f, Width = new StyleDimension(0f, 1f), Height = new StyleDimension(-num - num2, 1f), Top = new StyleDimension(num, 0f) }; Append(_container); List <UIElement> buttons = CreateMainPowerStrip(); PowerStripUIElement powerStripUIElement = new PowerStripUIElement("strip 0", buttons) { HAlign = 0f, VAlign = 0.5f, Left = new StyleDimension(20f, 0f) }; powerStripUIElement.OnMouseOver += strip_OnMouseOver; powerStripUIElement.OnMouseOut += strip_OnMouseOut; _mainPowerStrip = powerStripUIElement; List <UIElement> buttons2 = CreateTimePowerStrip(); PowerStripUIElement powerStripUIElement2 = new PowerStripUIElement("strip 1", buttons2) { HAlign = 0f, VAlign = 0.5f, Left = new StyleDimension(80f, 0f) }; powerStripUIElement2.OnMouseOver += strip_OnMouseOver; powerStripUIElement2.OnMouseOut += strip_OnMouseOut; _timePowersStrip = powerStripUIElement2; List <UIElement> buttons3 = CreateWeatherPowerStrip(); PowerStripUIElement powerStripUIElement3 = new PowerStripUIElement("strip 1", buttons3) { HAlign = 0f, VAlign = 0.5f, Left = new StyleDimension(80f, 0f) }; powerStripUIElement3.OnMouseOver += strip_OnMouseOver; powerStripUIElement3.OnMouseOut += strip_OnMouseOut; _weatherPowersStrip = powerStripUIElement3; List <UIElement> buttons4 = CreatePersonalPowerStrip(); PowerStripUIElement powerStripUIElement4 = new PowerStripUIElement("strip 1", buttons4) { HAlign = 0f, VAlign = 0.5f, Left = new StyleDimension(80f, 0f) }; powerStripUIElement4.OnMouseOver += strip_OnMouseOver; powerStripUIElement4.OnMouseOut += strip_OnMouseOut; _personalPowersStrip = powerStripUIElement4; _infiniteItemsWindow = new UICreativeInfiniteItemsDisplay(this) { HAlign = 0f, VAlign = 0.5f, Left = new StyleDimension(80f, 0f), Width = new StyleDimension(480f, 0f), Height = new StyleDimension(-88f, 1f) }; RefreshElementsOrder(); base.OnUpdate += UICreativePowersMenu_OnUpdate; }