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(); } }
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(); } }