Skip to content

Commit

Permalink
alternative to Shift for developer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Aug 13, 2021
1 parent b1a1a9c commit f81ff9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions devmode.linq
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Query Kind="Statements" />

// devmode.linq - Chains to "developer mode" for Flood.
// You probably want to open and run the "flood.linq" query directly instead.

#load ".\flood.linq"
8 changes: 7 additions & 1 deletion flood.linq
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@

const float defaultScreenFractionForCanvas = 5.0f / 9.0f;

var devmode = GotKey.Shift;
var devmode = GotKey.Shift || Files.QueryBaseName.Equals(
"devmode",
StringComparison.InvariantCultureIgnoreCase);

// Make dump headings bigger. (See Launcher.Display for further customization.)
Util.RawHtml("<style>h1.headingpresenter { font-size: 1rem }</style>").Dump();
Expand Down Expand Up @@ -2546,6 +2548,10 @@ internal delegate Task<HelpViewer> HelpViewerSupplier();
/// this program uses and expects to be present.
/// </summary>
internal static class Files {
internal static string QueryBaseName
=> Path.GetFileNameWithoutExtension(Util.CurrentQueryPath)
?? throw new NotSupportedException("Can't find query filename.");

internal static Uri GetDocUrl(string filename)
=> new(GetDocPath(filename));

Expand Down

0 comments on commit f81ff9e

Please sign in to comment.