Skip to content

Commit

Permalink
Release 1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Morph21 committed Dec 8, 2024
1 parent 7684516 commit 67b07a3
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mercury.platform.core;

public class MercuryConstants {
public static final String APP_VERSION = "1.3.4.1";
public static final String APP_VERSION = "1.3.5";
public static final String SERVER_HOST = "exslims.ddns.net";
public static final int PORT = 5555;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.mercury.platform.shared;

import com.mercury.platform.shared.config.Configuration;
import com.mercury.platform.shared.config.descriptor.ApplicationDescriptor;
import com.sun.jna.Native;
import com.sun.jna.platform.DesktopWindow;
import com.sun.jna.platform.WindowUtils;
Expand All @@ -16,17 +18,12 @@ public class MainWindowHWNDFetch {
private Logger logger = LogManager.getLogger(MainWindowHWNDFetch.class.getSimpleName());
public static MainWindowHWNDFetch INSTANCE = MainWindowHWNDFetch.MainWindowHWNDFetchHolder.HOLDER_INSTANCE;

private boolean isPoe2;

private static class MainWindowHWNDFetchHolder {
static final MainWindowHWNDFetch HOLDER_INSTANCE = new MainWindowHWNDFetch();
}

public void initialize(boolean isPoe2) {
this.isPoe2 = isPoe2;
}

public boolean isPoe2() {
boolean isPoe2 = Configuration.get().applicationConfiguration().get().isPoe2();
return isPoe2;
}

Expand All @@ -45,7 +42,7 @@ public List<DesktopWindow> getMainWindowList() {
}

public boolean isPoe(DesktopWindow desktopWindow) {
// if (this.isPoe2) {
// if (this.isPoe2()) {
// return desktopWindow.getTitle().contains("PathOfExile");
// } else {
char[] className = new char[512];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public class ApplicationDescriptor implements Serializable {
private boolean itemsGridEnable;
private boolean checkOutUpdate;
private boolean hideTaskbarUntilHover;
private boolean poe2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public void onViewInit() {
this.applicationSnapshot.setHideTaskbarUntilHover(hideTaskbarUntilHover.isSelected());
});

JCheckBox poe2Support = this.componentsFactory.getCheckBox(this.applicationSnapshot.isPoe2(), "Enable support for poe2");
poe2Support.addActionListener(action -> {
this.applicationSnapshot.setPoe2(poe2Support.isSelected());
});

JSlider fadeTimeSlider = this.componentsFactory.getSlider(0, 10, this.applicationSnapshot.getFadeTime(), AppThemeColor.SLIDE_BG);
fadeTimeSlider.addChangeListener(e -> {
this.applicationSnapshot.setFadeTime(fadeTimeSlider.getValue());
Expand Down Expand Up @@ -143,6 +148,8 @@ public void keyTyped(KeyEvent e) {
root.add(vulkanEnableCheck);
root.add(this.componentsFactory.getTextLabel("Hide taskbar", FontStyle.REGULAR, 16));
root.add(hideTaskbarUntilHover);
root.add(this.componentsFactory.getTextLabel("POE 2 support", FontStyle.REGULAR, 16));
root.add(poe2Support);
root.add(this.componentsFactory.getTextLabel("Component fade out time: ", FontStyle.REGULAR, 16));
root.add(fadeTimeSlider);
root.add(this.componentsFactory.getTextLabel("Min opacity: ", FontStyle.REGULAR, 16));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
import com.mercury.platform.shared.store.MercuryStoreCore;
import com.mercury.platform.ui.components.ComponentsFactory;
import com.mercury.platform.ui.components.panel.misc.ViewInit;
import com.mercury.platform.ui.frame.movable.NotificationFrame;
import com.mercury.platform.ui.frame.other.MercuryLoadingFrame;
import com.mercury.platform.ui.manager.FramesManager;
import com.mercury.platform.ui.misc.AppThemeColor;

import javax.swing.*;
Expand Down Expand Up @@ -57,6 +59,7 @@ public void mouseEntered(MouseEvent e) {

MercuryStoreCore.frameVisibleSubject.subscribe(state -> SwingUtilities.invokeLater(() -> {
this.changeVisible(state);
FramesManager.INSTANCE.hideOrShowFrame(NotificationFrame.class, state);
}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.mercury.platform.ui.components.panel.notification.controller.stub.OutStubController;
import com.mercury.platform.ui.components.panel.notification.factory.NotificationPanelFactory;
import com.mercury.platform.ui.frame.titled.TestEngine;
import com.mercury.platform.ui.manager.FramesManager;
import com.mercury.platform.ui.misc.AppThemeColor;
import com.mercury.platform.ui.misc.MercuryStoreUI;
import org.apache.commons.lang3.SystemUtils;
Expand Down Expand Up @@ -113,6 +114,10 @@ public void subscribe() {
.setData(notification)
.setComponentsFactory(this.componentsFactory)
.build();
if (ProdStarter.APP_STATUS.equals(FrameVisibleState.HIDE)) {
FramesManager.INSTANCE.hideFrame(NotificationFrame.class);
}

if (preProcessor.isDuplicate(notification)) {
notificationPanel.setDuplicate(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ public void hideOrShowFrame(Class frameClass) {
}
}

public void hideOrShowFrame(Class frameClass, FrameVisibleState state) {
AbstractOverlaidFrame frame = this.framesMap.get(frameClass);
if (state.equals(FrameVisibleState.SHOW)) {
showFrame(frameClass);
} else {
hideFrame(frameClass);
}
}

public void enableMovementExclude(Class... frames) {
this.locationCommander.setUpAllExclude(frames);
}
Expand Down
13 changes: 13 additions & 0 deletions app-ui/src/main/resources/notes/patch/patch-notes-new.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
[
{
"version": "1.3.5",
"minor": [
{
"changed": "moved option to enable path of exile 2 support into in app settings, remember to save after changing"
}
],
"fix": [
{
"changed": "Fixed notifications showing while game is minimized"
}
]
},
{
"version": "1.3.4.1",
"minorChanges": [
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/java/com/mercury/platform/AppMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,11 @@ public static void main(String[] args) {
boolean standalone = BooleanUtils.toBoolean(System.getProperty("standalone"));
boolean dev = BooleanUtils.toBoolean(System.getProperty("dev"));
boolean hideLoadingIcon = BooleanUtils.toBoolean(System.getProperty("hideLoadingIcon"));
boolean isPoe2 = BooleanUtils.toBoolean(System.getProperty("poe2"));
MainWindowHWNDFetch.INSTANCE.initialize(isPoe2);

logger.warn("loaded runtime settings: ");
logger.warn("standalone=" + standalone);
logger.warn("dev=" + dev);
logger.warn("hideLoadingIcon=" + hideLoadingIcon);
logger.warn("isPoe2=" + isPoe2);


new ErrorHandler();
if (!hideLoadingIcon) {
Expand Down
4 changes: 1 addition & 3 deletions release_files/MercuryTrade/MercuryTrade.l4j.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# -Dstandalone while you set that variable to true MercuryTrade will be always visiable even if you are in other window than PathOfExile
-Dstandalone=false
# -DhideLoadingIcon while you set that to true you won't see MercuryTrade loading animation at start
-DhideLoadingIcon=false
# -Dpoe2 while you set that variable to true MercuryTrade will support path of exile 2
-Dpoe2=false
-DhideLoadingIcon=false
8 changes: 4 additions & 4 deletions release_files/release_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<opt>-XX:+UseG1GC</opt>
</jre>
<versionInfo>
<fileVersion>1.3.4.1</fileVersion>
<txtFileVersion>1.3.4.1</txtFileVersion>
<fileVersion>1.3.5.0</fileVersion>
<txtFileVersion>1.3.5</txtFileVersion>
<fileDescription>MercuryTrade</fileDescription>
<copyright>Morph21</copyright>
<productVersion>1.3.4.1</productVersion>
<txtProductVersion>1.3.4.1</txtProductVersion>
<productVersion>1.3.5.0</productVersion>
<txtProductVersion>1.3.5</txtProductVersion>
<productName>MercuryTrade</productName>
<companyName>Morph</companyName>
<internalName>MercuryTrade</internalName>
Expand Down

0 comments on commit 67b07a3

Please sign in to comment.