automatic positioning of dialogs

This commit is contained in:
Issac332 2026-05-20 22:58:20 +03:00
parent 18a5ae7851
commit 8d1b75f88c
1 changed files with 3 additions and 7 deletions

View File

@ -10,11 +10,7 @@ class Window_Message < Window_Selectable
# * Object Initialization # * Object Initialization
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def initialize def initialize
if Graphics.width == 1280 super(Graphics.width / 2 - 304, 336, 608, 128)
super(16, 336, 1248, 128)
else
super(16, 336, 608, 128)
end
self.contents = Bitmap.new(width - 32, height - 32) self.contents = Bitmap.new(width - 32, height - 32)
Language.register_text_sprite(self.class.name + "_contents", self.contents) Language.register_text_sprite(self.class.name + "_contents", self.contents)
self.visible = false self.visible = false
@ -320,9 +316,9 @@ class Window_Message < Window_Selectable
when 0 # up when 0 # up
self.y = 16 self.y = 16
when 1 # middle when 1 # middle
self.y = 160 self.y = Graphics.height / 2 - height / 2
when 2 # down when 2 # down
self.y = 336 self.y = Graphics.height - height - 16
end end
end end
if $game_system.message_frame == 0 if $game_system.message_frame == 0