* @param isMoveLearning
*/
public void initGUI() {
// TRUE = Move Learning
// FALSE = Evolution
m_bg = new Label();
String respath = System.getProperty("res.path");
if(respath==null)
respath="";
try {
f = FileLoader.loadFile(respath+"res/ui/bg.png");
m_bg = new Label(new Image(f, respath+"res/ui", false));
} catch (SlickException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
m_bg.setSize(256, 203);
m_bg.setLocation(0, 142);
getContentPane().add(m_bg);
m_movePane = new Container();
m_movePane.setBackground(new Color(0, 0, 0, 0));
m_movePane.setBounds(2, 140, 257, 201);
move1 = BattleButtonFactory.getButton("");
move2 = BattleButtonFactory.getButton("");
move3 = BattleButtonFactory.getButton("");
move4 = BattleButtonFactory.getButton("");
setResizable(false);
getTitleBar().setVisible(false);
// start attackPane
m_movePane.add(move1);
move1.setLocation(7, 10);
move1.setSize(116, 51);
move1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
replaceMove(0);
}
});
pp1 = new Label();
pp1.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
pp1.setBounds(7, 40, 110, 20);
m_movePane.add(pp1);
m_movePane.add(move2);
move2.setLocation(130, 10);
move2.setSize(116, 51);
move2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
replaceMove(1);
}
});
pp2 = new Label();
pp2.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
pp2.setBounds(130, 40, 110, 20);
m_movePane.add(pp2);
m_movePane.add(move3);
move3.setLocation(7, 65);
move3.setSize(116, 51);
move3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
replaceMove(2);
}
});
pp3 = new Label();
pp3.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
pp3.setBounds(7, 95, 110, 20);
m_movePane.add(pp3);
m_movePane.add(move4);
move4.setLocation(130, 65);
move4.setSize(116, 51);
move4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
replaceMove(3);
}
});
pp4 = new Label();
pp4.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
pp4.setBounds(130, 95, 110, 20);
m_movePane.add(pp4);
m_moveButtons.add(move1);