Skip to content

Commit

Permalink
1.0.1.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Exslims committed Apr 1, 2017
1 parent 0ba3650 commit 2d9b5cb
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mercury.platform.ui.components.panel.chat;

import com.mercury.platform.shared.events.EventRouter;
import com.mercury.platform.shared.events.custom.ChatFilterMessageEvent;
import com.mercury.platform.ui.components.ComponentsFactory;
import com.mercury.platform.ui.components.fields.style.MercuryScrollBarUI;
import com.mercury.platform.ui.components.panel.VerticalScrollContainer;
Expand All @@ -25,6 +26,7 @@ public class ChatFilterPanel extends JPanel {
private HtmlMessageBuilder messageBuilder;

private boolean scrollToBottom = true;
private boolean soundEnable = false;
private JPanel container;
public ChatFilterPanel() {
this.componentsFactory = new ComponentsFactory();
Expand Down Expand Up @@ -88,6 +90,10 @@ public void scrollToBottom(boolean value) {
}
}

public void sound(boolean enable){
this.soundEnable = enable;
}

private void addMessageToFilter(String message) {
if(!message.isEmpty()){
String nickname = StringUtils.substringBefore(message, ":");
Expand All @@ -105,6 +111,9 @@ private void addMessageToFilter(String message) {
trimContainer();
expiresMessages.put(nickname,message);
EventRouter.UI.fireEvent(new PackEvent.PackChatFilter());
if(soundEnable){
EventRouter.CORE.fireEvent(new ChatFilterMessageEvent());
}
if(scrollToBottom) {
container.scrollRectToVisible(new Rectangle(0, container.getHeight() - 1, 1, 1));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ChatMessagePanel(
this.message = message;

this.componentsFactory = componentsFactory;
this.setBorder(BorderFactory.createEmptyBorder(2,4,2,2));
this.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
this.setBackground(AppThemeColor.TRANSPARENT);
createUI();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private void initContainer() {
tabbedPane.addTab("General",generalSettings);
tabbedPane.addTab("Notification panel",cbSettings);
tabbedPane.addTab("Task panel",taskBarSettings);
// tabbedPane.addTab("Help",new HelpPanel());
tabbedPane.addTab("Help",new HelpPanel());
tabbedPane.addTab("Support",new SupportPanel());
tabbedPane.addTab("About",new AboutPanel());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
public abstract class TitledComponentFrame extends ComponentFrame {
protected JPanel miscPanel;
private JButton hideButton;
protected JButton hideButton;
private JLabel frameTitleLabel;
protected TitledComponentFrame(String title) {
super(title);
Expand Down Expand Up @@ -45,7 +45,7 @@ private void initHeaderPanel(){
headerPanel.add(frameTitleLabel, BorderLayout.CENTER);

miscPanel.setBackground(AppThemeColor.TRANSPARENT);
hideButton = componentsFactory.getIconButton("app/close.png", 14, AppThemeColor.FRAME_ALPHA, "");
hideButton = componentsFactory.getIconButton("app/close.png", 14, AppThemeColor.FRAME_ALPHA, "Hide");
hideButton.setBorder(BorderFactory.createEmptyBorder(0,0,0,2));
hideButton.addMouseListener(new MouseAdapter() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import com.mercury.platform.core.utils.interceptor.MessageInterceptor;
import com.mercury.platform.core.utils.interceptor.filter.MessageFilter;
import com.mercury.platform.shared.ConfigManager;
import com.mercury.platform.shared.events.EventRouter;
import com.mercury.platform.shared.events.custom.AddInterceptorEvent;
import com.mercury.platform.shared.events.custom.AddShowDelayEvent;
import com.mercury.platform.shared.events.custom.ChatFilterMessageEvent;
import com.mercury.platform.shared.events.custom.RemoveInterceptorEvent;
import com.mercury.platform.shared.pojo.FrameSettings;
Expand Down Expand Up @@ -49,6 +47,7 @@ public void componentResized(ComponentEvent e) {
setPreferredSize(getSize());
}
});
this.hideButton.setIcon(componentsFactory.getIcon("app/hide.png",14));
this.settingsFrame.init();
this.msgContainer = new ChatFilterPanel();
this.add(msgContainer,BorderLayout.CENTER);
Expand Down Expand Up @@ -80,9 +79,6 @@ private void performNewStrings(String[] strings){
protected void process(String message) {
SwingUtilities.invokeLater(() -> {
msgContainer.addMessage(message);
if(soundEnable){
EventRouter.CORE.fireEvent(new ChatFilterMessageEvent());
}
ChatFilterFrame.this.pack();
if(scrollToBottom){
msgContainer.scrollToBottom(true);
Expand Down Expand Up @@ -139,7 +135,7 @@ private JPanel getNavigationPanel(){
"app/edit.png",
17,
AppThemeColor.TRANSPARENT,
"");
"Chat Scanner settings");
edit.addActionListener(
action -> this.settingsFrame.showAuxiliaryFrame(
new Point(this.getLocation().x+this.getSize().width/2,this.getLocation().y),
Expand All @@ -162,10 +158,12 @@ private JPanel getNavigationPanel(){
sound.addActionListener(action -> {
if (soundEnable) {
sound.setIcon(componentsFactory.getIcon("app/sound-disable.png", 18));
msgContainer.sound(false);
this.soundEnable = false;
this.repaint();
} else {
sound.setIcon(componentsFactory.getIcon("app/sound-enable.png", 18));
msgContainer.sound(true);
this.soundEnable = true;
this.repaint();
}
Expand Down
Binary file added app-ui/src/main/resources/app/hide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app-ui/src/main/resources/notes/patch/patch-notes.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version":"1.0.1.0",
"version":"1.0.1.1",
"notes":[
{
"title" : "Update",
"text" : "- Added Scalability! Added a related icon to Taskbar.\n- Added Currency Rate display to Notification panel (currency.poe.trade support).\n- Added \"Still interested in ITEM for PRICE?\" button to Notification panel.\n- Added League name display to Notification panel.\n- Fixed reported bugs and issues you guys had.\n- Minor yet numerous improvements.\nIf you enjoy the app and it makes your life a bit happier consider supporting it!",
"text" : "- Introducing CHAT SCANNER.\nThis feature allows you to look for something specific in chat without paying much attention to it. You can set up what to look for and what to ignore. We expect you to fall in love with this feature as soon as you start doing League Challenges!\n- Added an option to remove League display from Notification header.\n- Updated component Fade Time behavior.\n- Fixed things, improved things.\n\nIf you like MercuryTrade so much it has already become your \"must have\" application consider supporting it!\nVisit our Discord channel if you seek help or have suggestions to offer!",
"image" : "",
"layout" : "VERTICAL"
}
Expand Down

0 comments on commit 2d9b5cb

Please sign in to comment.