mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
added delete functionality, and incrased speed
This commit is contained in:
Binary file not shown.
+3
-3
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
START=0
|
||||
END=25
|
||||
START=80
|
||||
END=100
|
||||
for ((I=START;I<END;I++));
|
||||
do
|
||||
python3 main.py "$(($I * 2))" "$(( ($I + 1) * 2 ))" &
|
||||
python3 main.py "$(($I * 1))" "$(( ($I + 1) * 1 ))" &
|
||||
done
|
||||
|
||||
Binary file not shown.
+29
-3
@@ -161,10 +161,17 @@ var Typer={
|
||||
},
|
||||
|
||||
appendToText:function(str){
|
||||
str = str.replace(".", "." + "<!-- laglag-->")
|
||||
str = str.replace(".", "." + "<!-- laglaglag-->")
|
||||
typing = true
|
||||
Typer.text = Typer.text + str;
|
||||
},
|
||||
|
||||
removeChar:function(){
|
||||
var cont=Typer.content()
|
||||
$("#console").html($("#console").html().substring(0,cont.length-1))
|
||||
Typer.text = Typer.text.substring(0, Typer.text.length-1)
|
||||
Typer.index = Typer.index - 1
|
||||
},
|
||||
|
||||
addText:function(){
|
||||
|
||||
@@ -199,7 +206,7 @@ function writeAppend(str){
|
||||
|
||||
|
||||
function startTyping(){
|
||||
addTextTimer = setInterval("typeWords()", 25)
|
||||
addTextTimer = setInterval("typeWords()", 20)
|
||||
}
|
||||
|
||||
|
||||
@@ -207,11 +214,31 @@ function typeWords() {
|
||||
Typer.addText()
|
||||
}
|
||||
|
||||
document.addEventListener("keydown", KeyCheck);
|
||||
|
||||
function KeyCheck(evt) {
|
||||
evt = evt || window.event
|
||||
var charCode = evt.keyCode || evt.which
|
||||
if(charCode == 8){
|
||||
console.log("delete pressed")
|
||||
if(inputStr.length > 0){
|
||||
console.log(inputStr)
|
||||
inputStr = inputStr.substring(0, inputStr.length-1)
|
||||
console.log(inputStr)
|
||||
Typer.removeChar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.onkeypress = function(evt) {
|
||||
|
||||
if(acceptInput && !isMobileDevice()){
|
||||
evt = evt || window.event
|
||||
var charCode = evt.keyCode || evt.which
|
||||
|
||||
console.log(typeof charCode)
|
||||
console.log("Char code is " + charCode)
|
||||
|
||||
if(charCode == 13){
|
||||
acceptInput = false
|
||||
@@ -219,7 +246,6 @@ document.onkeypress = function(evt) {
|
||||
StoryTracker.processInput(inputStr)
|
||||
}
|
||||
else{
|
||||
|
||||
var charStr = String.fromCharCode(charCode)
|
||||
Typer.appendToText(charStr)
|
||||
inputStr = inputStr + charStr
|
||||
|
||||
Reference in New Issue
Block a user