|
@ -589,13 +589,11 @@ function SelectThisWord(event) |
|
|
else |
|
|
else |
|
|
TableCell = CellAt(x, y + i); |
|
|
TableCell = CellAt(x, y + i); |
|
|
// Add its contents to the word we're building. |
|
|
// Add its contents to the word we're building. |
|
|
if (TableCell.innerHTML != null && TableCell.innerHTML.length > 0 && TableCell.innerHTML != " " && TableCell.innerHTML.toLowerCase() != " ") |
|
|
if (TableCell.innerHTML != null && TableCell.innerHTML.length > 0 && |
|
|
{ |
|
|
TableCell.innerHTML != " " && TableCell.innerHTML.toLowerCase() != " ") { |
|
|
TheirWord += TableCell.innerHTML.toUpperCase(); |
|
|
TheirWord += TableCell.innerHTML.toUpperCase(); |
|
|
TheirWordLength++; |
|
|
TheirWordLength++; |
|
|
} |
|
|
} else { |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
TheirWord += "•"; |
|
|
TheirWord += "•"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -607,7 +605,10 @@ function SelectThisWord(event) |
|
|
$letters = "\" ".get_string( 'letter', 'game').".\" : \" ". |
|
|
$letters = "\" ".get_string( 'letter', 'game').".\" : \" ". |
|
|
get_string( 'letters', 'game').".\""; |
|
|
get_string( 'letters', 'game').".\""; |
|
|
?> |
|
|
?> |
|
|
document.getElementById("wordinfo").innerHTML = ((CurrentWord <= LastHorizontalWord) ? <?php echo $msg ?>) + WordLength[CurrentWord] + (WordLength[CurrentWord] == 1 ? <?php echo $letters;?>); |
|
|
var s = ((CurrentWord <= LastHorizontalWord) ? <?php echo $msg ?>); |
|
|
|
|
|
s = s + WordLength[CurrentWord] + (WordLength[CurrentWord] == 1 ? <?php echo $letters;?>); |
|
|
|
|
|
document.getElementById("wordinfo").innerHTML = s; |
|
|
|
|
|
|
|
|
document.getElementById("wordclue").innerHTML = Clue[CurrentWord]; |
|
|
document.getElementById("wordclue").innerHTML = Clue[CurrentWord]; |
|
|
document.getElementById("worderror").style.display = "none"; |
|
|
document.getElementById("worderror").style.display = "none"; |
|
|
//document.getElementById("cheatbutton").style.display = (Word.length == 0) ? "none" : ""; |
|
|
//document.getElementById("cheatbutton").style.display = (Word.length == 0) ? "none" : ""; |
|
@ -652,13 +653,17 @@ function OKClick() |
|
|
} |
|
|
} |
|
|
if (TheirWord.length < WordLength[CurrentWord]) |
|
|
if (TheirWord.length < WordLength[CurrentWord]) |
|
|
{ |
|
|
{ |
|
|
document.getElementById("worderror").innerHTML = "<?php echo get_string( 'cross_error_wordlength1', 'game');?>" + WordLength[CurrentWord] + " <?php echo get_string( 'cross_error_wordlength2', 'game');?>"; |
|
|
var s = "<?php echo get_string( 'cross_error_wordlength1', 'game');?>"; |
|
|
|
|
|
s = s + WordLength[CurrentWord] + " <?php echo get_string( 'cross_error_wordlength2', 'game');?>"; |
|
|
|
|
|
document.getElementById("worderror").innerHTML = s; |
|
|
document.getElementById("worderror").style.display = "block"; |
|
|
document.getElementById("worderror").style.display = "block"; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (TheirWord.length > WordLength[CurrentWord]) |
|
|
if (TheirWord.length > WordLength[CurrentWord]) |
|
|
{ |
|
|
{ |
|
|
document.getElementById("worderror").innerHTML = "<?php echo get_string( 'cross_error_wordlength1', 'game');?>" + WordLength[CurrentWord] + " <?php echo get_string( 'cross_error_wordlength2', 'game');?>";; |
|
|
var s = "<?php echo get_string( 'cross_error_wordlength1', 'game');?>"; |
|
|
|
|
|
s = s + WordLength[CurrentWord] + " <?php echo get_string( 'cross_error_wordlength2', 'game');?>"; |
|
|
|
|
|
document.getElementById("worderror").innerHTML = s; |
|
|
document.getElementById("worderror").style.display = "block"; |
|
|
document.getElementById("worderror").style.display = "block"; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -988,11 +993,13 @@ function CheckHtmlClick() |
|
|
get_string( 'cross_checkbutton', 'game'); |
|
|
get_string( 'cross_checkbutton', 'game'); |
|
|
echo '</button>'; |
|
|
echo '</button>'; |
|
|
|
|
|
|
|
|
echo ' <button id="finishattemptbutton" type="button" onclick="CheckServerClick( 1);" style="display: none;">'. |
|
|
echo ' <button id="finishattemptbutton" '. |
|
|
|
|
|
' type="button" onclick="CheckServerClick( 1);" style="display: none;">'. |
|
|
get_string( 'cross_endofgamebutton', 'game'); |
|
|
get_string( 'cross_endofgamebutton', 'game'); |
|
|
echo '</button>'; |
|
|
echo '</button>'; |
|
|
if ($game->param5 == 1 or $game->param5 == NULL) { |
|
|
if ($game->param5 == 1 or $game->param5 == null) { |
|
|
echo ' <button id="printbutton" type="button" onclick="OnPrint( 0);" style="display: none;">'.get_string( 'print', 'game'); |
|
|
echo ' <button id="printbutton" type="button" '; |
|
|
|
|
|
' onclick="OnPrint( 0);" style="display: none;">'.get_string( 'print', 'game'); |
|
|
echo '</button>'; |
|
|
echo '</button>'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1004,7 +1011,8 @@ function CheckHtmlClick() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ($showhtmlsolutions) { |
|
|
if ($showhtmlsolutions) { |
|
|
echo '<button id="checkhtmlbutton" type="button" onclick="CheckHtmlClick();" visible=true>'.get_string( 'cross_checkbutton', 'game'); |
|
|
echo '<button id="checkhtmlbutton" type="button" '. |
|
|
|
|
|
' onclick="CheckHtmlClick();" visible=true>'.get_string( 'cross_checkbutton', 'game'); |
|
|
echo '</button>'; |
|
|
echo '</button>'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|