mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 04:24:05 +09:00
buildingmaker resurrection wip
This commit is contained in:
@@ -4,11 +4,8 @@ import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.BlendMode
|
||||
import net.torvald.terrarum.Second
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.toInt
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
@@ -52,7 +49,10 @@ class UIItemTextButtonList(
|
||||
|
||||
val alignment: UIItemTextButton.Companion.Alignment = UIItemTextButton.Companion.Alignment.CENTRE,
|
||||
val itemHitboxSize: Int = lineHeight,
|
||||
tagsCollection: Array<Array<String>> = Array(labelsList.size) { arrayOf("") }
|
||||
|
||||
tagsCollection: Array<Array<String>> = Array(labelsList.size) { arrayOf("") },
|
||||
|
||||
val backgroundCol: Color = Color(0),
|
||||
) : UIItem(parentUI, initialX, initialY) {
|
||||
|
||||
companion object {
|
||||
@@ -238,6 +238,11 @@ class UIItemTextButtonList(
|
||||
}
|
||||
}*/
|
||||
|
||||
batch.color = backgroundCol
|
||||
blendNormalStraightAlpha(batch)
|
||||
Toolkit.fillArea(batch, posX.toFloat(), posY.toFloat(), width.toFloat(), height.toFloat())
|
||||
|
||||
|
||||
buttons.forEach { it.render(batch, camera) }
|
||||
|
||||
|
||||
|
||||
@@ -101,16 +101,16 @@ class UINSMenu(
|
||||
val listHeight = stringsFromTree.size * LINE_HEIGHT
|
||||
|
||||
val list = UIItemTextButtonList(
|
||||
this,
|
||||
UIItemTextButtonList.DEFAULT_LINE_HEIGHT,
|
||||
stringsFromTree,
|
||||
width, LINE_HEIGHT,
|
||||
uiWidth, listHeight,
|
||||
textAreaWidth = listWidth,
|
||||
alignment = UIItemTextButton.Companion.Alignment.LEFT,
|
||||
inactiveCol = Color(.94f, .94f, .94f, 1f),
|
||||
itemHitboxSize = LINE_HEIGHT
|
||||
|
||||
this,
|
||||
UIItemTextButtonList.DEFAULT_LINE_HEIGHT,
|
||||
stringsFromTree,
|
||||
width, LINE_HEIGHT,
|
||||
uiWidth, listHeight,
|
||||
textAreaWidth = listWidth,
|
||||
alignment = UIItemTextButton.Companion.Alignment.LEFT,
|
||||
inactiveCol = Color(.94f, .94f, .94f, 1f),
|
||||
itemHitboxSize = LINE_HEIGHT,
|
||||
backgroundCol = UIItemTextButtonList.DEFAULT_BACKGROUNDCOL
|
||||
)
|
||||
|
||||
// List selection change listener
|
||||
|
||||
Reference in New Issue
Block a user