mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
Regain focus on click
This commit is contained in:
parent
af4dafee89
commit
1eb7483d35
1 changed files with 3 additions and 3 deletions
|
|
@ -41,13 +41,11 @@ import rt4.GlRenderer
|
|||
import rt4.InterfaceList
|
||||
import rt4.Player
|
||||
import rt4.SoftwareRaster
|
||||
import rt4.client.js5Archive8
|
||||
import rt4.client.mainLoadState
|
||||
import rt4.client.*
|
||||
import java.awt.*
|
||||
import java.awt.event.*
|
||||
import java.awt.image.VolatileImage
|
||||
import javax.swing.*
|
||||
import javax.swing.plaf.nimbus.AbstractRegionPainter
|
||||
|
||||
|
||||
@Target(AnnotationTarget.FIELD)
|
||||
|
|
@ -207,6 +205,7 @@ class plugin : Plugin() {
|
|||
})
|
||||
|
||||
isFocusable = true
|
||||
requestFocusInWindow()
|
||||
}
|
||||
|
||||
private fun validateGameImage() {
|
||||
|
|
@ -280,6 +279,7 @@ class plugin : Plugin() {
|
|||
}
|
||||
|
||||
private fun relayMouseEvent(e: MouseEvent) {
|
||||
this.requestFocusInWindow()
|
||||
val adjustedX = (e.x - offsetX) / scaleX
|
||||
val adjustedY = (e.y - offsetY) / scaleY
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue