Skip to content

Commit fd320e3

Browse files
committed
feat: option to swap bafflers (if both playlists have one)
1 parent 99a2c33 commit fd320e3

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/model/AppState.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ public static TreeMap<String, String> getCardSwapFromPlaylist(TreeMap<String, St
214214
e.printStackTrace();
215215
}
216216
}
217+
218+
// if both playlists have an associated baffler, they can be swapped as well
217219
if (includeBafflers) {
218220
String srcBaffler = srcPl.getBaffler();
219221
String swapBaffler = swapPl.getBaffler();

src/ui/UIPlaylistActions.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class UIPlaylistActions extends JPanel {
2323
public static final String modDir = "dropmix_modded_src";
2424
public boolean includeBafflers = false;
2525
public UIPlaylistActions() {
26-
setLayout(new GridLayout(5, 1));
26+
setLayout(new GridLayout(7, 1));
2727
try {
2828
Files.deleteIfExists(Paths.get(modDir));
2929
} catch (IOException e) { }
@@ -42,6 +42,16 @@ public void actionPerformed(ActionEvent e) {
4242
resignedApkBtn.setEnabled(verifiedModApk == null && as.currentProcess.equals(Process.NONE) && as.playlistSwap.isEmpty());
4343
add(resignedApkBtn);
4444

45+
JCheckBox cb = new JCheckBox("swap bafflers if possible");
46+
cb.addActionListener(new ActionListener() {
47+
@Override
48+
public void actionPerformed(ActionEvent e) {
49+
that.includeBafflers = !that.includeBafflers;
50+
}
51+
});
52+
cb.setEnabled(as.currentProcess.equals(Process.NONE));
53+
add(cb);
54+
4555
JButton modApkBtn = SwingFactory.buildButton("Full Swap", new ActionListener() {
4656
@Override
4757
public void actionPerformed(ActionEvent e) {

0 commit comments

Comments
 (0)