mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
working spinner
This commit is contained in:
@@ -37,7 +37,7 @@ class UIItemTextSelector(
|
||||
override val height = 24
|
||||
private val buttonW = 30
|
||||
|
||||
private val fbo = FrameBuffer(Pixmap.Format.RGBA8888, width - 54 - 4, height - 4, true)
|
||||
private val fbo = FrameBuffer(Pixmap.Format.RGBA8888, width - 2*buttonW - 6, height - 4, true)
|
||||
|
||||
var selection = intialSelection
|
||||
private var fboUpdateLatch = true
|
||||
@@ -120,7 +120,7 @@ class UIItemTextSelector(
|
||||
|
||||
// draw text
|
||||
batch.color = UIItemTextLineInput.TEXTINPUT_COL_TEXT
|
||||
batch.draw(fbo.colorBufferTexture, posX + buttonW + 5f, posY + 2f, fbo.width.toFloat(), fbo.height.toFloat())
|
||||
batch.draw(fbo.colorBufferTexture, posX + buttonW + 3f, posY + 2f, fbo.width.toFloat(), fbo.height.toFloat())
|
||||
|
||||
|
||||
super.render(batch, camera)
|
||||
@@ -130,29 +130,3 @@ class UIItemTextSelector(
|
||||
fbo.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
class UIItemSpinner(
|
||||
parentUI: UICanvas,
|
||||
initialX: Int, initialY: Int,
|
||||
intialValue: Int,
|
||||
val min: Int,
|
||||
val max: Int,
|
||||
val step: Int,
|
||||
override val width: Int
|
||||
) : UIItem(parentUI, initialX, initialY) {
|
||||
|
||||
init {
|
||||
CommonResourcePool.addToLoadingList("inventory_category") {
|
||||
TextureRegionPack("assets/graphics/gui/inventory/category.tga", 20, 20)
|
||||
}
|
||||
CommonResourcePool.loadAll()
|
||||
}
|
||||
|
||||
private val labels = CommonResourcePool.getAsTextureRegionPack("inventory_category")
|
||||
|
||||
override val height = 24
|
||||
|
||||
override fun dispose() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user