mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-13 12:10:30 +08:00
button fix
This commit is contained in:
+24
-9
@@ -23,6 +23,16 @@ function isMobileDevice() {
|
||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
||||
};
|
||||
|
||||
|
||||
function buttonCheck(){
|
||||
if(typing == true){
|
||||
setTimeout(buttonCheck, 500);
|
||||
}
|
||||
else{
|
||||
document.getElementById('buttons').style.visibility='visible';
|
||||
}
|
||||
}
|
||||
|
||||
var StoryTracker = {
|
||||
firstStory: null,
|
||||
lastStory: null,
|
||||
@@ -84,6 +94,10 @@ var StoryTracker = {
|
||||
Typer.appendToText("\nWhich action do you choose? ")
|
||||
StoryTracker.action_int = 0
|
||||
acceptInput = true
|
||||
|
||||
if(isMobileDevice()){
|
||||
setTimeout(buttonCheck, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +144,11 @@ var StoryTracker = {
|
||||
Typer.appendToText("\nWhich action do you choose? ")
|
||||
acceptInput = true
|
||||
|
||||
|
||||
if(isMobileDevice()){
|
||||
setTimeout(buttonCheck, 500);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -243,6 +262,8 @@ document.onkeypress = function(evt) {
|
||||
|
||||
function onButtonClick(num){
|
||||
|
||||
document.getElementById('buttons').style.visibility='hidden';
|
||||
|
||||
if (acceptInput == true){
|
||||
acceptInput = false
|
||||
num = String(num)
|
||||
@@ -263,15 +284,9 @@ function start(){
|
||||
|
||||
startTyping()
|
||||
Typer.startBlinker()
|
||||
|
||||
if(isMobileDevice()){
|
||||
console.log("Mobile device");
|
||||
}
|
||||
else{
|
||||
console.log("Not mobile device");
|
||||
document.getElementById('buttons').style.visibility='hidden';
|
||||
}
|
||||
|
||||
|
||||
console.log("Not mobile device");
|
||||
document.getElementById('buttons').style.visibility='hidden';
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ a {
|
||||
}
|
||||
|
||||
#buttons {
|
||||
position: absolute;
|
||||
position: relative;
|
||||
bottom: 80px;
|
||||
height: 60px;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user