text stay time option
This commit is contained in:
parent
c5dceaa7c3
commit
1e59144b51
@ -1203,8 +1203,9 @@ class gui(QtGui.QWidget):
|
||||
self.charshowname = ''
|
||||
self.charside = 'def'
|
||||
self.lastmsg = ''
|
||||
self.msgqueue = []
|
||||
self.inboxqueue = []
|
||||
self.text_wait_time = int(get_option("General", "text stay time", 200))
|
||||
self.msgqueue = []
|
||||
self.selectedmsg = -1
|
||||
self.evidence = []
|
||||
self.privateevidence = []
|
||||
@ -2669,7 +2670,7 @@ class gui(QtGui.QWidget):
|
||||
|
||||
if self.chatmessage_is_empty:
|
||||
self.text_state = 2
|
||||
self.inbox_timer.start(1000)
|
||||
self.inbox_timer.start(self.text_wait_time)
|
||||
return
|
||||
|
||||
self.inline_color_stack = []
|
||||
@ -2721,7 +2722,7 @@ class gui(QtGui.QWidget):
|
||||
if self.anim_state != 4:
|
||||
self.anim_state = 3
|
||||
self.char.play_idle(self.m_chatmessage[CHARNAME], self.m_chatmessage[ANIM], self.scaling[0])
|
||||
self.inbox_timer.start(1000)
|
||||
self.inbox_timer.start(self.text_wait_time)
|
||||
|
||||
else:
|
||||
f_character2 = f_message[self.tick_pos]
|
||||
|
33
options.py
33
options.py
@ -60,13 +60,6 @@ class Settings(QtGui.QDialog):
|
||||
separators.append(separator)
|
||||
|
||||
###### General tab ######
|
||||
self.savetolog = QtGui.QCheckBox()
|
||||
self.savetolog.setText("Save chat logs to a file*")
|
||||
self.savetolog.setChecked(False)
|
||||
self.savetolog_combine = QtGui.QCheckBox()
|
||||
self.savetolog_combine.setText("Combine OOC and IC chat logs in the same file*")
|
||||
self.savetolog_combine.setChecked(False)
|
||||
|
||||
defaultoocname_layout = QtGui.QHBoxLayout()
|
||||
defaultoocname_label = QtGui.QLabel("Default OOC name")
|
||||
self.defaultoocname = QtGui.QLineEdit()
|
||||
@ -79,6 +72,21 @@ class Settings(QtGui.QDialog):
|
||||
defaultshowname_layout.addWidget(defaultshowname_label)
|
||||
defaultshowname_layout.addWidget(self.defaultshowname)
|
||||
|
||||
self.savetolog = QtGui.QCheckBox()
|
||||
self.savetolog.setText("Save chat logs to a file*")
|
||||
self.savetolog.setChecked(False)
|
||||
self.savetolog_combine = QtGui.QCheckBox()
|
||||
self.savetolog_combine.setText("Combine OOC and IC chat logs in the same file*")
|
||||
self.savetolog_combine.setChecked(False)
|
||||
|
||||
textstaytime_layout = QtGui.QHBoxLayout()
|
||||
textstaytime_label = QtGui.QLabel("Text stay time (milliseconds)")
|
||||
self.textstaytime = QtGui.QSpinBox()
|
||||
self.textstaytime.setMinimum(0)
|
||||
self.textstaytime.setMaximum(10000)
|
||||
textstaytime_layout.addWidget(textstaytime_label)
|
||||
textstaytime_layout.addWidget(self.textstaytime)
|
||||
|
||||
allowdownload = QtGui.QLabel()
|
||||
allowdownload.setText("Automatically download or stream online from WebAO:")
|
||||
allowdownload_layout = QtGui.QHBoxLayout()
|
||||
@ -146,6 +154,7 @@ class Settings(QtGui.QDialog):
|
||||
general_layout.addWidget(separators[0])
|
||||
general_layout.addWidget(self.savetolog)
|
||||
general_layout.addWidget(self.savetolog_combine)
|
||||
general_layout.addLayout(textstaytime_layout)
|
||||
general_layout.addWidget(separators[1])
|
||||
general_layout.addWidget(allowdownload)
|
||||
general_layout.addLayout(allowdownload_layout)
|
||||
@ -236,6 +245,7 @@ class Settings(QtGui.QDialog):
|
||||
self.autoconnect.setCurrentIndex(ini.read_ini_int(self.inifile, "General", "auto connect", -1) + 1)
|
||||
self.autopick.setEditText(ini.read_ini(self.inifile, "General", "auto pick").decode('utf-8'))
|
||||
self.autojoinarea.setText(ini.read_ini(self.inifile, "General", "auto join area").decode('utf-8'))
|
||||
self.textstaytime.setValue(ini.read_ini_int(self.inifile, "General", "text stay time", 200))
|
||||
|
||||
self.check_updates.setChecked(ini.read_ini_bool(self.inifile, "General", "install updates", False)) # Automatic updates are opt-in!
|
||||
|
||||
@ -252,7 +262,10 @@ class Settings(QtGui.QDialog):
|
||||
self.allowdownload_music.setChecked(True)
|
||||
self.allowdownload_evidence.setChecked(True)
|
||||
self.currtheme.setCurrentIndex(self.themes.index("default"))
|
||||
self.check_updates.setChecked(True)
|
||||
self.check_updates.setChecked(False)
|
||||
self.textstaytime.setValue(200)
|
||||
self.autopick.setEditText("")
|
||||
self.autojoinarea.setText("")
|
||||
|
||||
self.device_list.setCurrentIndex(audio.getcurrdevice())
|
||||
self.musicslider.setValue(100)
|
||||
@ -281,6 +294,7 @@ class Settings(QtGui.QDialog):
|
||||
self.inifile.set("General", "combined logs", self.savetolog_combine.isChecked())
|
||||
self.inifile.set("General", "OOC name", self.defaultoocname.text().toUtf8())
|
||||
self.inifile.set("General", "showname", self.defaultshowname.text().toUtf8())
|
||||
self.inifile.set("General", "text stay time", self.textstaytime.value())
|
||||
self.inifile.set("General", "download characters", self.allowdownload_chars.isChecked())
|
||||
self.inifile.set("General", "download sounds", self.allowdownload_sounds.isChecked())
|
||||
self.inifile.set("General", "download music", self.allowdownload_music.isChecked())
|
||||
@ -301,7 +315,8 @@ class Settings(QtGui.QDialog):
|
||||
|
||||
with open(AO2XPpath+"callwords.ini", "w") as f:
|
||||
f.write(self.callwords_edit.toPlainText().toUtf8())
|
||||
|
||||
|
||||
self.gamewindow.gamewidget.text_wait_time = self.textstaytime.value()
|
||||
self.hide()
|
||||
|
||||
def onCancelClicked(self):
|
||||
|
Loading…
Reference in New Issue
Block a user