Last active
May 19, 2016 07:58
-
-
Save amuhororo/ec32ebc7df23ea6fe485ebcf194def9f to your computer and use it in GitHub Desktop.
バックログのキャラ名重複表示問題
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showMessage: function(message_str) { | |
var that = this; | |
// ここから | |
//var chara_name = $.isNull($(".chara_name_area").html()); | |
//if (chara_name != "") this.kag.pushBackLog("<b>" + chara_name + "</b>\uff1a" + message_str); | |
//else this.kag.pushBackLog(message_str); | |
// ここまでいらない。 | |
that.kag.ftag.hideNextImg(); | |
(function(jtext) { | |
if (jtext.html() == "") jtext.append("<p class=''></p>"); | |
var _message_str = message_str; | |
var current_str = ""; | |
if (jtext.find("p").find(".current_span").length != 0) current_str = jtext.find("p").find(".current_span").html(); | |
var index = 0; | |
that.kag.checkMessage(jtext); | |
var j_span = that.kag.getMessageCurrentSpan(); | |
j_span.css({ | |
"color": that.kag.stat.font.color, | |
"font-weight": that.kag.stat.font.bold, | |
"font-size": that.kag.stat.font.size + "px", | |
"font-family": that.kag.stat.font.face, | |
"font-style": that.kag.stat.font.italic | |
}); | |
if (that.kag.config.autoRecordLabel == "true") | |
if (that.kag.stat.already_read == true) { | |
if (that.kag.config.alreadyReadTextColor != "default") j_span.css("color", $.convertColor(that.kag.config.alreadyReadTextColor)) | |
} else if (that.kag.config.unReadTextSkip == "false") that.kag.stat.is_skip = false; | |
var ch_speed = 30; | |
if (that.kag.stat.ch_speed != "") ch_speed = parseInt(that.kag.stat.ch_speed); | |
else if (that.kag.config.chSpeed) ch_speed = parseInt(that.kag.config.chSpeed); | |
var pchar = function(pchar) { | |
var c = _message_str.substring(index, ++index); | |
if (that.kag.stat.ruby_str != "") { | |
c = "<ruby><rb>" + c + "</rb><rt>" + that.kag.stat.ruby_str + "</rt></ruby>"; | |
that.kag.stat.ruby_str = "" | |
} | |
current_str += c; | |
// ここでバックログ | |
that.kag.pushBackLog(c); | |
if (that.kag.stat.is_skip != true && that.kag.stat.is_nowait != true) that.kag.appendMessage(jtext, current_str); | |
if (index <= _message_str.length) { | |
that.kag.stat.is_adding_text = true; | |
if (that.kag.stat.is_click_text == true || that.kag.stat.is_skip == true || that.kag.stat.is_nowait == true) setTimeout(function() { | |
pchar(pchar) | |
}, 0); | |
else setTimeout(function() { | |
pchar(pchar) | |
}, ch_speed) | |
} else { | |
that.kag.stat.is_adding_text = false; | |
that.kag.stat.is_click_text = false; | |
if (that.kag.stat.is_stop != "true") | |
if (that.kag.stat.is_skip == true || that.kag.stat.is_nowait == true) { | |
that.kag.appendMessage(jtext, current_str); | |
setTimeout(function() { | |
if (!that.kag.stat.is_hide_message) that.kag.ftag.nextOrder() | |
}, parseInt(that.kag.config.skipSpeed)) | |
} else { | |
if (!that.kag.stat.is_hide_message) that.kag.ftag.nextOrder() | |
} else; | |
if (that.kag.stat.flag_glyph == "false") { | |
$(".img_next").remove(); | |
jtext.find("p").append("<img class='img_next' src='./tyrano/images/kag/nextpage.gif' />") | |
} else $(".glyph_image").show(); | |
} | |
}; | |
pchar(pchar) | |
})(this.kag.getMessageInnerLayer()) | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment