diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-07-21 12:09:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-21 12:09:09 +0200 |
commit | 34ac5b7becc5dbf308a56e49729c4aa1a780bbe8 (patch) | |
tree | d582787ed61389556dc37f1245f299f4c8a50cb8 /src/main/java/at | |
parent | 3b80141b255ab6099e8dfdd12912e76798b9df19 (diff) | |
download | skyhanni-34ac5b7becc5dbf308a56e49729c4aa1a780bbe8.tar.gz skyhanni-34ac5b7becc5dbf308a56e49729c4aa1a780bbe8.tar.bz2 skyhanni-34ac5b7becc5dbf308a56e49729c4aa1a780bbe8.zip |
Improvement: Short Bazaar Price Source Name (#2233)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at')
3 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt index 55be1b08f..697947e3f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt @@ -207,7 +207,7 @@ object SackDisplay { if (config.showPrice) { list.addSelector<ItemPriceSource>(" ", - getName = { type -> type.displayName }, + getName = { type -> type.sellName }, isCurrent = { it.ordinal == config.priceSource.ordinal }, // todo avoid ordinal onChange = { config.priceSource = ItemPriceSource.entries[it.ordinal] // todo avoid ordinal diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceSource.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceSource.kt index 13049a596..a764bc84e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceSource.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceSource.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.utils -enum class ItemPriceSource(val displayName: String) { - BAZAAR_INSTANT_BUY("Instant Buy/Sell Offer"), // Sell Offer - BAZAAR_INSTANT_SELL("Instant Sell/Buy Order"), // Buy Order +enum class ItemPriceSource(val displayName: String, val sellName: String = displayName, val buyName: String = displayName) { + BAZAAR_INSTANT_BUY("BZ Instant Buy", buyName = "BZ Sell Offer"), + BAZAAR_INSTANT_SELL("BZ Instant Sell", buyName = "BZ Buy Order"), NPC_SELL("NPC Sell"), ; diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt index 241d0a1e8..f249cce3e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt @@ -56,7 +56,7 @@ class SkyHanniItemTracker<Data : ItemTrackerData>( if (isInventoryOpen()) { lists.addSelector<ItemPriceSource>( "", - getName = { type -> type.displayName }, + getName = { type -> type.sellName }, isCurrent = { it.ordinal == config.priceSource.ordinal }, // todo avoid ordinal onChange = { config.priceSource = ItemPriceSource.entries[it.ordinal] // todo avoid ordinal |