Remove some bad spacing, allow silencing sound when typing to screen, and mute the output from the hack screen

This commit is contained in:
Firepup Sixfifty 2024-04-27 17:01:54 -05:00
parent 8c75e3a0b2
commit 7ef74c2d0c
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA
2 changed files with 12 additions and 12 deletions

View file

@ -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):

View file

@ -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()