summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-03-21 21:07:59 +0100
committerGitHub <noreply@github.com>2024-03-21 21:07:59 +0100
commite66f45ac7ea014bcf579b7a3d56033d082ebb763 (patch)
tree703722ab1f9394936b796386c3950c1b0e0d40be /src/main/java/at/hannibal2/skyhanni/features
parent505b963af2b27e6f5a2783f27c20ff209628b60b (diff)
downloadskyhanni-e66f45ac7ea014bcf579b7a3d56033d082ebb763.tar.gz
skyhanni-e66f45ac7ea014bcf579b7a3d56033d082ebb763.tar.bz2
skyhanni-e66f45ac7ea014bcf579b7a3d56033d082ebb763.zip
Improvement: HoverTips improvements (#821)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt42
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt17
3 files changed, 31 insertions, 32 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
index dd226d800..106d6e84d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
@@ -284,8 +284,8 @@ object GhostCounter {
}
val moneyMadeWithClickableTips = Renderable.clickAndHover(
textFormatting.moneyMadeFormat.formatText(moneyMade.addSeparators()),
- moneyMadeTips
- ) { OSUtils.copyToClipboard(moneyMadeTips.joinToString("\n").removeColor()) }
+ moneyMadeTips, onClick =
+ { OSUtils.copyToClipboard(moneyMadeTips.joinToString("\n").removeColor()) })
addAsSingletonList(textFormatting.moneyHourFormat.formatText(final))
addAsSingletonList(moneyMadeWithClickableTips)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
index ebcda2824..458806e21 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
@@ -131,18 +131,18 @@ class FarmingWeightDisplay {
listOf("§eClick here to reload the data right now!"),
onClick = recalculate
), Renderable.clickAndHover(
- "§cdata from Elite Farmers!",
- listOf("§eClick here to reload the data right now!"),
- onClick = recalculate
- ), Renderable.clickAndHover(
- "§eRejoin the garden or",
- listOf("§eClick here to reload the data right now!"),
- onClick = recalculate
- ), Renderable.clickAndHover(
- "§eclick here to fix it.",
- listOf("§eClick here to reload the data right now!"),
- onClick = recalculate
- )
+ "§cdata from Elite Farmers!",
+ listOf("§eClick here to reload the data right now!"),
+ onClick = recalculate
+ ), Renderable.clickAndHover(
+ "§eRejoin the garden or",
+ listOf("§eClick here to reload the data right now!"),
+ onClick = recalculate
+ ), Renderable.clickAndHover(
+ "§eclick here to fix it.",
+ listOf("§eClick here to reload the data right now!"),
+ onClick = recalculate
+ )
)
}
@@ -177,12 +177,13 @@ class FarmingWeightDisplay {
val leaderboard = getLeaderboard()
val list = mutableListOf<Renderable>()
- list.add(Renderable.clickAndHover(
- "§6Farming Weight§7: $weight$leaderboard",
- listOf("§eClick to open your Farming Profile.")
- ) {
- openWebsite(LorenzUtils.getPlayerName())
- })
+ list.add(
+ Renderable.clickAndHover(
+ "§6Farming Weight§7: $weight$leaderboard",
+ listOf("§eClick to open your Farming Profile."), onClick = {
+ openWebsite(LorenzUtils.getPlayerName())
+ })
+ )
if (isEtaEnabled() && (weightPerSecond != -1.0 || config.overtakeETAAlways)) {
getETA()?.let {
@@ -305,10 +306,9 @@ class FarmingWeightDisplay {
} else {
Renderable.clickAndHover(
text,
- listOf("§eClick to open the Farming Profile of §b$nextName.")
- ) {
+ listOf("§eClick to open the Farming Profile of §b$nextName."), onClick = {
openWebsite(nextName)
- }
+ })
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt
index ca9c5b5fe..ceb8f1922 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt
@@ -374,17 +374,16 @@ object SkillProgress {
)
}
-
val session = xpInfo.timeActive.seconds.format(TimeUnit.HOUR)
add(
- Renderable.clickAndHover(
- "§7Session: §e$session ${if (xpInfo.sessionTimerActive) "" else "§c(PAUSED)"}",
- listOf("§eClick to reset!")
- ) {
- xpInfo.sessionTimerActive = false
- xpInfo.timeActive = 0L
- chat("Timer for §b${activeSkill.displayName} §ehas been reset!")
- })
+ Renderable.clickAndHover("§7Session: §e$session ${if (xpInfo.sessionTimerActive) "" else "§c(PAUSED)"}",
+ listOf("§eClick to reset!"), onClick = {
+ xpInfo.sessionTimerActive = false
+
+ xpInfo.timeActive = 0L
+ chat("Timer for §b${activeSkill.displayName} §ehas been reset!")
+ })
+ )
}
private fun drawDisplay() = buildList {