Merge branch 'capture-screenshots' into 'master'

Added ability to capture screenshots from within client

See merge request 2009scape/rt4-client!16
This commit is contained in:
Ceikry 2024-02-12 20:47:55 +00:00
commit 7298df8792
3 changed files with 105 additions and 0 deletions

View 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()
}
}
})
}
}