Skip to content

Commit

Permalink
We now always show the keyboard refcard
Browse files Browse the repository at this point in the history
  • Loading branch information
richardbuckle committed Nov 17, 2018
1 parent 8ee5d08 commit 24ac849
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 0 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ <h3>Filtering</h3>
<br />
<input type="checkbox" checked name="showmisc" value="on" /> Miscellaneous
<br />
<input type="checkbox" checked name="keyboard" value="on" /> Keyboard
<br />
<p />
<h3>Color options</h3>
You can use colours to highlight modifier buttons or control types:
Expand Down
15 changes: 4 additions & 11 deletions www/scripts/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,6 @@ def parseForm(form):
displayGroups.append('Holo-Me')
if form.getvalue('showmisc'):
displayGroups.append('Misc')
if form.getvalue('keyboard'):
showKeyboard = True
else:
showKeyboard = False

styling = 'None' # Yes we do mean a string 'None'
if form.getvalue('styling') == 'group':
Expand All @@ -983,7 +979,7 @@ def parseForm(form):
description = form.getvalue('description')
if description is None:
description = ''
return (displayGroups, showKeyboard, styling, description)
return (displayGroups, styling, description)

def determineMode(form):
deviceForBlockImage = form.getvalue('blocks')
Expand All @@ -1005,10 +1001,9 @@ def determineMode(form):
mode = Mode.generate
return mode

def saveReplayInfo(config, description, styling, displayGroups, devices, showKeyboard, errors):
def saveReplayInfo(config, description, styling, displayGroups, devices, errors):
replayInfo = {}
replayInfo['displayGroups'] = displayGroups
replayInfo['showKeyboard'] = showKeyboard
replayInfo['misconfigurationWarnings'] = errors.misconfigurationWarnings
replayInfo['unhandledDevicesWarnings'] = errors.unhandledDevicesWarnings
replayInfo['deviceWarnings'] = errors.deviceWarnings
Expand Down Expand Up @@ -1074,7 +1069,6 @@ def main():
with replayPath.open("rb") as pickleFile:
replayInfo = pickle.load(pickleFile)
displayGroups = replayInfo.get('displayGroups', ['Galaxy map', 'General', 'Head look', 'SRV', 'Ship', 'UI'])
showKeyboard = replayInfo.get('showKeyboard', True)
errors.misconfigurationWarnings = replayInfo.get('misconfigurationWarnings', replayInfo.get('warnings', ''))
errors.deviceWarnings = replayInfo.get('deviceWarnings', '')
errors.unhandledDevicesWarnings = ''
Expand All @@ -1084,7 +1078,6 @@ def main():
# devices = replayInfo['devices']
except FileNotFoundError:
displayGroups = ['Galaxy map', 'General', 'Head look', 'SRV', 'Ship', 'UI']
showKeyboard = True
except (ValueError, FileNotFoundError):
errors.errors = '<h1>Configuration "%s" not found</h1>' % runId
displayGroups = ['Galaxy map', 'General', 'Head look', 'SRV', 'Ship', 'UI']
Expand All @@ -1094,7 +1087,7 @@ def main():
config.makeDir()
runId = config.name
displayGroups = []
(displayGroups, showKeyboard, styling, description) = parseForm(form)
(displayGroups, styling, description) = parseForm(form)
xml = form.getvalue('bindings')
if xml is None or xml is b'':
errors.errors = '<h1>No bindings file supplied; please go back and select your binds file as per the instructions.</h1>'
Expand Down Expand Up @@ -1156,7 +1149,7 @@ def main():

# Save variables for later replays
if (mode is Mode.generate and public):
saveReplayInfo(config, description, styling, displayGroups, devices, showKeyboard, errors)
saveReplayInfo(config, description, styling, displayGroups, devices, errors)

printHTML(mode, config, public, createdImages, deviceForBlockImage, errors)

Expand Down

0 comments on commit 24ac849

Please sign in to comment.