Little update

This commit is contained in:
iryupnik 2020-05-20 09:19:33 +02:00
parent 100b741b6c
commit cbb077e429
8 changed files with 23 additions and 95 deletions

View File

@ -4,15 +4,19 @@ import ruscz.game.gameOfProd.Windows.WindowOfBattle;
import javax.swing.*;
import java.awt.*;
import static ruscz.game.gameOfProd.Windows.WindowOfBattle.*;
public class ConsoleInput extends JPanel {
private JTextPane input;
private JButton submit;
private JButton list;
private JButton exit;
private final JTextPane input;
private final JButton submit;
private final JButton list;
private final JButton exit;
public ConsoleInput(WindowOfBattle window) {
setLayout(new GridLayout(2, 2));
setSize(CELL_SIZE * (CANVAS_WIDTH - 4), CELL_SIZE);
setLocation(CELL_SIZE * 4, CELL_SIZE * CANVAS_HEIGHT * 3 / 4 - CELL_SIZE);
setVisible(false);
@ -39,8 +43,8 @@ public class ConsoleInput extends JPanel {
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().getEscape().setEnabled(true);
});
add(input);

View File

@ -8,12 +8,14 @@ import java.awt.*;
import static ruscz.game.gameOfProd.Windows.WindowOfBattle.*;
public class MenuOfActions extends JPanel {
private JButton attack;
private JButton console;
private JButton inventory;
private JButton escape;
private final JButton attack;
private final JButton console;
private final JButton inventory;
private final JButton escape;
public MenuOfActions(WindowOfBattle window) {
setLayout(new GridLayout(4,1));
setSize(CELL_SIZE * CANVAS_WIDTH / 3, CELL_SIZE * CANVAS_HEIGHT / 4);
setLocation(CELL_SIZE * CANVAS_WIDTH * 2 / 3, CELL_SIZE * CANVAS_HEIGHT * 3 / 4);
setBackground(Color.green);

View File

@ -12,11 +12,11 @@ import java.awt.*;
public class Game extends JFrame {
private static final int WINDOW_WIDTH = 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 WindowOfFreeMove freeMove;
private WindowOfBattle battle;
private final WindowOfMenu menu;
private final WindowOfFreeMove freeMove;
private final WindowOfBattle battle;
private TilesetOverview tilesetOverview;
public WindowOfMenu getMenu() {
@ -41,7 +41,7 @@ public class Game extends JFrame {
battle = new WindowOfBattle(this);
//tohle spustí na začátku menu
// add(menu);
add(menu);
//tohle spustí na začátku hru
// add(freeMove);
@ -52,7 +52,7 @@ public class Game extends JFrame {
// battle.startBattle();
//Tohle spustí na začátku tileset overview
new LevelEditor();
// new LevelEditor();
setDefaultCloseOperation(EXIT_ON_CLOSE);
setUndecorated(true);

View File

@ -17,7 +17,7 @@ import java.io.IOException;
import java.util.LinkedList;
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_HEIGHT = 50;
public static final int WINDOW_WIDTH = 13;

View File

@ -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>

View File

@ -1,6 +0,0 @@
<item>
<name>blue-key-card</name>
<multiplicity>1</multiplicity>
<image>39</image>
<action>key</action>
</item>

View File

@ -1,6 +0,0 @@
<location>
<map>openspace</map>
<x>8</x>
<y>16</y>
<direction>3</direction>
</location>

View File

@ -1 +0,0 @@
TODO: Village