public override void OnUpdate()
            {
                WorldSide localSide = World_AIW2.Instance.GetLocalSide();

                if (localSide == null)
                {
                    return;
                }
                ArcenUI_ButtonSet             elementAsType    = (ArcenUI_ButtonSet)Element;
                Window_InGamePlanetActionMenu windowController = (Window_InGamePlanetActionMenu)Element.Window.Controller;

                if (windowController.PlanetChangedSinceLastButtonSetUpdate)
                {
                    elementAsType.ClearButtons();

                    Planet planet = World_AIW2.Instance.GetPlanetByIndex(windowController.PlanetIndex);
                    if (planet != null)
                    {
                        int x = 0;
                        for (CombatSideBooleanFlag flag = CombatSideBooleanFlag.None + 1; flag < CombatSideBooleanFlag.Length; flag++)
                        {
                            bCombatSideBooleanFlagToggle newButtonController = new bCombatSideBooleanFlagToggle(flag);
                            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();

                    windowController.PlanetChangedSinceLastButtonSetUpdate = false;
                }
            }
 public Window_InGamePlanetActionMenu()
 {
     Instance                    = this;
     this.OnlyShowInGame         = true;
     this.SupportsMasterMenuKeys = true;
 }