Reintroduced holding Ctrl or Shift to apply only gear or customization for things.

This commit is contained in:
Ottermandias 2023-09-27 23:23:05 +02:00
parent 550c0c756e
commit 3b28c21c7d
4 changed files with 45 additions and 17 deletions

View file

@ -75,7 +75,7 @@ public class DesignPanel
private HeaderDrawer.Button SetFromClipboardButton()
=> new()
{
Description = "Try to apply a design from your clipboard over this design.",
Description = "Try to apply a design from your clipboard over this design.\nHold Control to only apply gear.\nHold Shift to only apply customizations.",
Icon = FontAwesomeIcon.Clipboard,
OnClick = SetFromClipboard,
Visible = _selector.Selected != null,
@ -395,7 +395,8 @@ public class DesignPanel
try
{
var text = ImGui.GetClipboardText();
var design = _converter.FromBase64(text, true, true, out _) ?? throw new Exception("The clipboard did not contain valid data.");
var (applyEquip, applyCustomize) = UiHelpers.ConvertKeysToBool();
var design = _converter.FromBase64(text, applyEquip, applyCustomize, out _) ?? throw new Exception("The clipboard did not contain valid data.");
_manager.ApplyDesign(_selector.Selected!, design);
}
catch (Exception ex)