Display installed PSArcs in options screen

This commit is contained in:
2025-02-25 19:37:37 -06:00
parent b1f38400c3
commit c9a968d173
4 changed files with 125 additions and 5 deletions

View File

@@ -108,7 +108,7 @@
</component>
</children>
</grid>
<grid id="1000f" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="1000f" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -122,7 +122,7 @@
<children>
<component id="f3723" class="javax.swing.JCheckBox" binding="hdCheck">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<background color="-15128227"/>
@@ -137,7 +137,7 @@
</component>
<component id="5ed0c" class="javax.swing.JCheckBox" binding="furyCheck">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<background color="-15128227"/>
@@ -154,7 +154,7 @@
<grid id="afeb1" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="1" anchor="2" fill="0" indent="0" use-parent-layout="false"/>
<grid row="0" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="1" anchor="2" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<background color="-15128227"/>
@@ -235,7 +235,7 @@
</grid>
<component id="45b94" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="2" fill="0" indent="0" use-parent-layout="false"/>
<grid row="1" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="2" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<background color="-15128227"/>
@@ -245,6 +245,101 @@
<text value="Select DLC Packs:"/>
</properties>
</component>
<grid id="d53a4" binding="installedList" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="3" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<focusable value="false"/>
<opaque value="false"/>
</properties>
<border type="line" title="Installed Packs" title-justification="2" title-position="1">
<font name="Exo 2"/>
<title-color color="-1"/>
<color color="-1"/>
</border>
<children>
<grid id="e1f58" binding="installedListMargin" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="4" left="16" bottom="4" right="16"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<focusable value="false"/>
<opaque value="false"/>
</properties>
<border type="none"/>
<children>
<component id="74ba9" class="javax.swing.JLabel" binding="ipcBase">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Exo 2"/>
<foreground color="-1"/>
<horizontalAlignment value="2"/>
<horizontalTextPosition value="11"/>
<icon value="lightNegative.png"/>
<text value="Base Game"/>
</properties>
</component>
<component id="afce0" class="javax.swing.JLabel" binding="ipcPatch1">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Exo 2"/>
<foreground color="-1"/>
<horizontalAlignment value="2"/>
<horizontalTextPosition value="11"/>
<icon value="lightNegative.png"/>
<text value="Update v1.01"/>
</properties>
</component>
<component id="209d6" class="javax.swing.JLabel" binding="ipcPatch2">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Exo 2"/>
<foreground color="-1"/>
<horizontalAlignment value="2"/>
<horizontalTextPosition value="11"/>
<icon value="lightNegative.png"/>
<text value="Update v1.04"/>
</properties>
</component>
<component id="dbb59" class="javax.swing.JLabel" binding="ipcDlcHD">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Exo 2"/>
<foreground color="-1"/>
<horizontalAlignment value="2"/>
<horizontalTextPosition value="11"/>
<icon value="lightNegative.png"/>
<text value="HD Add-On Pack"/>
</properties>
</component>
<component id="c1b3f" class="javax.swing.JLabel" binding="ipcDlcFury">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Exo 2"/>
<foreground color="-1"/>
<horizontalAlignment value="2"/>
<horizontalTextPosition value="11"/>
<icon value="lightNegative.png"/>
<text value="Fury Add-On Pack"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
</children>
</grid>
</children>

View File

@@ -36,6 +36,13 @@ public class Bert implements ActionListener {
private JCheckBox hdCheck;
private JCheckBox furyCheck;
private JCheckBox skipBaseCheck;
private JPanel installedList;
private JLabel ipcBase;
private JLabel ipcPatch1;
private JLabel ipcPatch2;
private JLabel ipcDlcHD;
private JLabel ipcDlcFury;
private JPanel installedListMargin;
private ButtonGroup radios = new ButtonGroup();
private JFrame invoker;
@@ -66,6 +73,8 @@ public class Bert implements ActionListener {
patchCheck1.addActionListener(this);
patchCheck2.addActionListener(this);
refreshChecklist();
frame.setIconImage(Main.windowIcon);
frame.setVisible(true);
@@ -341,4 +350,20 @@ public class Bert implements ActionListener {
downloaderPopupThread.start();
}
}
private void refreshChecklist() {
ImageIcon positive = new ImageIcon(Main.class.getResource("/lightPositive.png"));
ImageIcon negative = new ImageIcon(Main.class.getResource("/lightNegative.png"));
if(new File(Main.inpath + "data.psarc").exists())
ipcBase.setIcon(positive); else ipcBase.setIcon(negative);
if(new File(Main.inpath + "data1.psarc").exists())
ipcPatch1.setIcon(positive); else ipcPatch1.setIcon(negative);
if(new File(Main.inpath + "data2.psarc").exists())
ipcPatch2.setIcon(positive); else ipcPatch2.setIcon(negative);
if(new File(Main.inpath + "dlc1.psarc").exists())
ipcDlcHD.setIcon(positive); else ipcDlcHD.setIcon(negative);
if(new File(Main.inpath + "dlc2.psarc").exists())
ipcDlcFury.setIcon(positive); else ipcDlcFury.setIcon(negative);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 5.0 KiB