Skip to content

Commit

Permalink
Improve event/change_face_image_in_text.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
neofuji committed Jan 26, 2018
1 parent 8183cec commit 504b643
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@
+ [数値入力キャンセル](/event/num_cancel.rb) v1.0
+ 名前に `?` を含む変数に対する数値入力の処理をキャンセルできるようにします。
+ キャンセルした場合、`-1 - 入力した数値`がその変数に格納されます。
+ [文章途中で顔グラフィック変更](/event/change_face_image_in_text.rb) v1.0
+ [文章途中で顔グラフィック変更](/event/change_face_image_in_text.rb) v1.1
+ [文章の表示]の途中、任意の時点で顔グラフィックを変更できるようにします。
5 changes: 3 additions & 2 deletions event/change_face_image_in_text.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#==============================================================================
# ■ 文章途中で顔グラフィック変更 RGSS3 v1.0 MIT License; see git.io/tic
# ■ 文章途中で顔グラフィック変更 RGSS3 v1.1 MIT License; see git.io/tic
#------------------------------------------------------------------------------
#  [文章の表示]の途中、任意の時点で顔グラフィックを変更できるようにします。
# 例えば文章中に \F[1] と入力するとその時点で表示されているファイルの 1 番目の
Expand All @@ -17,8 +17,9 @@ class Window_Message
def process_escape_character(code, text, pos)
case code.upcase
when 'F'
$game_message.face_index = obtain_escape_param(text) - 1
contents.clear_rect(0, 0, 96, 96)
draw_face($game_message.face_name, obtain_escape_param(text) - 1, 0, 0)
draw_face($game_message.face_name, $game_message.face_index, 0, 0)
else
tic_process_escape_character
end
Expand Down

0 comments on commit 504b643

Please sign in to comment.