| 赞 | 120 |
| VIP | |
| 好人卡 | |
| 积分 | 194 |
| 经验 | |
| 最后登录 | 2026-7-4 |
| 在线时间 | 3082 小时 |
- 梦石
- 0
- 星屑
- 19426
- 在线时间
- 3082 小时
- 注册时间
- 2013-1-11
- 回帖
- 1207
|
发表于 2019-2-10 23:34:30
|
显示全部楼层
- #==============================================================================
- # ■ Graphics
- #------------------------------------------------------------------------------
- # 执行图像处理的模块。
- #==============================================================================
- class << Graphics
- FindWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
- GetSysMtr = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
- SetWindowPos = Win32API.new('user32', 'SetWindowPos', 'liiiiip', 'i')
- HWnd = FindWindowEx.call(0, 0, 'RGSS Player', 0)
- #--------------------------------------------------------------------------
- # ● 调整窗口大小
- #--------------------------------------------------------------------------
- def zoom(w, h)
- w += (GetSysMtr.call(5) + GetSysMtr.call(45)) * 2
- h += (GetSysMtr.call(5) + GetSysMtr.call(45)) * 2 + GetSysMtr.call(4)
- x = [0, GetSysMtr.call(0) - w].max / 2
- y = [0, GetSysMtr.call(1) - h].max / 2
- SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
- end
- end
- Graphics.zoom(800, 600)
复制代码 |
评分
-
查看全部评分
|