Skip to content

Commit

Permalink
修復多行顯示,把方引號放進css裏
Browse files Browse the repository at this point in the history
  • Loading branch information
RimoChan committed Jun 29, 2019
1 parent effac2d commit 9f5c879
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
13 changes: 13 additions & 0 deletions html/樣式/主樣式.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,19 @@ video {
height: 100%;
}

#話語{
white-space: pre-line;
}
.對話:before{
content: '「';
display: block;
height: 100%;
float: left;
}
.對話>span:nth-last-child(1):after{
content: '」';
}

#選項 {
position: absolute;
height: 220px;
Expand Down
16 changes: 8 additions & 8 deletions html/演出.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ window.演出 =
if data.背景音樂[0]!='None'
data.背景音樂[0] = this.音樂文件夾 + '/' + data.背景音樂[0]

if data.名字!=''
data.話語 = "「#{data.話語}」"
$('#名字框').fadeIn(200)
else
data.話語 = '  ' + data.話語
$('#名字框').fadeOut(200)

改變演出狀態: (data) ->
this.信息預處理 data
console.log data
Expand All @@ -74,6 +67,7 @@ window.演出 =
if 額外信息[0] == 'load'
this.load特效()
eval(js)

this.放視頻(視頻)
this.換cg(cg)
this.換背景(背景)
Expand Down Expand Up @@ -222,10 +216,16 @@ window.演出 =
$('#名字').html(名字)
$('#對話歷史').append(名字+'<br/>')
$('#對話框').attr('class','人物--' + 語者)
# alert $('#對話框').attr('class')

淡入過期時間: 0,
換對話: (text, 名字) ->
if 名字 != ''
$('#名字框').fadeIn(200)
$('#話語').attr('class','對話')
else
$('#名字框').fadeOut(200)
$('#話語').attr('class','旁白')
text = '  ' + text
淡入字 = 演出.文字淡入(text)
$('#話語').html(淡入字.內容)
演出.淡入過期時間 = Date.now() + 淡入字.總時間 * 1000
Expand Down
20 changes: 11 additions & 9 deletions html/演出.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f5c879

Please sign in to comment.