Skip to content

Commit 876490f

Browse files
committed
fix: default positions for hud elements which used percentages
[no ci]
1 parent 4e61f95 commit 876490f

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/DungeonFeatures.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ object DungeonFeatures : EventSubscriber {
693693
intendedItemStack = null
694694
}
695695

696-
object SpiritBearSpawnTimer : HudElement("Spirit Bear Spawn Timer", 10f, 160f) {
696+
object SpiritBearSpawnTimer : HudElement("Spirit Bear Spawn Timer", 0.05, 0.4) {
697697
val diff = stateUsingSystemTime { currentTime ->
698698
lastLitUpTime()?.plusMillis(3400)?.let { time -> currentTime.until(time) }
699699
}
@@ -710,7 +710,7 @@ object DungeonFeatures : EventSubscriber {
710710

711711
}
712712

713-
object DungeonSecretDisplay : HudElement("Dungeon Secret Display", x = 10f, y = 100f) {
713+
object DungeonSecretDisplay : HudElement("Dungeon Secret Display", x = 0.05, y = 0.4) {
714714
val secretsState = mutableStateOf(-1)
715715
val maxSecretsState = mutableStateOf(-1)
716716

mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/LividFinder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ object LividFinder : EventSubscriber {
176176
private val BlockState.dyeColor
177177
get() = block.defaultMapColor.let { mapColor -> DyeColor.entries.find { it.mapColor == mapColor } }
178178

179-
private class LividHud : HudElement("Livid HP", 10f, 160f) {
179+
private class LividHud : HudElement("Livid HP", 0.05, 0.4) {
180180
override fun LayoutScope.render() {
181181
if_(SBInfo.dungeonsState) {
182182
ifNotNull(lividTag) { lividTag ->

mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/farming/VisitorHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ object VisitorHelper : EventSubscriber {
137137
* of this class so that the user can move the element around normally.
138138
* @see ContainerSellValue
139139
*/
140-
object VisitorHelperDisplay : HudElement("Visitor Offer Helper", 51.6f, 113.2f) {
140+
object VisitorHelperDisplay : HudElement("Visitor Offer Helper", 0.258, 0.283) {
141141
override fun LayoutScope.render() {
142142
// Rendering is handled in the BackgroundDrawnEvent to give the text proper lighting
143143

mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc/ContainerSellValue.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ object ContainerSellValue : EventSubscriber {
7777
* of this class so that the user can move the element around normally.
7878
* @see renderGuiComponent
7979
*/
80-
class SellValueDisplay : HudElement("Container Sell Value", x = 0.258f, y = 0.283f) {
80+
class SellValueDisplay : HudElement("Container Sell Value", x = 0.258, y = 0.283) {
8181
override fun LayoutScope.render() {
8282
// Rendering is handled in the BackgroundDrawnEvent to give the text proper lighting
8383
// FIXME: still create component here, just call render later

mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc/ItemFeatures.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ object ItemFeatures : EventSubscriber {
851851
}
852852
}
853853

854-
class StackingEnchantHud : HudElement("Stacking Enchant Display", 130f, 340f) {
854+
class StackingEnchantHud : HudElement("Stacking Enchant Display", 0.65, 0.85) {
855855
override fun LayoutScope.render() {
856856
text(stackingEnchantTextState)
857857
}
@@ -862,7 +862,7 @@ object ItemFeatures : EventSubscriber {
862862

863863
}
864864

865-
class SoulflowHud : HudElement("Soulflow Display", 120f, 340f) {
865+
class SoulflowHud : HudElement("Soulflow Display", 0.65, 0.85) {
866866
override fun LayoutScope.render() {
867867
text(soulflowState)
868868
}
@@ -873,7 +873,7 @@ object ItemFeatures : EventSubscriber {
873873

874874
}
875875

876-
class WitherShieldHud : HudElement("Wither Shield Display", 140f, 340f) {
876+
class WitherShieldHud : HudElement("Wither Shield Display", 0.65, 0.85) {
877877
override fun LayoutScope.render() {
878878
text(stateUsingSystemTime { time ->
879879
val lastShieldUse = lastShieldUseState()

mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc/QuiverStuff.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ object QuiverStuff : EventSubscriber {
7979
}
8080
}
8181

82-
object QuiverDisplay : HudElement("Quiver Display", 10f, 160f) {
82+
object QuiverDisplay : HudElement("Quiver Display", 0.05, 0.4) {
8383
private val ARROW = ItemStack(Items.ARROW)
8484
private val color = State {
8585
val count = arrowCountState()
@@ -111,7 +111,7 @@ object QuiverStuff : EventSubscriber {
111111

112112
}
113113

114-
object SelectedArrowDisplay : HudElement("SelectedArrowDisplay", 130f, 340f) {
114+
object SelectedArrowDisplay : HudElement("SelectedArrowDisplay", 0.65, 0.85) {
115115
val text = State { "Selected: §r${selectedTypeState().ifBlank { "§cUnknown" }}" }
116116
override fun LayoutScope.render() {
117117
if_(SBInfo.skyblockState) {

0 commit comments

Comments
 (0)