Skip to content

Commit

Permalink
Add hotkey hint
Browse files Browse the repository at this point in the history
  • Loading branch information
zbx1425 committed Apr 15, 2021
1 parent 71cdde3 commit d07c4d0
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 22 deletions.
1 change: 1 addition & 0 deletions BlocklyAtsGui/BlocklyAtsGui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ COPY /Y "$(SolutionDir)BatsWinApi\Release\batswinapi_x64.dll" "$(TargetDir)\lib"
ERASE "$(TargetDir)\WebView2Loader.dll"
RMDIR /S /Q "${TargetDir)\BlocklyATS.exe.WebView2"
DEL "$(TargetDir)\*.xml"
DEL "$(TargetDir)\*.zip"
"C:\Program Files\7-zip\7z.exe" a BlocklyAts.zip .
)</PostBuildEvent>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions BlocklyAtsGui/UserInterface/FormMain.Designer.cs

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

30 changes: 15 additions & 15 deletions BlocklyAtsGui/UserInterface/FormMain.resx
Original file line number Diff line number Diff line change
Expand Up @@ -238,21 +238,21 @@
<data name="tsbtnCompileSetting.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAMpSURBVEhLvZRdSFNhGMe904sYIoLIUBmzGUsF+9yGU1Fz
S1hQNwWVJBO6UJrdlAQSrSgoIaQiIxL6uIiki7qxiBHrc2tzzjGZn6nzzG266Vxukzb37zlnx7tY06gf
jHP2nuf/f573eT+y/gu1tbU7NJojT1paWnw6nS7W1qZb1WiOWZVKxXE+ZHuo1WppR8eF5NDQFEZGZmEy
jePt26/o7r6cqK+vf8CHZQ5VmkOmley7Wn34RW/vQzJ2w2h0wmKZxNjYAm7c6EVdXc0FTpAp7PTP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/GHfu3A0WFxd382GRQ5XGkGkm+65UXnjX2fmcjB3Q6WwwGmcwObmMhw87UVRU0MwJIoWdflNTS7C8
vPwt+58SvWhvfwaz+TsMhknY7UuwWudRXV2zVlYmjedEkVBZWbcyNjaPJ096oFAoetgxhaKoR6N5FLLb
GUxPM3C5fNBo2kIy2bnrnCgSGhrUfpNpDjYbg7a2p5DL5S/FYmFuTU3dztSUE07nKnw+P16//gCZTHaf
lx3O1as3NoeGJjA4aIPJNEv9fIzLl+v879/3gmG8+PHDh+3tXXR0dOPMGcktXnY4paWlo58+6TAyMk2/
Sap8ievr0tIqVlbWydSP9fVtaLXDoMV1JicnJ/HSg8nMPF1RW3tzz2oNG87OstPfr9QPr3cTc3PL+PUr
SIktKCk57xIIBKd4+cFkZGQ8b229R62YJlMfVejH1lYAq6s/KRFDlfsQCATAotdb2EVmEhMThbz8YEQi
0e2LF1VetfrBXlfXG27vfvyo5RIEAkHOdB+DwYz8/Hx3fHy8gJcfTGpqaqxQKLyWkpKiSUpKbJFK5S62
t3/CaByHVCpdTkhIEPPyyCFRUnZ2rlOr/cbbhQkG97inwWAh83x3TEzMSV4SObGxsSJaAzIPV86asj33
eNYRCgEWywSysrLcFHr0yuPi4lLS0896Pn/WY3NzFwsLbu7gsAlYzGYbJJIsJjo6WsRLIoemS+YSpq/v
CxluweFYweKih3ptx85OgC6uCeTlyRx8+JERE26t1kBbcQfz8y709urhoMPk8XhBF9gGH3csTrLmAwNf
ucoZZg0zMwzdI+Vb9K0sHHJ8xLTvl3U6Ix0gN1vpNo39tek+grS0NEdOTsEavZeEh/4pUVG/AeEAILp0
m/cKAAAAAElFTkSuQmCC
</value>
</data>
<data name="tsbtnAbout.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
2 changes: 1 addition & 1 deletion BlocklyAtsGui/WebView/ExternalBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private string InteropReceived(string endpoint, string requestBody) {
do { browserID = random.Next(100000, 1000000); } while (heartbeat.ContainsKey(browserID));
return string.Format(
"<xml><version>{0}</version><id>{1}</id></xml>",
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(),
PlatformFunction.VersionString,
browserID
);
} else if (endpoint == "heartbeat") {
Expand Down
1 change: 0 additions & 1 deletion assets/lib/boilerplate.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using OpenBveApi.Runtime;

Expand Down
14 changes: 13 additions & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
if (language == null) language = "en";
var script = document.createElement('script'); script.src = "js/msg/" + language + ".js"; document.head.appendChild(script);
script = document.createElement('script'); script.src = "js/msg_bats/" + language + ".js"; document.head.appendChild(script);
if (!isIE) {
script = document.createElement('script'); script.src = "js/workspace_search.js"; document.head.appendChild(script);
}
</script>

<style>
Expand Down Expand Up @@ -105,8 +108,17 @@
<div class="blocklyToolboxCategory"><div class="blocklyTreeRow bats-key-hint">F</div></div>
<div class="blocklyToolboxCategory"><div class="blocklyTreeRow bats-key-hint">Z</div></div>
<div class="blocklyTreeSeparator"></div>
<div class="blocklyToolboxCategory"><div class="blocklyTreeRow bats-key-hint">X</div></div>
<div class="blocklyToolboxCategory"><div class="blocklyTreeRow bats-key-hint">C</div></div>
<div class="blocklyToolboxCategory"><div class="blocklyTreeRow bats-key-hint">V</div></div>
<div class="blocklyTreeSeparator"></div>
<div style="padding: 0 10px">
<table cellspacing="4px">
<script>
if (!isIE) document.write('<tr><td style="text-align: center;">🔍</td><td>Ctrl+F</td></tr>');
if (getQueryVariable("ver") != null) document.write('<tr><td style="text-align: center;">▷</td><td>F5</td></tr>');
</script>
</table>
</div>
</div>
</div>
</div>
Expand Down
14 changes: 12 additions & 2 deletions www/js/bats_code.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ var themeWithHat = Blockly.Theme.defineTheme('themeWithHat', {
"colourSecondary":"#90a4ae",
"colourTertiary":"#aed581",
"hat": "cap"
}
},
"comment_block": {
"colourPrimary": "#cccccc",
"colourSecondary":"#cccccc",
"colourTertiary":"#cccccc"
}
}
});

Expand All @@ -26,7 +31,7 @@ function getQueryVariable(variable) {

var hIntervalInit;

var shortcutKeyMap = ["Q", "W", "E", "R", "", "A", "S", "D", "F", "Z", "", "X", "C"];
var shortcutKeyMap = ["Q", "W", "E", "R", "", "A", "S", "D", "F", "Z", "", "C", "V"];

function batsInit(toolboxNode) {
Blockly.prompt = function(msg, defaultValue, callback) {
Expand Down Expand Up @@ -77,6 +82,11 @@ function batsInit(toolboxNode) {
document.addEventListener('keyup', onkeyup, false);
batsWkspReset();

if (typeof WorkspaceSearch != 'undefined' && WorkspaceSearch != null) {
var workspaceSearch = new WorkspaceSearch(workspace);
workspaceSearch.init();
}

if (getQueryVariable("ver") == null) hIntervalInit = setInterval(batsRemoteInit, 500);
if (typeof onBlocklyLoad != 'undefined' && onBlocklyLoad != null) {
onBlocklyLoad();
Expand Down
2 changes: 1 addition & 1 deletion www/js/blocks_bve.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ Blockly.defineBlocksWithJsonArray([
},
{
type: "bve_comment",
style: "bve_blocks",
style: "comment_block",
message0: "%1",
args0: [
{
Expand Down
3 changes: 2 additions & 1 deletion www/js/uai.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,5 @@ UAIdentifier.prototype.toString = function() {
return r;
};

var uaString = new UAIdentifier().toString();
var uaString = new UAIdentifier().toString();
var isIE = new UAIdentifier().ie;
18 changes: 18 additions & 0 deletions www/js/workspace_search.js

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

0 comments on commit d07c4d0

Please sign in to comment.