mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
hacked the titlescreen to fix resize-related UI shit
This commit is contained in:
@@ -369,7 +369,10 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
||||
if (loadDone) {
|
||||
// resize UI by re-creating it (!!)
|
||||
uiMenu.resize(Terrarum.WIDTH, Terrarum.HEIGHT)
|
||||
uiMenu.setPosition(0, UITitleRemoConRoot.menubarOffY)
|
||||
//uiMenu.setPosition(0, UITitleRemoConRoot.menubarOffY)
|
||||
uiMenu.setPosition(0, 0) // shitty hack. Could be:
|
||||
// 1: Init code and resize code are different
|
||||
// 2: The UI is coded shit
|
||||
}
|
||||
|
||||
if (lightmapInitialised) {
|
||||
|
||||
@@ -82,7 +82,7 @@ class UIItemInventoryDynamicList(
|
||||
itemImage = null,
|
||||
mouseoverBackCol = Color(0x282828_ff),
|
||||
mouseoverBackBlendMode = BlendMode.SCREEN,
|
||||
backCol = Color(0x303030_58),
|
||||
backCol = Color(0x404040_88),
|
||||
backBlendMode = BlendMode.NORMAL,
|
||||
drawBackOnNull = true,
|
||||
inactiveTextCol = defaultTextColour
|
||||
@@ -98,7 +98,7 @@ class UIItemInventoryDynamicList(
|
||||
itemImage = null,
|
||||
mouseoverBackCol = Color(0x282828_ff),
|
||||
mouseoverBackBlendMode = BlendMode.SCREEN,
|
||||
backCol = Color(0x303030_58),
|
||||
backCol = Color(0x404040_88),
|
||||
backBlendMode = BlendMode.NORMAL,
|
||||
drawBackOnNull = true,
|
||||
inactiveTextCol = defaultTextColour
|
||||
|
||||
@@ -38,7 +38,7 @@ class UIItemInventoryEquippedView(
|
||||
lateinit var inventorySortList: Array<GameItem?>
|
||||
private var rebuildList = true
|
||||
|
||||
val spriteViewBackCol: Color; get() = Color(0x303030_58.toInt())//Color(0xd4d4d4_ff.toInt())
|
||||
val spriteViewBackCol: Color; get() = Color(0x404040_88.toInt())//Color(0xd4d4d4_ff.toInt())
|
||||
|
||||
private val itemGrid = Array<UIItemInventoryCellBase>(
|
||||
2 * 5, {
|
||||
@@ -51,7 +51,7 @@ class UIItemInventoryEquippedView(
|
||||
itemImage = null,
|
||||
mouseoverBackCol = Color(0x282828_ff),
|
||||
mouseoverBackBlendMode = BlendMode.SCREEN,
|
||||
backCol = Color(0x303030_58),
|
||||
backCol = Color(0x404040_88),
|
||||
backBlendMode = BlendMode.NORMAL,
|
||||
drawBackOnNull = true
|
||||
)
|
||||
|
||||
@@ -674,10 +674,13 @@ object LightmapRenderer {
|
||||
// excluiding overscans; only reckon echo lights
|
||||
for (y in overscan_open..render_height + overscan_open + 1) {
|
||||
for (x in overscan_open..render_width + overscan_open + 1) {
|
||||
val colour = lightmap[y][x]
|
||||
reds [minOf(CHANNEL_MAX, colour.r.times(MUL).floorInt())] += 1
|
||||
greens[minOf(CHANNEL_MAX, colour.g.times(MUL).floorInt())] += 1
|
||||
blues [minOf(CHANNEL_MAX, colour.b.times(MUL).floorInt())] += 1
|
||||
try {
|
||||
val colour = lightmap[y][x]
|
||||
reds[minOf(CHANNEL_MAX, colour.r.times(MUL).floorInt())] += 1
|
||||
greens[minOf(CHANNEL_MAX, colour.g.times(MUL).floorInt())] += 1
|
||||
blues[minOf(CHANNEL_MAX, colour.b.times(MUL).floorInt())] += 1
|
||||
}
|
||||
catch (e: ArrayIndexOutOfBoundsException) { }
|
||||
}
|
||||
}
|
||||
return Histogram(reds, greens, blues)
|
||||
|
||||
Reference in New Issue
Block a user