start ost gen class
This commit is contained in:
parent
3cc78caf62
commit
81e5cbcda3
|
@ -8,9 +8,6 @@
|
|||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
|
@ -32,6 +29,9 @@
|
|||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
|
|
|
@ -139,7 +139,7 @@ public class MissPiggy implements ActionListener {
|
|||
helpMenu.getItem(2).addActionListener(this);
|
||||
helpMenu.getItem(3).addActionListener(this);
|
||||
helpMenu.getItem(5).addActionListener(this);
|
||||
helpMenu.getItem(6).addActionListener(this);
|
||||
helpMenu.getItem(6).addActionListener(this);
|
||||
|
||||
deployButton.addActionListener(this);
|
||||
importButton.addActionListener(this);
|
||||
|
@ -382,7 +382,7 @@ public class MissPiggy implements ActionListener {
|
|||
}
|
||||
|
||||
if (i > 0) {
|
||||
int result = JOptionPane.showConfirmDialog(frame, "A new PSARC will be generated. This can take several minutes.\nDuring this time, your computer may be very busy or slow.\n\nAre you sure you want to continue?", "Deploy Mods", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
|
||||
int result = JOptionPane.showConfirmDialog(frame, "A new PSARC will be generated. This can take several minutes.\nDuring this time, your computer may be very busy or slow.\n\nIt will be placed in: " + Main.outpath + "\n\nAre you sure you want to continue?", "Deploy Mods", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
|
||||
if (result == JOptionPane.YES_OPTION) {
|
||||
// prevent interruptions
|
||||
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Suggs">
|
||||
<grid id="27dc6" binding="frameContainer" 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"/>
|
||||
<grid id="27dc6" binding="frameContainer" layout-manager="GridLayoutManager" row-count="5" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="10" left="10" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
<xy x="20" y="20" width="711" height="400"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
|
@ -11,6 +11,251 @@
|
|||
<foreground color="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
<children>
|
||||
<scrollpane id="bd8d3">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
<opaque value="false"/>
|
||||
</properties>
|
||||
<border type="line" title="Song List">
|
||||
<font name="Exo 2"/>
|
||||
<title-color color="-1"/>
|
||||
<color color="-1"/>
|
||||
</border>
|
||||
<children>
|
||||
<component id="1b9e1" class="javax.swing.JList" binding="dSongList">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
<opaque value="false"/>
|
||||
<selectionBackground color="-2271221"/>
|
||||
<selectionForeground color="-1"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</scrollpane>
|
||||
<grid id="eb54e" layout-manager="GridLayoutManager" row-count="1" 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="4" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
<opaque value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="a7b02" class="javax.swing.JButton" binding="saveBtn">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Save"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="adce7" class="javax.swing.JButton" binding="cancelBtn">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Cancel"/>
|
||||
</properties>
|
||||
</component>
|
||||
<hspacer id="8ecbf">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="cc2" layout-manager="GridLayoutManager" row-count="3" column-count="2" 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="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="aa38f" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Title"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="9667" class="javax.swing.JTextField" binding="fTitle">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="f7802" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Artist"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7fc56" class="javax.swing.JTextField" binding="fArtist">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<grid id="27515" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="fbefd" class="javax.swing.JLabel" binding="dTrackNo">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="6" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="track # here (in MT_xx format)"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a659e" class="javax.swing.JLabel" binding="dFileSize">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="10" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-15128227"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="file size here"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="568f5" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="4" 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>
|
||||
<opaque value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="cc5fd" class="javax.swing.JButton" binding="frontendDemoChooseBtn">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Select Multiplayer Menu Track"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="fb30a" class="javax.swing.JButton" binding="frontendMainChooseBtn">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Select Singleplayer Menu Track"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="e9b40" class="javax.swing.JButton" binding="deleteSongBtn">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Delete Song"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f5254" class="javax.swing.JButton" binding="moveDownBtn">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Move Down"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6b3fa" class="javax.swing.JButton" binding="addSongBtn">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Add Song"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="38ad" class="javax.swing.JButton" binding="moveUpBtn">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-2271221"/>
|
||||
<borderPainted value="false"/>
|
||||
<focusPainted value="false"/>
|
||||
<font name="Exo 2"/>
|
||||
<foreground color="-1"/>
|
||||
<text value="Move Up"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
|
|
|
@ -18,18 +18,33 @@
|
|||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
|
||||
import static javax.swing.WindowConstants.EXIT_ON_CLOSE;
|
||||
|
||||
public class Suggs {
|
||||
public class Suggs implements ActionListener, ListSelectionListener {
|
||||
private BufferedImage windowIcon;
|
||||
public JFrame frame = new JFrame();
|
||||
private JPanel frameContainer;
|
||||
private JList dSongList;
|
||||
private JButton moveDownBtn;
|
||||
private JButton saveBtn;
|
||||
private JButton cancelBtn;
|
||||
private JTextField fTitle;
|
||||
private JTextField fArtist;
|
||||
private JLabel dTrackNo;
|
||||
private JLabel dFileSize;
|
||||
private JButton frontendDemoChooseBtn;
|
||||
private JButton frontendMainChooseBtn;
|
||||
private JButton deleteSongBtn;
|
||||
private JButton addSongBtn;
|
||||
private JButton moveUpBtn;
|
||||
|
||||
public Suggs(JFrame parent) {
|
||||
parent.setEnabled(false);
|
||||
|
@ -46,12 +61,24 @@ public class Suggs {
|
|||
frame.setSize(600, 600);
|
||||
frame.setMinimumSize(new Dimension(600,600));
|
||||
frame.setTitle("Soundtrack Mod Generator");
|
||||
frame.setResizable(true);
|
||||
frame.setResizable(false);
|
||||
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
frame.setLayout(new GridLayout());
|
||||
frame.setLocationRelativeTo(parent);
|
||||
frame.setAlwaysOnTop(true);
|
||||
|
||||
cancelBtn.addActionListener(this); // TODO: put warning dialog "Are you sure? All unsaved changes will be lost."
|
||||
saveBtn.addActionListener(this);
|
||||
addSongBtn.addActionListener(this); // file picker
|
||||
deleteSongBtn.addActionListener(this); // delete from list
|
||||
moveUpBtn.addActionListener(this);
|
||||
moveDownBtn.addActionListener(this);
|
||||
fTitle.addActionListener(this); // automatically change selected item when changed &
|
||||
fArtist.addActionListener(this); // also update field when new item selected
|
||||
frontendMainChooseBtn.addActionListener(this); // file picker for singleplayer campaign grid music
|
||||
frontendDemoChooseBtn.addActionListener(this); // file picker for multiplayer lobby music
|
||||
dSongList.addListSelectionListener(this);
|
||||
|
||||
frame.addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e)
|
||||
|
@ -67,4 +94,14 @@ public class Suggs {
|
|||
private void haveSeggs() { // kill yourself
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent actionEvent) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent listSelectionEvent) { // TODO: change fields on form, show file size, and show MT_(track number) when selection changed.
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user