mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-09 16:45:46 -07:00
Added take screenshot plugin
This commit is contained in:
parent
75e6a68925
commit
dc8462dd55
1 changed files with 24 additions and 0 deletions
24
plugin-playground/src/main/kotlin/TakeScreenshot/plugin.kt
Normal file
24
plugin-playground/src/main/kotlin/TakeScreenshot/plugin.kt
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
package TakeScreenshot
|
||||||
|
|
||||||
|
import plugin.Plugin
|
||||||
|
import plugin.annotations.PluginMeta
|
||||||
|
import plugin.api.API
|
||||||
|
import java.awt.event.KeyAdapter
|
||||||
|
import java.awt.event.KeyEvent
|
||||||
|
|
||||||
|
@PluginMeta (
|
||||||
|
author = "ipkpjersi",
|
||||||
|
description = "Allows you to use CRTL + PRINTSCREEN to take a screenshot.",
|
||||||
|
version = 1.0
|
||||||
|
)
|
||||||
|
class plugin : Plugin() {
|
||||||
|
override fun Init() {
|
||||||
|
API.AddKeyboardListener(object : KeyAdapter() {
|
||||||
|
override fun keyPressed(e: KeyEvent) {
|
||||||
|
if (e.keyCode == KeyEvent.VK_PRINTSCREEN && e.isControlDown) {
|
||||||
|
API.Screenshot()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue