Project1

标题: VA的全屏脚本~~~这地方标题也要长么? [打印本页]

作者: jsjhc    时间: 2013-2-17 23:33
标题: VA的全屏脚本~~~这地方标题也要长么?
http://rpg.blue/forum.php?mod=viewthread&tid=276859
在论坛上看到了这个脚本的说,可惜这个脚本是XP的,在论坛搜类似VA的脚本没发现~不知哪位大大给个类似的全屏脚本,或者改一下这个脚本,
本人小白看不懂不会改脚本。。。谢谢了~~~
作者: tseyik    时间: 2013-2-18 00:03

  1.   #Basic Window Resizer v1.1
  2.     #----------#
  3.     #Features: Allows you to resize the window to whatever size you like! (This is not
  4.     #            like Graphics.resize, this will scale to fit)
  5.     #
  6.     #Usage:   Script calls:
  7.     #           Window_Resize.r(width, height)     - Self-explanatory
  8.     #           Window_Resize.f                    - fits the game window to monitor size
  9.     #           Window_Resize.full                 - switches to full screen unless already fullscreened
  10.     #           Window_Resize.window               - same as full but opposite
  11.     #
  12.     #No Customization
  13.     #
  14.     #----------#
  15.     #-- Script by: V.M of D.T
  16.     #--- Free to use in any project with credit given
  17.      
  18.     SWPO = Win32API.new 'user32', 'SetWindowPos', ['l','i','i','i','i','i','p'], 'i'
  19.     WINX = Win32API.new 'user32', 'FindWindowEx', ['l','l','p','p'], 'i'
  20.     SMET = Win32API.new 'user32', 'GetSystemMetrics', ['i'], 'i'
  21.      
  22.     module Window_Resize
  23.       def self.r(width, height)
  24.         resw = SMET.call(0)
  25.         resh = SMET.call(1)
  26.         window_loc = WINX.call(0,0,"RGSS Player",0)
  27.         width += (SMET.call(5) + SMET.call(45)) * 2
  28.         height += (SMET.call(6) + SMET.call(45)) * 2 + SMET.call(4)
  29.         x = (resw - width) / 2; y = (resh - height) / 2
  30.         y = 0 if y < 0;x = 0 if x < 0
  31.         SWPO.call(window_loc,0,x,y,width,height,0)
  32.       end
  33.       def self.f
  34.         resw = SMET.call(0)
  35.         resh = SMET.call(1)
  36.         window_loc = WINX.call(0,0,"RGSS Player",0)
  37.         SWPO.call(window_loc,0,0,0,resw,resh,0)
  38.       end
  39.       def self.full
  40.         resw = SMET.call(0)
  41.         return unless resw > 640
  42.         toggle
  43.       end
  44.       def self.window
  45.         resw = SMET.call(0)
  46.         return unless resw < 640
  47.         toggle
  48.       end
  49.       def self.toggle
  50.         keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
  51.         keybd.call 0xA4, 0, 0, 0
  52.         keybd.call 13, 0, 0, 0
  53.         keybd.call 13, 0, 2, 0
  54.         keybd.call 0xA4, 0, 2, 0
  55.       end
  56.     end
  57. #Basic Window Resizer v1.1
  58. #----------#
  59. #Features: Allows you to resize the window to whatever size you like! (This is not
  60. #            like Graphics.resize, this will scale to fit)
  61. #
  62. #Usage:   Script calls:
  63. #           Window_Resize.r(width, height)     - Self-explanatory
  64. #           Window_Resize.f                    - fits the game window to monitor size
  65. #           Window_Resize.full                 - switches to full screen unless already fullscreened
  66. #           Window_Resize.window               - same as full but opposite
  67. #
  68. #No Customization
复制代码

作者: jsjhc    时间: 2013-2-18 00:06
tseyik 发表于 2013-2-18 00:03

啊哦~厉害哈~我去试试~谢谢。
作者: tseyik    时间: 2013-2-18 00:19
本帖最后由 tseyik 于 2013-2-18 00:24 编辑

在事件中使用劇本使用這些指令

#           Window_Resize.r(width, height)     - Self-explanatory
例Window_Resize.r(640, 480)-画面改成640x480
#           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
作者: tim浅蓝    时间: 2013-2-18 13:36
va好像可以直接全频吧,在游戏运行中按F1。




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1