Esempio n. 1
0
            public override void OnUpdate()
            {
                WorldSide localSide = World_AIW2.Instance.GetLocalPlayerSide();

                if (localSide == null)
                {
                    return;
                }
                Planet planet = Engine_AIW2.Instance.NonSim_GetPlanetBeingCurrentlyViewed();

                if (planet != null)
                {
                }                         //prevent compiler warning
                ArcenUI_ButtonSet elementAsType = (ArcenUI_ButtonSet)Element;

                if (elementAsType != null)
                {
                }                                //prevent compiler warning
                Window_InGameTechTabMenu windowController = (Window_InGameTechTabMenu)Element.Window.Controller;

                if (windowController != null)
                {
                }                                   //prevent compiler warning

                if (elementAsType.Buttons.Count <= 0)
                {
                    elementAsType.ClearButtons();

                    List <TechMenu> menus = TechMenuTable.Instance.Rows;
                    int             x     = 0;
                    for (int i = 0; i < menus.Count; i++)
                    {
                        TechMenu item = menus[i];
                        if (item.DoNotShowOnTechMenu)
                        {
                            continue;
                        }
                        bItem   newButtonController = new bItem(i);
                        Vector2 offset;
                        offset.x = x * elementAsType.ButtonWidth;
                        offset.y = 0;
                        Vector2 size;
                        size.x = elementAsType.ButtonWidth;
                        size.y = elementAsType.ButtonHeight;
                        elementAsType.AddButton(newButtonController, size, offset);
                        x++;
                    }

                    elementAsType.ActuallyPutItemsBackInPoolThatAreStillCleared();
                }
            }
Esempio n. 2
0
 public Window_InGameTechTabMenu()
 {
     Instance                    = this;
     this.OnlyShowInGame         = true;
     this.SupportsMasterMenuKeys = true;
 }