Scroll down on submit
This commit is contained in:
parent
3bf467e63c
commit
13ce16b859
|
@ -846,9 +846,11 @@ def actionsubmit(data, actionmode=0):
|
||||||
# Clear the startup text from game screen
|
# Clear the startup text from game screen
|
||||||
emit('from_server', {'cmd': 'updatescreen', 'gamestarted': vars.gamestarted, 'data': 'Please wait, generating story...'}, broadcast=True)
|
emit('from_server', {'cmd': 'updatescreen', 'gamestarted': vars.gamestarted, 'data': 'Please wait, generating story...'}, broadcast=True)
|
||||||
calcsubmit(data) # Run the first action through the generator
|
calcsubmit(data) # Run the first action through the generator
|
||||||
|
emit('from_server', {'cmd': 'scrolldown', 'data': ''}, broadcast=True)
|
||||||
else:
|
else:
|
||||||
refresh_story()
|
refresh_story()
|
||||||
set_aibusy(0)
|
set_aibusy(0)
|
||||||
|
emit('from_server', {'cmd': 'scrolldown', 'data': ''}, broadcast=True)
|
||||||
else:
|
else:
|
||||||
# Dont append submission if it's a blank/continue action
|
# Dont append submission if it's a blank/continue action
|
||||||
if(data != ""):
|
if(data != ""):
|
||||||
|
@ -861,9 +863,11 @@ def actionsubmit(data, actionmode=0):
|
||||||
if(not vars.noai):
|
if(not vars.noai):
|
||||||
# Off to the tokenizer!
|
# Off to the tokenizer!
|
||||||
calcsubmit(data)
|
calcsubmit(data)
|
||||||
|
emit('from_server', {'cmd': 'scrolldown', 'data': ''}, broadcast=True)
|
||||||
else:
|
else:
|
||||||
refresh_story()
|
refresh_story()
|
||||||
set_aibusy(0)
|
set_aibusy(0)
|
||||||
|
emit('from_server', {'cmd': 'scrolldown', 'data': ''}, broadcast=True)
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
#
|
#
|
||||||
|
|
|
@ -850,6 +850,10 @@ $(document).ready(function(){
|
||||||
}, 5);
|
}, 5);
|
||||||
}
|
}
|
||||||
newly_loaded = false;
|
newly_loaded = false;
|
||||||
|
} else if(msg.cmd == "scrolldown") {
|
||||||
|
setTimeout(function () {
|
||||||
|
$('#gamescreen').animate({scrollTop: $('#gamescreen').prop('scrollHeight')}, 1000);
|
||||||
|
}, 5);
|
||||||
} else if(msg.cmd == "setgamestate") {
|
} else if(msg.cmd == "setgamestate") {
|
||||||
// Enable or Disable buttons
|
// Enable or Disable buttons
|
||||||
if(msg.data == "ready") {
|
if(msg.data == "ready") {
|
||||||
|
|
Loading…
Reference in New Issue