Project1
标题:
如何调整窗口
[打印本页]
作者:
zdqhzs
时间:
2013-11-7 16:18
标题:
如何调整窗口
默认的游戏窗口有点过于小型,求问在什么地方可以自定义调整启动游戏后的窗口大小
作者:
deeg
时间:
2013-11-7 16:36
http://rpg.blue/thread-216674-1-1.html
這裡有腳本,請自行參閱
作者:
tseyik
时间:
2013-11-7 17:43
本帖最后由 tseyik 于 2013-11-7 17:45 编辑
Basic Window Resizer v1.1
先把這脚放在main脚本前
然後把main脚本改成(以下是2倍)
Window_Resize.r(1088, 828)
rgss_main { SceneManager.run }
#Basic Window Resizer v1.1
#----------#
#Features: Allows you to resize the window to whatever size you like! (This is not
# like Graphics.resize, this will scale to fit)
#
#Usage: Script calls:
# Window_Resize.r(width, height) - Self-explanatory
# Window_Resize.f - fits the game window to monitor size
# Window_Resize.full - switches to full screen unless already fullscreened
# Window_Resize.window - same as full but opposite
#
#No Customization
#
#----------#
#-- Script by: V.M of D.T
#--- Free to use in any project with credit given
SWPO = Win32API.new 'user32', 'SetWindowPos', ['l','i','i','i','i','i','p'], 'i'
WINX = Win32API.new 'user32', 'FindWindowEx', ['l','l','p','p'], 'i'
SMET = Win32API.new 'user32', 'GetSystemMetrics', ['i'], 'i'
module Window_Resize
def self.r(width, height)
resw = SMET.call(0)
resh = SMET.call(1)
window_loc = WINX.call(0,0,"RGSS Player",0)
width += (SMET.call(5) + SMET.call(45)) * 2
height += (SMET.call(6) + SMET.call(45)) * 2 + SMET.call(4)
x = (resw - width) / 2; y = (resh - height) / 2
y = 0 if y < 0;x = 0 if x < 0
SWPO.call(window_loc,0,x,y,width,height,0)
end
def self.f
resw = SMET.call(0)
resh = SMET.call(1)
window_loc = WINX.call(0,0,"RGSS Player",0)
SWPO.call(window_loc,0,0,0,resw,resh,0)
end
def self.full
resw = SMET.call(0)
return unless resw > 640
toggle
end
def self.window
resw = SMET.call(0)
return unless resw < 640
toggle
end
def self.toggle
keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
keybd.call 0xA4, 0, 0, 0
keybd.call 13, 0, 0, 0
keybd.call 13, 0, 2, 0
keybd.call 0xA4, 0, 2, 0
end
end
#Basic Window Resizer v1.1
#----------#
#Features: Allows you to resize the window to whatever size you like! (This is not
# like Graphics.resize, this will scale to fit)
#
#Usage: Script calls:
# Window_Resize.r(width, height) - Self-explanatory
# Window_Resize.f - fits the game window to monitor size
# Window_Resize.full - switches to full screen unless already fullscreened
# Window_Resize.window - same as full but opposite
#
#No Customization
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1