예제 #1
0
 private void DragEnd(UIMouseEvent evt)
 {
     if (evt.Target == this || additionalDragTargets.Contains(evt.Target))
     {
         dragging  = false;
         resizeing = false;
     }
     if (this == RecipeBrowserUI.instance.favoritePanel)
     {
         RecipeBrowserClientConfig config = ModContent.GetInstance <RecipeBrowserClientConfig>();
         config.FavoritedRecipePanelPosition = new Vector2(Left.Pixels, Top.Pixels);
         RecipeBrowserClientConfig.SaveConfig();
     }
 }
예제 #2
0
 private void DragEnd(UIMouseEvent evt)
 {
     if (evt.Target == this || additionalDragTargets.Contains(evt.Target))
     {
         dragging  = false;
         resizeing = false;
     }
     if (this == RecipeBrowserUI.instance.mainPanel)
     {
         RecipeBrowserClientConfig config     = ModContent.GetInstance <RecipeBrowserClientConfig>();
         CalculatedStyle           dimensions = GetOuterDimensions();       // Drag can go negative, need clamped by Min and Max values
         config.RecipeBrowserSize     = new Vector2(dimensions.Width, dimensions.Height);
         config.RecipeBrowserPosition = new Vector2(Left.Pixels, Top.Pixels);
         RecipeBrowserClientConfig.SaveConfig();
     }
 }