mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
more pictogrammes
Former-commit-id: 670df70bbed466e56034dbdd33d7a1da31cd88d7 Former-commit-id: 2b106753155be6080d4651acca1981f10d614421
This commit is contained in:
@@ -1,13 +1,32 @@
|
||||
package net.torvald.terrarum.ui
|
||||
|
||||
import org.newdawn.slick.GameContainer
|
||||
import org.newdawn.slick.Graphics
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 15-12-31.
|
||||
*/
|
||||
class UIItem {
|
||||
interface UIItem {
|
||||
|
||||
// X/Y Position relative to the containing canvas
|
||||
internal var posX: Int = 0
|
||||
internal var posY: Int = 0
|
||||
var posX: Int
|
||||
var posY: Int
|
||||
|
||||
fun update(gc: GameContainer, delta: Int)
|
||||
fun render(gc: GameContainer, g: Graphics)
|
||||
|
||||
// keyboard controlled
|
||||
fun keyPressed(key: Int, c: Char)
|
||||
fun keyReleased(key: Int, c: Char)
|
||||
|
||||
// mouse controlled
|
||||
fun mouseMoved(oldx: Int, oldy: Int, newx: Int, newy: Int)
|
||||
fun mouseDragged(oldx: Int, oldy: Int, newx: Int, newy: Int)
|
||||
fun mousePressed(button: Int, x: Int, y: Int)
|
||||
fun mouseReleased(button: Int, x: Int, y: Int)
|
||||
fun mouseWheelMoved(change: Int)
|
||||
|
||||
// gamepad controlled
|
||||
fun controllerButtonPressed(controller: Int, button: Int)
|
||||
fun controllerButtonReleased(controller: Int, button: Int)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user