inventory ui

icon in list


Former-commit-id: 7182dcda408d9710d77e25e357f3a67bdd42fff9
This commit is contained in:
Song Minjae
2017-03-22 23:58:18 +09:00
parent 23f6f9cf5a
commit d390217ba9
18 changed files with 274 additions and 101 deletions

View File

@@ -23,9 +23,9 @@ abstract class UIItem(var parentUI: UICanvas) { // do not replace parentUI to UI
protected val relativeMouseY: Int
get() = (Terrarum.appgc.mouseY - (parentUI.handler?.posY ?: 0) - this.posY).roundInt()
val mouseUp: Boolean
open val mouseUp: Boolean
get() = relativeMouseX in 0..width - 1 && relativeMouseY in 0..height - 1
val mousePushed: Boolean
open val mousePushed: Boolean
get() = mouseUp && Terrarum.appgc.input.isMouseButtonDown(Terrarum.getConfigInt("mouseprimary")!!)
abstract fun update(gc: GameContainer, delta: Int)