mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 02:24:05 +09:00
some colour constants moved to the Toolkit.Theme
This commit is contained in:
@@ -78,7 +78,7 @@ class GraphicsControlPanel(val remoCon: UIRemoCon) : UICanvas() {
|
||||
batch.color = Color(0x00f8ff_40)
|
||||
Toolkit.fillArea(batch, xstart + 1, 1, App.scr.chatWidth - 2, App.scr.height - 2)
|
||||
|
||||
batch.color = UIItemTextButton.defaultActiveCol
|
||||
batch.color = Toolkit.Theme.COL_ACTIVE
|
||||
Toolkit.drawBoxBorder(batch, xstart + 1, 1, App.scr.chatWidth - 2, App.scr.height - 2)
|
||||
val overlayResTxt = "${App.scr.chatWidth}$TIMES${App.scr.height}"
|
||||
App.fontGame.draw(batch, overlayResTxt,
|
||||
|
||||
@@ -34,7 +34,7 @@ class UIInventoryFull(
|
||||
override var openCloseTime: Second = 0.0f
|
||||
|
||||
companion object {
|
||||
val CELL_COL = Color(0x28282888)
|
||||
val CELL_COL = Toolkit.Theme.COL_CELL_FILL
|
||||
|
||||
const val INVEN_DEBUG_MODE = false
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.torvald.terrarum.modulebasegame.ui.UIInventoryFull.Companion.itemList
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIItemInventoryItemGrid.Companion.createInvCellGenericKeyDownFun
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIItemInventoryItemGrid.Companion.createInvCellGenericTouchDownFun
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.ui.Toolkit.DEFAULT_BOX_BORDER_COL
|
||||
import net.torvald.terrarum.ui.Toolkit.Theme.COL_INVENTORY_CELL_BORDER
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import net.torvald.terrarum.ui.UIItem
|
||||
|
||||
@@ -82,7 +82,7 @@ class UIItemInventoryEquippedView(
|
||||
blendNormal(batch)
|
||||
batch.color = spriteViewBackCol
|
||||
Toolkit.fillArea(batch, posX, posY, width, width)
|
||||
batch.color = DEFAULT_BOX_BORDER_COL
|
||||
batch.color = COL_INVENTORY_CELL_BORDER
|
||||
Toolkit.drawBoxBorder(batch, posX, posY, width, width)
|
||||
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ import net.torvald.terrarum.modulebasegame.gameactors.InventoryPair
|
||||
import net.torvald.terrarum.modulebasegame.ui.ItemSlotImageFactory.CELLCOLOUR_BLACK_ACTIVE
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIInventoryFull.Companion.CELL_COL
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIInventoryFull.Companion.INVEN_DEBUG_MODE
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import net.torvald.terrarum.ui.UIItem
|
||||
import net.torvald.terrarum.ui.UIItemImageButton
|
||||
import net.torvald.terrarum.ui.UIItemTextButton.Companion.defaultActiveCol
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
import kotlin.math.floor
|
||||
|
||||
@@ -239,7 +239,7 @@ class UIItemInventoryItemGrid(
|
||||
activeBackCol = Color(0),
|
||||
highlightBackCol = Color(0),
|
||||
activeBackBlendMode = BlendMode.NORMAL,
|
||||
activeCol = defaultActiveCol,
|
||||
activeCol = Toolkit.Theme.COL_ACTIVE,
|
||||
initialX = iconPosX,
|
||||
initialY = getIconPosY(index),
|
||||
highlightable = true
|
||||
@@ -252,7 +252,7 @@ class UIItemInventoryItemGrid(
|
||||
backgroundCol = Color(0),
|
||||
activeBackCol = Color(0),
|
||||
activeBackBlendMode = BlendMode.NORMAL,
|
||||
activeCol = defaultActiveCol,
|
||||
activeCol = Toolkit.Theme.COL_ACTIVE,
|
||||
initialX = iconPosX,
|
||||
initialY = getIconPosY(2),
|
||||
highlightable = false
|
||||
@@ -264,7 +264,7 @@ class UIItemInventoryItemGrid(
|
||||
backgroundCol = Color(0),
|
||||
activeBackCol = Color(0),
|
||||
activeBackBlendMode = BlendMode.NORMAL,
|
||||
activeCol = defaultActiveCol,
|
||||
activeCol = Toolkit.Theme.COL_ACTIVE,
|
||||
initialX = iconPosX,
|
||||
initialY = getIconPosY(3),
|
||||
highlightable = false
|
||||
|
||||
@@ -44,9 +44,6 @@ class UIKeyboardControlPanel(remoCon: UIRemoCon?) : UICanvas() {
|
||||
private val threeu = 84
|
||||
private val spaceu = 188
|
||||
|
||||
private val borderNormal = Color(0xFFFFFF80.toInt())
|
||||
private val fillCol = Color(0x80)
|
||||
|
||||
private val keycaps = hashMapOf(
|
||||
Input.Keys.GRAVE to UIItemKeycap(this, 1, 1, null, oneu, ""),
|
||||
Input.Keys.NUM_1 to UIItemKeycap(this, 33,1, Input.Keys.NUM_1, oneu, "1,3"),
|
||||
@@ -286,11 +283,11 @@ class UIItemKeycap(
|
||||
|
||||
private val borderKeyForbidden = Color(0x000000C0)
|
||||
private val borderKeyNormal = Color(0xFFFFFFAA.toInt())
|
||||
private val borderMouseUp = UIItemTextButton.defaultActiveCol
|
||||
private val borderKeyPressed = UIItemTextButton.defaultHighlightCol
|
||||
private val borderMouseUp = Toolkit.Theme.COL_ACTIVE
|
||||
private val borderKeyPressed = Toolkit.Theme.COL_HIGHLIGHT
|
||||
private val borderKeyPressedAndSelected = Color(0x33FF33FF.toInt())
|
||||
|
||||
private val keycapFill = Color(0x28282888)
|
||||
private val keycapFill = Toolkit.Theme.COL_CELL_FILL
|
||||
|
||||
private val keylabelCol = Color(0xFFFFFF40.toInt())
|
||||
private val configuredKeyCol = Color.WHITE
|
||||
@@ -346,7 +343,7 @@ class UIItemControlPaletteBaloon(val parent: UIKeyboardControlPanel, initialX: I
|
||||
|
||||
private val icons = CommonResourcePool.getAsTextureRegionPack("inventory_category")
|
||||
|
||||
private val buttonBackground = Color(0x2C2C2CFF)
|
||||
private val buttonBackground = Toolkit.Theme.COL_CELL_FILL.cpy().add(0f,0f,0f,1f)
|
||||
|
||||
private val iconButtons = arrayOf(
|
||||
// left up right down
|
||||
|
||||
@@ -468,7 +468,7 @@ class UIItemPlayerCells(
|
||||
internal var hasTexture = false
|
||||
private set
|
||||
|
||||
private val litCol = UIItemTextButton.defaultActiveCol
|
||||
private val litCol = Toolkit.Theme.COL_ACTIVE
|
||||
private val cellCol = CELL_COL
|
||||
private val defaultCol = Color.WHITE
|
||||
private val hruleCol = Color(1f,1f,1f,0.35f)
|
||||
@@ -645,7 +645,7 @@ class UIItemWorldCells(
|
||||
hasTexture = true
|
||||
}
|
||||
|
||||
val highlightCol = if (mouseUp) UIItemTextButton.defaultActiveCol else Color.WHITE
|
||||
val highlightCol = if (mouseUp) Toolkit.Theme.COL_ACTIVE else Color.WHITE
|
||||
val x = posX.toFloat()
|
||||
val y = posY.toFloat()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user