|
@@ -12,22 +12,21 @@ import lombok.experimental.UtilityClass;
|
|
|
|
|
|
|
|
@UtilityClass
|
|
@UtilityClass
|
|
|
public class DialogBuilder {
|
|
public class DialogBuilder {
|
|
|
- private void createDialogue(final String title, final int x, final int y, final JPanel panel) {
|
|
|
|
|
|
|
+ private void createDialogue(final String title, final JPanel panel) {
|
|
|
final JDialog dialog = new JDialog();
|
|
final JDialog dialog = new JDialog();
|
|
|
dialog.setTitle(title);
|
|
dialog.setTitle(title);
|
|
|
dialog.setModalityType(JDialog.DEFAULT_MODALITY_TYPE);
|
|
dialog.setModalityType(JDialog.DEFAULT_MODALITY_TYPE);
|
|
|
- dialog.setSize(x, y);
|
|
|
|
|
|
|
|
|
|
dialog.setContentPane(panel);
|
|
dialog.setContentPane(panel);
|
|
|
- dialog.setVisible(true);
|
|
|
|
|
dialog.pack();
|
|
dialog.pack();
|
|
|
|
|
+ dialog.setVisible(true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void createSkillDialog(DDCharacter chara, DDCharacterClass dclass) {
|
|
public void createSkillDialog(DDCharacter chara, DDCharacterClass dclass) {
|
|
|
- createDialogue("Level Up - Skill Allocation", 510, 600, new SkillLevelUpDialog(chara, dclass));
|
|
|
|
|
|
|
+ createDialogue("Level Up - Skill Allocation", new SkillLevelUpDialog(chara, dclass));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void createPrepareSpellsDialog(DDCharacter chara, DDCharacterClass dclass) {
|
|
public void createPrepareSpellsDialog(DDCharacter chara, DDCharacterClass dclass) {
|
|
|
- createDialogue("Prepare Spells - " + dclass.getName(), 540, 600, new PrepareSpellsDialog(chara, dclass));
|
|
|
|
|
|
|
+ createDialogue("Prepare Spells - " + dclass.getName(), new PrepareSpellsDialog(chara, dclass));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|