Little update
This commit is contained in:
parent
100b741b6c
commit
cbb077e429
@ -4,15 +4,19 @@ import ruscz.game.gameOfProd.Windows.WindowOfBattle;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
import static ruscz.game.gameOfProd.Windows.WindowOfBattle.*;
|
import static ruscz.game.gameOfProd.Windows.WindowOfBattle.*;
|
||||||
|
|
||||||
public class ConsoleInput extends JPanel {
|
public class ConsoleInput extends JPanel {
|
||||||
private JTextPane input;
|
private final JTextPane input;
|
||||||
private JButton submit;
|
private final JButton submit;
|
||||||
private JButton list;
|
private final JButton list;
|
||||||
private JButton exit;
|
private final JButton exit;
|
||||||
|
|
||||||
public ConsoleInput(WindowOfBattle window) {
|
public ConsoleInput(WindowOfBattle window) {
|
||||||
|
setLayout(new GridLayout(2, 2));
|
||||||
|
|
||||||
setSize(CELL_SIZE * (CANVAS_WIDTH - 4), CELL_SIZE);
|
setSize(CELL_SIZE * (CANVAS_WIDTH - 4), CELL_SIZE);
|
||||||
setLocation(CELL_SIZE * 4, CELL_SIZE * CANVAS_HEIGHT * 3 / 4 - CELL_SIZE);
|
setLocation(CELL_SIZE * 4, CELL_SIZE * CANVAS_HEIGHT * 3 / 4 - CELL_SIZE);
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
@ -39,8 +43,8 @@ public class ConsoleInput extends JPanel {
|
|||||||
|
|
||||||
window.getMenuOfActions().getAttack().setEnabled(true);
|
window.getMenuOfActions().getAttack().setEnabled(true);
|
||||||
window.getMenuOfActions().getConsole().setEnabled(true);
|
window.getMenuOfActions().getConsole().setEnabled(true);
|
||||||
window.getMenuOfActions().getConsole().setEnabled(true);
|
window.getMenuOfActions().getInventory().setEnabled(true);
|
||||||
window.getMenuOfActions().getConsole().setEnabled(true);
|
window.getMenuOfActions().getEscape().setEnabled(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
add(input);
|
add(input);
|
||||||
|
|||||||
@ -8,12 +8,14 @@ import java.awt.*;
|
|||||||
import static ruscz.game.gameOfProd.Windows.WindowOfBattle.*;
|
import static ruscz.game.gameOfProd.Windows.WindowOfBattle.*;
|
||||||
|
|
||||||
public class MenuOfActions extends JPanel {
|
public class MenuOfActions extends JPanel {
|
||||||
private JButton attack;
|
private final JButton attack;
|
||||||
private JButton console;
|
private final JButton console;
|
||||||
private JButton inventory;
|
private final JButton inventory;
|
||||||
private JButton escape;
|
private final JButton escape;
|
||||||
|
|
||||||
public MenuOfActions(WindowOfBattle window) {
|
public MenuOfActions(WindowOfBattle window) {
|
||||||
|
setLayout(new GridLayout(4,1));
|
||||||
|
|
||||||
setSize(CELL_SIZE * CANVAS_WIDTH / 3, CELL_SIZE * CANVAS_HEIGHT / 4);
|
setSize(CELL_SIZE * CANVAS_WIDTH / 3, CELL_SIZE * CANVAS_HEIGHT / 4);
|
||||||
setLocation(CELL_SIZE * CANVAS_WIDTH * 2 / 3, CELL_SIZE * CANVAS_HEIGHT * 3 / 4);
|
setLocation(CELL_SIZE * CANVAS_WIDTH * 2 / 3, CELL_SIZE * CANVAS_HEIGHT * 3 / 4);
|
||||||
setBackground(Color.green);
|
setBackground(Color.green);
|
||||||
|
|||||||
@ -12,11 +12,11 @@ import java.awt.*;
|
|||||||
public class Game extends JFrame {
|
public class Game extends JFrame {
|
||||||
private static final int WINDOW_WIDTH = 13;
|
private static final int WINDOW_WIDTH = 13;
|
||||||
private static final int WINDOW_HEIGHT = 13;
|
private static final int WINDOW_HEIGHT = 13;
|
||||||
public static final int CELL_SIZE = 50;
|
public static final int CELL_SIZE = 60;
|
||||||
|
|
||||||
private WindowOfMenu menu;
|
private final WindowOfMenu menu;
|
||||||
private WindowOfFreeMove freeMove;
|
private final WindowOfFreeMove freeMove;
|
||||||
private WindowOfBattle battle;
|
private final WindowOfBattle battle;
|
||||||
private TilesetOverview tilesetOverview;
|
private TilesetOverview tilesetOverview;
|
||||||
|
|
||||||
public WindowOfMenu getMenu() {
|
public WindowOfMenu getMenu() {
|
||||||
@ -41,7 +41,7 @@ public class Game extends JFrame {
|
|||||||
battle = new WindowOfBattle(this);
|
battle = new WindowOfBattle(this);
|
||||||
|
|
||||||
//tohle spustí na začátku menu
|
//tohle spustí na začátku menu
|
||||||
// add(menu);
|
add(menu);
|
||||||
|
|
||||||
//tohle spustí na začátku hru
|
//tohle spustí na začátku hru
|
||||||
// add(freeMove);
|
// add(freeMove);
|
||||||
@ -52,7 +52,7 @@ public class Game extends JFrame {
|
|||||||
// battle.startBattle();
|
// battle.startBattle();
|
||||||
|
|
||||||
//Tohle spustí na začátku tileset overview
|
//Tohle spustí na začátku tileset overview
|
||||||
new LevelEditor();
|
// new LevelEditor();
|
||||||
|
|
||||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||||
setUndecorated(true);
|
setUndecorated(true);
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import java.io.IOException;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
public class WindowOfFreeMove extends JLayeredPane {
|
public class WindowOfFreeMove extends JLayeredPane {
|
||||||
public static final int CELL_SIZE = 50;
|
public static final int CELL_SIZE = 70;
|
||||||
public static int CANVAS_WIDTH = 50;
|
public static int CANVAS_WIDTH = 50;
|
||||||
public static int CANVAS_HEIGHT = 50;
|
public static int CANVAS_HEIGHT = 50;
|
||||||
public static final int WINDOW_WIDTH = 13;
|
public static final int WINDOW_WIDTH = 13;
|
||||||
|
|||||||
@ -1,65 +0,0 @@
|
|||||||
<map>
|
|
||||||
<mapName>tutorial</mapName>
|
|
||||||
<events>
|
|
||||||
<trigger>
|
|
||||||
<x>11</x>
|
|
||||||
<y>6</y>
|
|
||||||
<active>false</active>
|
|
||||||
</trigger>
|
|
||||||
</events>
|
|
||||||
</map>
|
|
||||||
<map>
|
|
||||||
<mapName>openspace</mapName>
|
|
||||||
<events>
|
|
||||||
<trigger>
|
|
||||||
<x>6</x>
|
|
||||||
<y>4</y>
|
|
||||||
<active>true</active>
|
|
||||||
</trigger>
|
|
||||||
<trigger>
|
|
||||||
<x>14</x>
|
|
||||||
<y>16</y>
|
|
||||||
<active>false</active>
|
|
||||||
</trigger>
|
|
||||||
<chest>
|
|
||||||
<x>15</x>
|
|
||||||
<y>7</y>
|
|
||||||
<active>true</active>
|
|
||||||
</chest>
|
|
||||||
</events>
|
|
||||||
</map>
|
|
||||||
<map>
|
|
||||||
<mapName>office</mapName>
|
|
||||||
<events>
|
|
||||||
<trigger>
|
|
||||||
<x>4</x>
|
|
||||||
<y>2</y>
|
|
||||||
<active>false</active>
|
|
||||||
</trigger>
|
|
||||||
<chest>
|
|
||||||
<x>1</x>
|
|
||||||
<y>9</y>
|
|
||||||
<active>false</active>
|
|
||||||
</chest>
|
|
||||||
</events>
|
|
||||||
</map>
|
|
||||||
<map>
|
|
||||||
<mapName>boss</mapName>
|
|
||||||
<events>
|
|
||||||
<trigger>
|
|
||||||
<x>4</x>
|
|
||||||
<y>18</y>
|
|
||||||
<active>true</active>
|
|
||||||
</trigger>
|
|
||||||
</events>
|
|
||||||
</map>
|
|
||||||
<map>
|
|
||||||
<mapName>treasure</mapName>
|
|
||||||
<events>
|
|
||||||
<trigger>
|
|
||||||
<x>6</x>
|
|
||||||
<y>1</y>
|
|
||||||
<active>true</active>
|
|
||||||
</trigger>
|
|
||||||
</events>
|
|
||||||
</map>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<item>
|
|
||||||
<name>blue-key-card</name>
|
|
||||||
<multiplicity>1</multiplicity>
|
|
||||||
<image>39</image>
|
|
||||||
<action>key</action>
|
|
||||||
</item>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<location>
|
|
||||||
<map>openspace</map>
|
|
||||||
<x>8</x>
|
|
||||||
<y>16</y>
|
|
||||||
<direction>3</direction>
|
|
||||||
</location>
|
|
||||||
@ -1 +0,0 @@
|
|||||||
TODO: Village
|
|
||||||
Loading…
x
Reference in New Issue
Block a user