Skip to content

Commit a88eea7

Browse files
committed
works with 1.3.5 or something maybe?
1 parent e151d0d commit a88eea7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ mcVersion = 1.8.9
55
modid = hatecheaters
66
version=0.2.3
77
# requiredOdin and the latest action must have the same name if useActions is true.
8-
requiredOdin=Odin-1.3.3.jar
8+
requiredOdin=Odin-1.3.5.jar
99
odinRepository = odtheking/Odin
10-
useActions=false
10+
useActions=true

src/main/kotlin/com/github/subat0m1c/hatecheaters/pvgui/v2/pages/Inventory.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ object Inventory : PVPage("Inventory") {
195195
private val itemGrid by resettableLazy {
196196
itemGrid(gridItems, ct.roundness, spacer.toFloat()) {
197197
colorHandler { _, item ->
198-
if (rarityBackgrounds) item?.lore?.let { getRarity(it) }?.color?.hc()
199-
?: ct.items.hc() else ct.items.hc()
198+
if (rarityBackgrounds) item?.lore?.let { getRarity(it) }?.color?.hc() ?: ct.items.hc()
199+
else ct.items.hc()
200200
}
201201

202202
tooltipHandler { listOf("${it.displayName} §7(${it.getMagicalPower.colorize(22)}§7)") + it.lore }

src/main/kotlin/com/github/subat0m1c/hatecheaters/utils/odinwrappers/Text.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ object Text {
1616
text: String?,
1717
x: Number,
1818
y: Number,
19-
width: Number,
20-
maxHeight: Number,
19+
maxWidth: Number,
20+
size: Number,
2121
color: Color,
2222
alignment: Alignment = Alignment.MIDDLE
2323
) {
24-
val scaleFactor: Float = width.toFloat() / getWidthSized(text.toString().noControlCodes, maxHeight.toFloat())
24+
val scaleFactor: Float = maxWidth.toFloat() / getWidthSized(text.toString().noControlCodes, size.toFloat())
2525
colorText(
2626
text,
2727
x.toFloat(),
2828
y.toFloat(),
29-
maxHeight.toFloat() * scaleFactor.coerceAtMost(1f),
29+
size.toFloat() * scaleFactor.coerceAtMost(1f),
3030
color,
3131
Centering.CENTER,
3232
alignment

0 commit comments

Comments
 (0)