mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
ui itemlist scrolls with wheel
This commit is contained in:
@@ -44,8 +44,10 @@ abstract class UIItem(var parentUI: UICanvas) { // do not replace parentUI to UI
|
||||
abstract val width: Int
|
||||
abstract val height: Int
|
||||
|
||||
/** Position of mouse relative to this item */
|
||||
protected val relativeMouseX: Int
|
||||
get() = (Terrarum.mouseScreenX - (parentUI.posX) - this.posX)
|
||||
/** Position of mouse relative to this item */
|
||||
protected val relativeMouseY: Int
|
||||
get() = (Terrarum.mouseScreenY - (parentUI.posY) - this.posY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user