diff --git a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ItemTradeOutNotificationPanel.java b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ItemTradeOutNotificationPanel.java index 707a758f..25187993 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ItemTradeOutNotificationPanel.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ItemTradeOutNotificationPanel.java @@ -2,8 +2,10 @@ import com.mercury.platform.shared.config.descriptor.HotKeyType; import com.mercury.platform.shared.entity.message.ItemTradeNotificationDescriptor; +import com.mercury.platform.shared.store.MercuryStoreCore; import com.mercury.platform.ui.components.fields.font.FontStyle; import com.mercury.platform.ui.misc.AppThemeColor; +import com.mercury.platform.ui.misc.MercuryStoreUI; import org.apache.commons.lang3.StringUtils; import javax.swing.*; @@ -52,6 +54,9 @@ public JPanel getItemsPanel() { itemsWanted.forEach((item) -> { JButton btn = this.componentsFactory.getButton(item); + btn.addActionListener((action) -> { + MercuryStoreCore.findInStashTab.onNext(item); + }); btn.setForeground(AppThemeColor.INC_PANEL_ARROW); btn.setBackground(AppThemeColor.FRAME); btn.setBorder(new EmptyBorder(4,4,4,4)); @@ -64,6 +69,9 @@ public JPanel getItemsPanel() { itemsPanel.setLayout(new BoxLayout(itemsPanel, BoxLayout.Y_AXIS)); itemsPanel.setBorder(new EmptyBorder(0, 0, 2, 0)); JButton btn = this.componentsFactory.getButton(this.data.getItemName()); + btn.addActionListener((action) -> { + MercuryStoreCore.findInStashTab.onNext(this.data.getItemName()); + }); btn.setForeground(AppThemeColor.INC_PANEL_ARROW); btn.setBackground(AppThemeColor.FRAME); btn.setBorder(new EmptyBorder(4,4,4,4)); diff --git a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/TradeNotificationPanel.java b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/TradeNotificationPanel.java index aecc6e51..e26ae92a 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/TradeNotificationPanel.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/TradeNotificationPanel.java @@ -193,13 +193,16 @@ protected JPanel getCurrencyPanel(Double curCount, String curIconPath) { String.valueOf(curCount); } if (!Objects.equals(curCountStr, "") && curIconPath != null) { - JLabel currencyLabel = componentsFactory.getIconLabel("currency/" + curIconPath + ".png", 26); + JButton currencyButton = componentsFactory.getIconButton("currency/" + curIconPath + ".png", 24, AppThemeColor.TRANSPARENT, "Find in stashtab"); + currencyButton.addActionListener((action) -> { + MercuryStoreCore.findInStashTab.onNext(curIconPath); + }); JPanel curPanel = this.componentsFactory.getJPanel(new GridLayout(1, 0, 4, 0), AppThemeColor.MSG_HEADER); curPanel.setAlignmentX(SwingConstants.LEFT); JLabel countLabel = this.componentsFactory.getTextLabel(curCountStr, FontStyle.BOLD, 17f); countLabel.setHorizontalAlignment(SwingConstants.RIGHT); curPanel.add(countLabel); - curPanel.add(currencyLabel); + curPanel.add(currencyButton); return curPanel; } return null; diff --git a/app-ui/src/main/resources/notes/patch/patch-notes-new.json b/app-ui/src/main/resources/notes/patch/patch-notes-new.json index a550c5e5..79641b85 100644 --- a/app-ui/src/main/resources/notes/patch/patch-notes-new.json +++ b/app-ui/src/main/resources/notes/patch/patch-notes-new.json @@ -9,6 +9,9 @@ "features": [ { "changed": "When stash tab is open and name of item is pressed in notification window it will be copied into stash tab search" + }, + { + "changed": "Added rational fractions instead of decimal ratios while buying/selling currency" } ], "minorChanges": [