mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
sound cues for buttons
This commit is contained in:
@@ -35,9 +35,16 @@ abstract class UIItemInventoryCellBase(
|
||||
var colourTheme: InventoryCellColourTheme = UIItemInventoryCellCommonRes.defaultInventoryCellTheme,
|
||||
var showTooltip: Boolean = true,
|
||||
) : UIItem(parentUI, initialX, initialY) {
|
||||
abstract override fun update(delta: Float)
|
||||
|
||||
override fun update(delta: Float) {
|
||||
suppressHaptic = (item == null)
|
||||
super.update(delta)
|
||||
}
|
||||
|
||||
abstract override fun render(frameDelta: Float, batch: SpriteBatch, camera: OrthographicCamera)
|
||||
|
||||
override var suppressHaptic = false
|
||||
|
||||
protected val tooltipHash = System.nanoTime()
|
||||
|
||||
/** Custom highlight rule to highlight tihs button to primary accent colour (blue by default).
|
||||
|
||||
@@ -51,6 +51,8 @@ open class UIItemInventoryItemGrid(
|
||||
private val colourTheme: InventoryCellColourTheme = defaultInventoryCellTheme
|
||||
) : UIItem(parentUI, initialX, initialY) {
|
||||
|
||||
override var suppressHaptic = true
|
||||
|
||||
// deal with the moving position
|
||||
//override var oldPosX = posX
|
||||
//override var oldPosY = posY
|
||||
|
||||
@@ -23,6 +23,7 @@ class UIItemListNavBarVertical(
|
||||
var extraDrawOpOnBottom: (UIItemListNavBarVertical, SpriteBatch) -> Unit = { _,_ -> }
|
||||
) : UIItem(parentUI, initialX, initialY) {
|
||||
|
||||
override var suppressHaptic = true
|
||||
override val width = UIItemListNavBarVertical.WIDTH
|
||||
|
||||
override val mouseUp: Boolean
|
||||
|
||||
@@ -496,6 +496,8 @@ class UIItemPlayerCells(
|
||||
val playerUUID: UUID,
|
||||
) : UIItem(parent, initialX, initialY) {
|
||||
|
||||
override var suppressHaptic = false
|
||||
|
||||
override val width = SAVE_CELL_WIDTH
|
||||
override val height = SAVE_CELL_HEIGHT
|
||||
|
||||
@@ -766,6 +768,7 @@ class UIItemWorldCells(
|
||||
initialY: Int,
|
||||
val skimmer: DiskSkimmer) : UIItem(parent, initialX, initialY) {
|
||||
|
||||
override var suppressHaptic = false
|
||||
|
||||
private val metaFile: EntryFile?
|
||||
private val saveName: String
|
||||
|
||||
Reference in New Issue
Block a user