public ThreeStateButton(Planet.GoodState gstate, string good, Vector2 position)
 {
     this.Good = good;
     if (gstate == Planet.GoodState.IMPORT)
     {
         this.state = ThreeStateButton.State.In;
     }
     if (gstate == Planet.GoodState.EXPORT)
     {
         this.state = ThreeStateButton.State.Out;
     }
     if (gstate == Planet.GoodState.STORE)
     {
         this.state = ThreeStateButton.State.Store;
     }
     this.rect = new Rectangle((int)position.X, (int)position.Y, 32, 32);
     this.TextPos = new Vector2((float)(this.rect.X + 36), (float)(this.rect.Y + 16 - Fonts.Arial12Bold.LineSpacing / 2));
 }
 public void HandleInput(InputState input, ScreenManager screenManager)
 {
     if (HelperFunctions.CheckIntersection(this.rect, input.CursorPosition))
     {
         ToolTip.CreateTooltip(string.Concat(ResourceManager.GoodsDict[this.Good].Name, " storage. \n\n Click to change Import/Export settings"), screenManager);
         if (input.InGameSelect)
         {
             AudioManager.PlayCue("sd_ui_accept_alt3");
             ThreeStateButton threeStateButton = this;
             threeStateButton.state = (ThreeStateButton.State)((int)threeStateButton.state + (int)ThreeStateButton.State.Out);
             if (this.state > ThreeStateButton.State.Store)
             {
                 this.state = ThreeStateButton.State.In;
             }
         }
     }
 }