mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-25 16:35:02 -05:00
Add settings to bypass hotkey requirement
Legality context menu requires holding control when opening the menu -- with this option enabled, don't need to do the hotkey.
This commit is contained in:
parent
c17774f57c
commit
9f60ff9eb7
|
|
@ -123,7 +123,7 @@ private void MenuOpening(object sender, CancelEventArgs e)
|
|||
bool canView = !info.IsEmpty() || Main.HaX;
|
||||
bool canSet = info.CanWriteTo();
|
||||
bool canDelete = canSet && canView;
|
||||
bool canLegality = ModifierKeys == Keys.Control && canView && RequestEditorLegality != null;
|
||||
bool canLegality = (ModifierKeys == Keys.Control || Main.Settings.Display.SlotLegalityAlwaysVisible) && canView && RequestEditorLegality != null;
|
||||
|
||||
ToggleItem(mnuView, canView);
|
||||
ToggleItem(mnuSet, canSet);
|
||||
|
|
|
|||
|
|
@ -1132,10 +1132,15 @@ private void ClickLegality(object sender, EventArgs e)
|
|||
|
||||
private static void DisplayLegalityReport(LegalityAnalysis la)
|
||||
{
|
||||
bool verbose = ModifierKeys == Keys.Control;
|
||||
bool verbose = ModifierKeys == Keys.Control ^ Settings.Display.ExportLegalityAlwaysVerbose;
|
||||
var report = la.Report(verbose);
|
||||
if (verbose)
|
||||
{
|
||||
if (Settings.Display.ExportLegalityNeverClipboard)
|
||||
{
|
||||
WinFormsUtil.Alert(report);
|
||||
return;
|
||||
}
|
||||
var dr = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, report, MsgClipboardLegalityExport);
|
||||
if (dr != DialogResult.Yes)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -385,6 +385,12 @@ public sealed class DisplaySettings
|
|||
[LocalizedDescription("Display all properties of the encounter (auto-generated) when exporting a verbose report.")]
|
||||
public bool ExportLegalityVerboseProperties { get; set; }
|
||||
|
||||
[LocalizedDescription("Always displays the verbose legality report, and inverts the hotkey behavior to instead disable.")]
|
||||
public bool ExportLegalityAlwaysVerbose { get; set; }
|
||||
|
||||
[LocalizedDescription("Always skips the prompt option asking if you would like to export a legality report to clipboard.")]
|
||||
public bool ExportLegalityNeverClipboard { get; set; }
|
||||
|
||||
[LocalizedDescription("Flag Illegal Slots in Save File")]
|
||||
public bool FlagIllegal { get; set; } = true;
|
||||
|
||||
|
|
@ -393,6 +399,9 @@ public sealed class DisplaySettings
|
|||
|
||||
[LocalizedDescription("Disables the GUI scaling based on Dpi on program startup, falling back to font scaling.")]
|
||||
public bool DisableScalingDpi { get; set; }
|
||||
|
||||
[LocalizedDescription("Skips the context menu hotkey requirement and instead always presents the option to check legality of a slot.")]
|
||||
public bool SlotLegalityAlwaysVisible { get; set; }
|
||||
}
|
||||
|
||||
public sealed class SpriteSettings : ISpriteSettings
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user