Last active
March 13, 2023 15:42
-
-
Save BenMakesGames/8923661 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
=begin | |
Can be used to change where faces are displayed in message boxes: the left, or | |
the right! | |
To use, place a "Script" in your event BEFORE the "Message". The script should | |
contain either: | |
Window_Message.FaceOnLeft | |
or: | |
Window_Message.FaceOnRight | |
or: | |
Window_Message.FaceSwitch | |
FaceSwitch switches faces to whichever side they are not currently on. | |
these changes are permanent until changed AGAIN with another call to one of | |
these three functions. | |
Buy Me a Coffee? :D https://ko-fi.com/A0A12KQ16 | |
=end | |
class Window_Message | |
@@FACE_ON_RIGHT = false | |
def self.FaceOnLeft | |
@@FACE_ON_RIGHT = false | |
end | |
def self.FaceOnRight | |
@@FACE_ON_RIGHT = true | |
end | |
def self.FaceSwitch | |
@@FACE_ON_RIGHT = !@@FACE_ON_RIGHT | |
end | |
#-------------------------------------------------------------------------- | |
# * New Page | |
#-------------------------------------------------------------------------- | |
def new_page(text, pos) | |
contents.clear | |
draw_face($game_message.face_name, $game_message.face_index, @@FACE_ON_RIGHT ? window_width - standard_padding * 2 - 96 : 0, 0) | |
reset_font_settings | |
pos[:x] = new_line_x | |
pos[:y] = 0 | |
pos[:new_x] = new_line_x | |
pos[:height] = calc_line_height(text) | |
clear_flags | |
end | |
#-------------------------------------------------------------------------- | |
# * Get New Line Position | |
#-------------------------------------------------------------------------- | |
def new_line_x | |
$game_message.face_name.empty? || @@FACE_ON_RIGHT ? 0 : 112 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment