rowlf cleanup
This commit is contained in:
parent
aa5d4bb97f
commit
0699bc3644
|
@ -366,7 +366,7 @@ public class MissPiggy implements ActionListener {
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (actionEvent.getSource() == helpMenu.getItem(5)) {StartErnie();} else
|
if (actionEvent.getSource() == helpMenu.getItem(5)) {StartErnie();} else
|
||||||
if (actionEvent.getSource() == helpMenu.getItem(6)) {new Rowlf().displayAboutScreen();}
|
if (actionEvent.getSource() == helpMenu.getItem(6)) {new Rowlf();}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Will likely split the below functions into separate classes to work with intellij GUI designer.
|
// Will likely split the below functions into separate classes to work with intellij GUI designer.
|
||||||
|
|
|
@ -5,16 +5,22 @@
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="1464" height="573"/>
|
<xy x="20" y="20" width="1464" height="573"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-526337"/>
|
||||||
|
</properties>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="a5cc7" class="javax.swing.JLabel" binding="picLabel">
|
<component id="a5cc7" class="javax.swing.JLabel" binding="picLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||||
<maximum-size width="-1" height="100"/>
|
<maximum-size width="333" height="100"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-592129"/>
|
||||||
<text value="Aww fiddlesticks, what now?"/>
|
<text value="Aww fiddlesticks, what now?"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
|
@ -26,6 +32,11 @@
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
|
<background color="-16777216"/>
|
||||||
|
<editable value="false"/>
|
||||||
|
<focusable value="false"/>
|
||||||
|
<font name="Fusion" size="10"/>
|
||||||
|
<foreground color="-5180417"/>
|
||||||
<horizontalAlignment value="0"/>
|
<horizontalAlignment value="0"/>
|
||||||
<text value="Do you think we should appeal to the alien authorities?"/>
|
<text value="Do you think we should appeal to the alien authorities?"/>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -38,6 +49,8 @@
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-592129"/>
|
||||||
<text value="Version Unknown"/>
|
<text value="Version Unknown"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
|
@ -49,6 +62,8 @@
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-592129"/>
|
||||||
<text value="Platform Unknown"/>
|
<text value="Platform Unknown"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -26,21 +26,28 @@ import java.io.IOException;
|
||||||
import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
|
import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
|
||||||
|
|
||||||
public class Rowlf {
|
public class Rowlf {
|
||||||
|
private BufferedImage windowIcon;
|
||||||
JFrame frame = new JFrame();
|
JFrame frame = new JFrame();
|
||||||
JPanel frameContainer;
|
JPanel frameContainer;
|
||||||
BufferedImage logo;
|
Image logo;
|
||||||
JLabel picLabel;
|
JLabel picLabel;
|
||||||
private JTextField informationText;
|
private JTextField informationText;
|
||||||
private JLabel versionLabel;
|
private JLabel versionLabel;
|
||||||
private JLabel environmentLabel;
|
private JLabel environmentLabel;
|
||||||
|
|
||||||
public void displayAboutScreen() {
|
public Rowlf() {
|
||||||
try {
|
try {
|
||||||
logo = ImageIO.read(Main.class.getResourceAsStream("/logo_about.png"));
|
logo = ImageIO.read(Main.class.getResourceAsStream("/logo.png")).getScaledInstance(333, 100, Image.SCALE_SMOOTH);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.out.println("ERROR: Failed to open About screen because we couldn't find an image needed to display the page.");
|
System.out.println("ERROR: Failed to open About screen because we couldn't find an image needed to display the page.");
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||||
|
frame.setIconImage(windowIcon);
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||||
|
}
|
||||||
|
|
||||||
//frame.add(picLabel);
|
//frame.add(picLabel);
|
||||||
frame.add(frameContainer); // initialize window contents -- will be handled by IntelliJ IDEA
|
frame.add(frameContainer); // initialize window contents -- will be handled by IntelliJ IDEA
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user