1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-25 18:33:11 +00:00

added control instructions

This commit is contained in:
Steven Hugg 2019-05-17 00:42:52 -04:00
parent 3ebfd784a6
commit f9f580248f
3 changed files with 30 additions and 1 deletions

View File

@ -516,3 +516,19 @@ div.asset_toolbar {
padding:8px; padding:8px;
margin:8px; margin:8px;
} }
.control-insns {
margin-top:1em;
}
.control-key {
border: 2px solid rgba(0,0,0,0.2);
border-radius: 0.6em;
padding: 0.2em;
padding-left: 0.5em;
padding-right: 0.5em;
background-color: #eee;
margin-left: 1em;
color: #666;
}
.control-def {
color: #ccc;
}

View File

@ -225,6 +225,14 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
<button id="replay_max" class="btn" title="End of replay"><span class="glyphicon glyphicon-fast-forward" aria-hidden="true"></span></button> <button id="replay_max" class="btn" title="End of replay"><span class="glyphicon glyphicon-fast-forward" aria-hidden="true"></span></button>
</div> </div>
</div> </div>
<!-- control instructions -->
<div id="emucontrols-nes" class="text-center small control-insns" style="display:none">
<span class="control-def"><span class="control-key">&#x2190;&#x2191;&#x2193;&#x2192;</span> Joypad</span>
<span class="control-def"><span class="control-key">X</span> Button A</span>
<span class="control-def"><span class="control-key">Z</span> Button B</span>
<span class="control-def"><span class="control-key small">Space</span> Select</span>
<span class="control-def"><span class="control-key small">Enter</span> Start</span>
</div>
<div id="javatari-div" style="float:center;margin:10px;display:none"> <div id="javatari-div" style="float:center;margin:10px;display:none">
<div id="javatari-screen" style="margin: 0 auto; box-shadow: 2px 2px 10px rgb(60, 60, 60);"></div> <div id="javatari-screen" style="margin: 0 auto; box-shadow: 2px 2px 10px rgb(60, 60, 60);"></div>
<div id="javatari-console-panel" style="margin: 0 auto; box-shadow: 2px 2px 10px rgb(60, 60, 60);"></div> <div id="javatari-console-panel" style="margin: 0 auto; box-shadow: 2px 2px 10px rgb(60, 60, 60);"></div>

View File

@ -12,7 +12,7 @@ import { PLATFORMS, EmuHalt, Toolbar } from "./emu";
import * as Views from "./views"; import * as Views from "./views";
import { createNewPersistentStore } from "./store"; import { createNewPersistentStore } from "./store";
import { getFilenameForPath, getFilenamePrefix, highlightDifferences, invertMap, byteArrayToString, compressLZG, import { getFilenameForPath, getFilenamePrefix, highlightDifferences, invertMap, byteArrayToString, compressLZG,
byteArrayToUTF8, isProbablyBinary, getWithBinary, getBasePlatform, hex } from "./util"; byteArrayToUTF8, isProbablyBinary, getWithBinary, getBasePlatform, getRootBasePlatform, hex } from "./util";
import { StateRecorderImpl } from "./recorder"; import { StateRecorderImpl } from "./recorder";
import { GHSession, GithubService, getRepos, parseGithubURL } from "./services"; import { GHSession, GithubService, getRepos, parseGithubURL } from "./services";
@ -1643,6 +1643,10 @@ function addPageFocusHandlers() {
}); });
} }
function showInstructions() {
$("#emucontrols-" + getRootBasePlatform(platform_id)).show();
}
function startPlatform() { function startPlatform() {
if (!PLATFORMS[platform_id]) throw Error("Invalid platform '" + platform_id + "'."); if (!PLATFORMS[platform_id]) throw Error("Invalid platform '" + platform_id + "'.");
platform = new PLATFORMS[platform_id]($("#emulator")[0]); platform = new PLATFORMS[platform_id]($("#emulator")[0]);
@ -1669,6 +1673,7 @@ function startPlatform() {
setupDebugControls(); setupDebugControls();
updateSelector(); updateSelector();
addPageFocusHandlers(); addPageFocusHandlers();
showInstructions();
return true; return true;
} }