Skip to content

Commit

Permalink
Update help and shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-arya committed Jan 3, 2022
1 parent d9c5d2f commit c6d6aa9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
20 changes: 2 additions & 18 deletions client/visualizer/src/main/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ export default class Sidebar {
private initializeHelp(): HTMLDivElement {
var innerHTML: string =
`
<b class="red" style="font-size: 16px">Beware of too much logging!</b>
<br>
If your match has a significant amount of logging, please <b>turn off log processing with
the L key.</b><br>
<br>
<b class="red">Issues?</b>
<ol style="margin-left: -20px; margin-top: 0px;">
<li>Refresh (Ctrl-R or Command-R).</li>
Expand All @@ -148,12 +143,8 @@ export default class Sidebar {
G - Toggle Grid<br>
N - Toggle Action Radius<br>
M - Toggle Sensor Radius<br>
, - Toggle Detection Radius<br>
H - Toggle Shorter Log Headers<br>
B - Toggle Interpolation<br>
L - Toggle whether to process logs.<br>
Q - Toggle whether to profile matches.<br>
Z - Toggle whether to rotate tall maps.<br>
[ - Hide/unhide sidebar navigation.<br>
<br>
<b class="blue">Keyboard Shortcuts (Map Editor)</b><br
Expand All @@ -175,16 +166,9 @@ export default class Sidebar {
Use the control buttons at the top of the screen to
navigate the match. Click on different matches in the <code>Queue</code> section to switch between them.<br>
<br>
<b class="blue">How to Use the Console</b><br>
The console displays all <code>System.out.println()</code> data up to the current round.
You can filter teams by checking the boxes and robot IDs by clicking the
robot. You can also change the maximum number of rounds displayed in the
input box. Beware of doing too much logging! This slows down the client.
(WARNING: If you want to, say, suddenly display 3000 rounds
of data, pause the client first to prevent freezing.)<br>
<br>
<b class="blue">How to Use the Profiler</b><br>
<i class="red"> Be cautious of memory issues when profiling large games. To disable profiling
<i class="red"> The profiler is a competitor tool, and is not officially supported by Teh Devs. Be cautious of memory issues when profiling large games. To disable profiling
on a profiled match file, press "Q".</i><br>
The profiler can be used to find out which methods are using a lot of
bytecodes. To use it, tick the "Profiler enabled" checkbox in the
Expand Down Expand Up @@ -216,7 +200,7 @@ export default class Sidebar {
overlapping units. -->
When you are happy with your map, click "Export".
If you are directed to save your map, save it in the
<code>/battlecode-scaffold-2021/maps</code> directory of your scaffold.
<code>/battlecode-scaffold-2022/maps</code> directory of your scaffold.
(Note: the name of your <code>.map22</code> file must be the same as the name of your
map.) <br>
<br>
Expand Down
20 changes: 10 additions & 10 deletions client/visualizer/src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ export default class Runner {
case 71: // "g" - Toogle grid view
this.conf.showGrid = !this.conf.showGrid;
break;
case 72: // "h" - Toggle short log header
this.conf.shorterLogHeader = !this.conf.shorterLogHeader;
this.console.updateLogHeader();
break;
// case 72: // "h" - Toggle short log header
// this.conf.shorterLogHeader = !this.conf.shorterLogHeader;
// this.console.updateLogHeader();
// break;
case 65: // "a" - previous tournament Match
this.previousTournamentState();
this.processTournamentState();
Expand All @@ -505,18 +505,18 @@ export default class Runner {
this.stats.hideTourneyUpload();
this.showTourneyUpload = !this.showTourneyUpload;
break;
case 76: // 'l' - Toggle process logs
this.conf.processLogs = !this.conf.processLogs;
this.console.setNotLoggingDiv();
break;
// case 76: // 'l' - Toggle process logs
// this.conf.processLogs = !this.conf.processLogs;
// this.console.setNotLoggingDiv();
// break;
case 81: // 'q' - Toggle profiler
if (this.profiler) {
this.conf.doProfiling = !this.conf.doProfiling;
this.profiler.setNotProfilingDiv();
}
break;
case 90: // 'z' - Toggle rotate
this.conf.doRotate = !this.conf.doRotate;
// case 90: // 'z' - Toggle rotate
// this.conf.doRotate = !this.conf.doRotate;
}
}

Expand Down

0 comments on commit c6d6aa9

Please sign in to comment.