From 48917137f33380925a275fb43a25501f97cf1e2a Mon Sep 17 00:00:00 2001 From: Issac332 <119879937+Issac8658@users.noreply.github.com> Date: Wed, 20 May 2026 23:51:22 +0300 Subject: [PATCH] Interfaces are adapted to different resolutions --- scripts/Window_Help.rb | 2 +- scripts/Window_Item.rb | 4 ++-- scripts/Window_MainMenu.rb | 2 +- scripts/Window_Message.rb | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/Window_Help.rb b/scripts/Window_Help.rb index f09c558..a5bffa2 100644 --- a/scripts/Window_Help.rb +++ b/scripts/Window_Help.rb @@ -9,7 +9,7 @@ class Window_Help < Window_Base # * Object Initialization #-------------------------------------------------------------------------- def initialize - super(16, 16, 608, 64) + super(Graphics.width / 2 - 304, 16, 608, 64) self.contents = Bitmap.new(width - 32, height - 32) Language.register_text_sprite(self.class.name + "_contents", self.contents) self.visible = false diff --git a/scripts/Window_Item.rb b/scripts/Window_Item.rb index 02682c7..59f8602 100644 --- a/scripts/Window_Item.rb +++ b/scripts/Window_Item.rb @@ -12,8 +12,8 @@ class Window_Item < Window_Selectable # * Object Initialization #-------------------------------------------------------------------------- def initialize - super(16, 96, 608, 224) - @column_max = 2 + super(Graphics.width / 2 - 304, 96, 608, 224) + @column_max = COLUMN_MAX refresh self.index = 0 self.back_opacity = 230 diff --git a/scripts/Window_MainMenu.rb b/scripts/Window_MainMenu.rb index 836d26b..95eb7ee 100644 --- a/scripts/Window_MainMenu.rb +++ b/scripts/Window_MainMenu.rb @@ -1,7 +1,7 @@ # The main menu window class Window_MainMenu < Window_Selectable def initialize - super(16, 16, 608, 64) + super(Graphics.width / 2 - 304, 16, 608, 64) # Set up menu options @commands = Array.new diff --git a/scripts/Window_Message.rb b/scripts/Window_Message.rb index 97390ca..8f5b825 100644 --- a/scripts/Window_Message.rb +++ b/scripts/Window_Message.rb @@ -10,6 +10,7 @@ class Window_Message < Window_Selectable # * Object Initialization #-------------------------------------------------------------------------- def initialize + # I would make the interface width a separate constant/setting super(Graphics.width / 2 - 304, 336, 608, 128) self.contents = Bitmap.new(width - 32, height - 32) Language.register_text_sprite(self.class.name + "_contents", self.contents)