#==============================================================================
# ■ Meow Face Force Full Screen
#------------------------------------------------------------------------------
# Force the game to run in Full Screen (with no black border)
#==============================================================================
# How to Use:
# Plug & Play, Put this script below Material and above Main
#==============================================================================
MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')
MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')
MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')
MF_SWP = Win32API.new('user32', 'SetWindowPos', ['l','i','i','i','i','i','p'], 'i')
MF_FWE = Win32API.new('user32', 'FindWindowEx', ['l','l','p','p'], 'i')
MF_GSM = Win32API.new('user32', 'GetSystemMetrics', ['i'], 'i')
MF_AWR = Win32API.new('user32', 'AdjustWindowRectEx', ['p', 'i', 'i', 'i'], 'i')
MF_GWL = Win32API.new('user32', 'GetWindowLong', ['l', 'i'], 'l')
module MEOW_RESIZE
@@fullscreen = false
def self.set
width = MF_GSM.call(0)
height = MF_GSM.call(1)
exwin = MF_FWE.call(0,0,"RGSS Player",0)
@@original_style = MF_GWL.call(exwin, -16)
MF_SWP.call(exwin,0,0,0,width,height,0)
MF_SWL.call(exwin, -16, 0x14000000)
@@fullscreen = true
end
def self.unset
return unless @@original_style
exwin = MF_FWE.call(0,0,"RGSS Player",0)
style = @@original_style
rect = [0, 0, Graphics.width, Graphics.height].pack('I4')
MF_AWR.call(rect, style, 0, MF_GWL.call(exwin, -20))
rect = rect.unpack('I4')
width = rect[2]
height = rect[3]
x = MF_GSM.call(0) / 2 - width / 2
y = MF_GSM.call(1) / 2 - height / 2
MF_SWP.call(exwin,-1,x,y,width,height,0)
MF_SWL.call(exwin, -16, style)
@@fullscreen = false
end
def self.toggle
@@fullscreen ? unset : set
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# Esta classe executa o processamento da tela de menu.
#==============================================================================
class Scene_Menu < Scene_MenuBase
def toggle_fullscreen
MEOW_RESIZE.toggle
SceneManager.goto(Scene_Menu)
end
#--------------------------------------------------------------------------
# * Criação da janela de comando
#--------------------------------------------------------------------------
alias fullscreen_zoado_create_command_window create_command_window
def create_command_window
fullscreen_zoado_create_command_window
@command_window.set_handler(:fullscreen, method(:toggle_fullscreen))
end
end
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
# Esta janela exibe os comandos do menu.
#==============================================================================
class Window_MenuCommand < Window_Command
alias fullscreen_add_original_commands add_original_commands
#--------------------------------------------------------------------------
# * Adição de comandos próprios
#--------------------------------------------------------------------------
def add_original_commands
fullscreen_add_original_commands
add_command("Tela Cheia", :fullscreen)
end
end
Só colar acima do main. Esse script cria uma opção no menu chamada "Tela Cheia" (pra mudar o texto é só ir na linha 85, é importante manter entre aspas) que alterna entre full screen e windowed