Project1

标题: 求VA窗口大小脚本,我要的是那种 [打印本页]

作者: yangjunyin2002    时间: 2012-11-10 14:06
标题: 求VA窗口大小脚本,我要的是那种
本帖最后由 Mic_洛洛 于 2012-11-10 14:42 编辑

就是《默砂之歌》前篇章游戏里的那种,我在主站找的VA超级脚本整合里面的变大后,这个窗口就有点往右下角了,我想要那种变更后窗口居中在屏幕的,并且不要那种窗口大了,但是里面的内容没放大的脚本。。。
作者: yangjunyin2002    时间: 2012-11-10 14:07
补充:这是VX的变更窗口的脚本,用这种的话是可以让窗口变大并居中而且内容也会缩放的,不过我还是想要VA的啊。
  1. #~ #-----------------------------------------------------------------------------
  2. #~ # ● 只是用来窗口大小变更的
  3. #~ #  ○ 来源秀秀Win32API教程之一(基础篇)
  4. #~ #-----------------------------------------------------------------------------
  5. #~ class Win32API
  6. #~  GAME_INI_FILE = ".\\Game.ini"
  7. #~  def Win32API.GetPrivateProfileString(section, key)
  8. #~    # 初始化
  9. #~    val = "\0"*256
  10. #~    gps = Win32API.new('kernel32', 'GetPrivateProfileString',%w(p p p p l p), 'l')
  11. #~    gps.call(section, key, "", val, 256, GAME_INI_FILE)
  12. #~    val.delete!("\0")
  13. #~    return val
  14. #~  end
  15. #~  def Win32API.FindWindow(class_name, title)
  16. #~    fw = Win32API.new('user32', 'FindWindow', %(p, p), 'i')
  17. #~    hWnd = fw.call(class_name, title)
  18. #~    return hWnd
  19. #~  end
  20. #~  HWND_TOP     = 0
  21. #~  HWND_TOPMOST = -1
  22. #~  SWP_NOMOVE   = 2
  23. #~  def Win32API.SetWindowPos(hWnd, w, h)
  24. #~    swp = Win32API.new('user32', 'SetWindowPos', %(l, l, i, i, i, i, i), 'i')
  25. #~    ok = swp.call(hWnd, HWND_TOP, 200, 200, w, h, SWP_NOMOVE)
  26. #~    return ok
  27. #~  end
  28. #~ end

  29. #~ title =  Win32API.GetPrivateProfileString("Game", "Title")
  30. #~ hWnd = Win32API.FindWindow("RGSS Player", title)

  31. #~ ok = Win32API.SetWindowPos(hWnd,800,640)
  32. #~ if(ok == 0)
  33. #~  p "変更失敗"
  34. #~ end
复制代码





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