Fix localToScreen

This commit is contained in:
DBotThePony 2021-12-28 22:42:34 +07:00
parent 8384cb1306
commit f6057a73a6
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -346,8 +346,8 @@ open class EditablePanel @JvmOverloads constructor(
fun localToScreen(_x: Float = 0f, _y: Float = 0f): ScreenPos {
var parent = this.parent
var x = _x
var y = _y
var x = this.x + _x
var y = this.y + _y
while (parent != null) {
x += parent.x + parent.xOffset