mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 12:23:05 +02:00
Merge pull request #1777 from Alberth289346/leveledit-fixes
[rdy] Leveledit fixes
This commit is contained in:
@@ -14,7 +14,8 @@ to compile. An alternative is to issue the following commands while in this
|
||||
folder:
|
||||
|
||||
Compile:
|
||||
javac -d bin -sourcepath src src/com/corsixth/leveledit/Main.java
|
||||
1. javac -d bin -sourcepath src src/com/corsixth/leveledit/Main.java
|
||||
2. Copy icon images (src/icon*.png) to bin directory (getting bin/icon*png files).
|
||||
|
||||
Run:
|
||||
java -cp bin com.corsixth.leveledit.Main
|
||||
@@ -22,7 +23,6 @@ java -cp bin com.corsixth.leveledit.Main
|
||||
------------------------------------------------------------------------------
|
||||
-- Contact Details
|
||||
------------------------------------------------------------------------------
|
||||
Homepage: http://th.corsix.org/
|
||||
Forum: http://forums.corsixth.com/
|
||||
Homepage: https://github.com/CorsixTH/CorsixTH
|
||||
Mailing list: http://groups.google.com/group/corsix-th-dev
|
||||
IRC: #corsix-th on FreeNode
|
||||
|
@@ -53,7 +53,7 @@ public class Emergency {
|
||||
|
||||
JPanel emergencyPanel = new JPanel();
|
||||
|
||||
JComboBox illnessCombo = new JComboBox(diseases);
|
||||
JComboBox<String> illnessCombo = new JComboBox<>(diseases);
|
||||
JLabel minPatientsLabel = new JLabel("Patients min:");
|
||||
JLabel maxPatientsLabel = new JLabel("Patients max:");
|
||||
JLabel startMonthLabel = new JLabel("Start month:");
|
||||
@@ -66,5 +66,4 @@ public class Emergency {
|
||||
JTextField endMonthTF = new JTextField(Integer.toString(endMonth), 2);
|
||||
JTextField percWinTF = new JTextField(Integer.toString(percWin), 2);
|
||||
JTextField bonusTF = new JTextField(Integer.toString(bonus), 5);
|
||||
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,9 +38,9 @@ import javax.swing.JOptionPane;
|
||||
|
||||
/**
|
||||
* Create menu and tabBar, set window size, location and on-exit-behaviour.
|
||||
*
|
||||
*
|
||||
* @author Koanxd
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class Gui extends JFrame {
|
||||
|
||||
@@ -54,22 +55,24 @@ public class Gui extends JFrame {
|
||||
FileChooser fileChooser = new FileChooser(this);
|
||||
|
||||
public Gui() {
|
||||
List<Image> icons = new ArrayList<>();
|
||||
icons.add(Toolkit.getDefaultToolkit().getImage(
|
||||
ClassLoader.getSystemResource("icon256.png")));
|
||||
icons.add(Toolkit.getDefaultToolkit().getImage(
|
||||
ClassLoader.getSystemResource("icon128.png")));
|
||||
icons.add(Toolkit.getDefaultToolkit().getImage(
|
||||
ClassLoader.getSystemResource("icon64.png")));
|
||||
icons.add(Toolkit.getDefaultToolkit().getImage(
|
||||
ClassLoader.getSystemResource("icon48.png")));
|
||||
icons.add(Toolkit.getDefaultToolkit().getImage(
|
||||
ClassLoader.getSystemResource("icon32.png")));
|
||||
icons.add(Toolkit.getDefaultToolkit().getImage(
|
||||
ClassLoader.getSystemResource("icon24.png")));
|
||||
icons.add(Toolkit.getDefaultToolkit().getImage(
|
||||
ClassLoader.getSystemResource("icon16.png")));
|
||||
setIconImages(icons);
|
||||
String[] iconNames = {"icon256.png", "icon128.png", "icon64.png",
|
||||
"icon48.png", "icon32.png", "icon24.png", "icon16.png"};
|
||||
|
||||
// Load icon files, and set them as application image.
|
||||
List<Image> icons = new ArrayList<>(iconNames.length);
|
||||
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||
for (String fname: iconNames) {
|
||||
URL iconUrl = ClassLoader.getSystemResource(fname);
|
||||
Image img = (iconUrl == null) ? null : tk.getImage(iconUrl);
|
||||
if (img == null) {
|
||||
System.out.printf("Warning: Could not load resource \"%s\".\n", fname);
|
||||
} else {
|
||||
icons.add(img);
|
||||
}
|
||||
}
|
||||
if (!icons.isEmpty()) {
|
||||
setIconImages(icons);
|
||||
}
|
||||
|
||||
setTitle("CorsixTH Level Editor");
|
||||
|
||||
|
@@ -41,7 +41,7 @@ public class StartStaff {
|
||||
|
||||
JPanel startStaffPanel = new JPanel();
|
||||
|
||||
JComboBox staffMemberCombo = new JComboBox(staffChoice);
|
||||
JComboBox<String> staffMemberCombo = new JComboBox<>(staffChoice);
|
||||
JCheckBox shrinkCB = new JCheckBox();
|
||||
JCheckBox surgeonCB = new JCheckBox();
|
||||
JCheckBox researcherCB = new JCheckBox();
|
||||
|
Reference in New Issue
Block a user