Skip to content

Commit

Permalink
updates for 1.3.0i and fix alt-tab behaviour of ctrl-p panel
Browse files Browse the repository at this point in the history
  • Loading branch information
factubsio committed Apr 22, 2022
1 parent 429e421 commit f48cdf0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion BlueprintExplorer/BlueprintDB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public int CompareTo(GameVersion other)

public List<GameVersion> Available = new() { };

private readonly GameVersion LastKnown = new(1, 2, 0, 'A', 2);
private readonly GameVersion LastKnown = new(1, 3, 0, 'i', 0);

private readonly string filenameRoot = "blueprints_raw";
private readonly string extension = "binz";
Expand Down
13 changes: 13 additions & 0 deletions BlueprintExplorer/CtrlP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,21 @@ public CtrlP()
rootHost.HostedControls.Add("none", noResults);
rootHost.ShowControl("none");

this.ShowInTaskbar = false;

DoubleBuffered = true;
}

protected override CreateParams CreateParams
{
get
{
var defaultParams = base.CreateParams;
defaultParams.ExStyle |= 0x80;
return defaultParams;
}
}

private void Root_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Middle || e.Button == MouseButtons.Left)
Expand Down Expand Up @@ -235,6 +247,7 @@ protected override void OnDeactivate(EventArgs e)

protected override void OnActivated(EventArgs e)
{
Owner = Daddy;
UpdateSize();
if (savedVerticalScroll != -1)
{
Expand Down
3 changes: 3 additions & 0 deletions BlueprintExplorer/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions BlueprintExplorer/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,17 +575,27 @@ public void HandleGlobalKeys(object sender, KeyEventArgs e)
if (e.KeyCode == Keys.Escape)
{
input.FindForm().ActiveControl = null;
e.SuppressKeyPress = true;
e.Handled = true;
}
return;
}

if (ActiveViewer?.Searching == true)
{
if (e.KeyCode == Keys.Escape)
{
ActiveViewer.StopSearching(false);
e.SuppressKeyPress = true;
e.Handled = true;
}

if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return)
{
ActiveViewer.StopSearching(true);
e.SuppressKeyPress = true;
e.Handled = true;
}

return;
}
Expand Down

0 comments on commit f48cdf0

Please sign in to comment.