Remove some bad spacing, allow silencing sound when typing to screen, and mute the output from the hack screen
This commit is contained in:
parent
8c75e3a0b2
commit
7ef74c2d0c
2 changed files with 12 additions and 12 deletions
|
@ -28,17 +28,17 @@ _soundQueue = []
|
|||
global _queueRunning
|
||||
_queueRunning = False
|
||||
|
||||
def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False):
|
||||
def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False, silent = False):
|
||||
"""
|
||||
wrapper for curses.addstr() which writes the text slowly
|
||||
"""
|
||||
if not fake_user:
|
||||
if not fake_user and not silent:
|
||||
addSound("beep")
|
||||
for i in range(len(text)):
|
||||
window.addstr(text[i])
|
||||
window.refresh()
|
||||
curses.napms(pause)
|
||||
if fake_user:
|
||||
if fake_user and not silent:
|
||||
_playSound("keyenter", True)
|
||||
|
||||
def upperInput(window, hidden = False, can_newline = True):
|
||||
|
|
|
@ -142,13 +142,13 @@ def initScreen(scr):
|
|||
|
||||
# print the hex and filler
|
||||
for i in range(fillerHeight):
|
||||
slowWrite(scr, "0x%X %s" % (hexCol1[i], fillerCol1[i * fillerWidth: (i + 1) * fillerWidth]), 1)
|
||||
slowWrite(scr, "0x%X %s" % (hexCol1[i], fillerCol1[i * fillerWidth: (i + 1) * fillerWidth]), 1, silent = True)
|
||||
if i < fillerHeight - 1:
|
||||
scr.addstr('\n')
|
||||
|
||||
for i in range(fillerHeight):
|
||||
scr.move(HEADER_LINES + i, int(CONST_CHARS / 2 + fillerWidth))
|
||||
slowWrite(scr, '0x%X %s' % (hexCol2[i], fillerCol2[i * fillerWidth: (i + 1) * fillerWidth]), 1)
|
||||
slowWrite(scr, '0x%X %s' % (hexCol2[i], fillerCol2[i * fillerWidth: (i + 1) * fillerWidth]), 1, silent = True)
|
||||
|
||||
scr.refresh()
|
||||
|
||||
|
|
Loading…
Reference in a new issue