赞 | 120 |
VIP | 13 |
好人卡 | 16 |
积分 | 193 |
经验 | 38692 |
最后登录 | 2025-2-3 |
在线时间 | 3075 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 19304
- 在线时间
- 3075 小时
- 注册时间
- 2013-1-11
- 帖子
- 1288
|
- #==============================================================================
- # ■ 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)
复制代码 |
评分
-
查看全部评分
|