赞 | 0 |
VIP | 0 |
好人卡 | 1 |
积分 | 7 |
经验 | 15263 |
最后登录 | 2017-5-29 |
在线时间 | 194 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 665
- 在线时间
- 194 小时
- 注册时间
- 2012-6-1
- 帖子
- 720
|
- unless $_Start
- $_Start = Win32API.new("Lib/BackgroundRunning","Start",'V','L')
- $_Stop = Win32API.new("Lib/BackgroundRunning","Stop",'V','L')
- $_OnFocus = Win32API.new("Lib/BackgroundRunning","OnFocus",'V','L')
- $_Start.call
- module Input
- InputUpdate = method :update
- InputTrigger = method :trigger?
- InputPress = method :press?
- InputRepeat = method :repeat?
- InputDir4 = method :dir4
- InputDir8 = method :dir8
- def self.update
- InputUpdate.call if $_OnFocus.call != 0
- end
- def self.trigger?(num)
- return $_OnFocus.call != 0 ? InputTrigger.call(num) : false
- end
- def self.press?(num)
- return $_OnFocus.call != 0 ? InputPress.call(num) : false
- end
- def self.repeat?(num)
- return $_OnFocus.call != 0 ? InputRepeat.call(num) : false
- end
- def self.dir4
- return $_OnFocus.call != 0 ? InputDir4.call : 0
- end
- def self.dir8
- return $_OnFocus.call != 0 ? InputDir8.call : 0
- end
- end
- end
复制代码 |
|