summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/tech/thatgravyboat/rewardclaim/ui/RewardClaimGui.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/kotlin/tech/thatgravyboat/rewardclaim/ui/RewardClaimGui.kt b/src/main/kotlin/tech/thatgravyboat/rewardclaim/ui/RewardClaimGui.kt
index ad22f8c..ce47c4c 100644
--- a/src/main/kotlin/tech/thatgravyboat/rewardclaim/ui/RewardClaimGui.kt
+++ b/src/main/kotlin/tech/thatgravyboat/rewardclaim/ui/RewardClaimGui.kt
@@ -292,7 +292,7 @@ class RewardClaimGui(private val id: String) : WindowScreen() {
"Reward Claim AD",
"Hypixel is a great server and as such we don't want to remove their ad for their store. You can click the skip button when it appears to remove this message and claim your reward.",
UIImage.ofResourceCached("/rewardclaim/external_link.png"),
- { UDesktop.browse(URI(data.adLink)) },
+ { UDesktop.browse(getAd()) },
"${ChatColor.BOLD}Store",
null,
{ removePopup() },
@@ -303,13 +303,17 @@ class RewardClaimGui(private val id: String) : WindowScreen() {
"Reward Claim AD",
"Hypixel is a great server and as such we don't want to remove their ad for their store. You can click the skip button when it appears to remove this message and claim your reward.",
UIImage.ofResourceCached("/rewardclaim/external_link.png"),
- { UDesktop.browse(URI(data.adLink)) },
+ { UDesktop.browse(getAd()) },
"${ChatColor.BOLD}Store"
) childOf this.window
}
}
}
+ private fun getAd() : URI {
+ return if (this::data.isInitialized) URI(data.adLink) else URI("https://store.hypixel.net/?utm_source=rewards-video&utm_medium=website&utm_content=TRsCiBNYY7M&utm_campaign=Rewardss")
+ }
+
override fun onDrawScreen(mouseX: Int, mouseY: Int, partialTicks: Float) {
this.window.draw()
}