Traduction
This commit is contained in:
commit
159b34ab38
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
16
.idea/libraries/lib.xml
generated
Normal file
16
.idea/libraries/lib.xml
generated
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="lib">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx-swt.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx.controls.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx.web.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx.base.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx.fxml.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx.media.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx.graphics.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javafx.swing.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
10
.idea/libraries/lib1.xml
generated
Normal file
10
.idea/libraries/lib1.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="lib1">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$PROJECT_DIR$/javafx-sdk-11.0.2/lib" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/javafx-sdk-11.0.2/lib" recursive="false" />
|
||||||
|
</library>
|
||||||
|
</component>
|
9
.idea/misc.xml
generated
Normal file
9
.idea/misc.xml
generated
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptSettings">
|
||||||
|
<option name="languageLevel" value="ES6" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" default="false" project-jdk-name="14" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/git2.iml" filepath="$PROJECT_DIR$/git2.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
262
database.sql
262
database.sql
@ -1,262 +0,0 @@
|
|||||||
-- Database: ShadowHunterDatabase
|
|
||||||
|
|
||||||
-- DROP DATABASE "ShadowHunterDatabase";
|
|
||||||
|
|
||||||
CREATE DATABASE "ShadowHunterDatabase"
|
|
||||||
WITH
|
|
||||||
OWNER = postgres
|
|
||||||
ENCODING = 'UTF8'
|
|
||||||
LC_COLLATE = 'French_France.1252'
|
|
||||||
LC_CTYPE = 'French_France.1252'
|
|
||||||
TABLESPACE = pg_default
|
|
||||||
CONNECTION LIMIT = -1;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- PostgreSQL database dump
|
|
||||||
--
|
|
||||||
|
|
||||||
-- Dumped from database version 12.2
|
|
||||||
-- Dumped by pg_dump version 12.2
|
|
||||||
|
|
||||||
-- Started on 2020-04-27 15:16:34
|
|
||||||
|
|
||||||
SET statement_timeout = 0;
|
|
||||||
SET lock_timeout = 0;
|
|
||||||
SET idle_in_transaction_session_timeout = 0;
|
|
||||||
SET client_encoding = 'UTF8';
|
|
||||||
SET standard_conforming_strings = on;
|
|
||||||
SELECT pg_catalog.set_config('search_path', '', false);
|
|
||||||
SET check_function_bodies = false;
|
|
||||||
SET xmloption = content;
|
|
||||||
SET client_min_messages = warning;
|
|
||||||
SET row_security = off;
|
|
||||||
|
|
||||||
SET default_tablespace = '';
|
|
||||||
|
|
||||||
SET default_table_access_method = heap;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 202 (class 1259 OID 16700)
|
|
||||||
-- Name: CartesLumiere; Type: TABLE; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE public."CartesLumiere" (
|
|
||||||
id integer NOT NULL,
|
|
||||||
nom text NOT NULL,
|
|
||||||
image bytea
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE public."CartesLumiere" OWNER TO postgres;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 205 (class 1259 OID 16724)
|
|
||||||
-- Name: CartesPersonnage; Type: TABLE; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE public."CartesPersonnage" (
|
|
||||||
id integer NOT NULL,
|
|
||||||
nom text NOT NULL,
|
|
||||||
image bytea
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE public."CartesPersonnage" OWNER TO postgres;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 203 (class 1259 OID 16708)
|
|
||||||
-- Name: CartesTenebre; Type: TABLE; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE public."CartesTenebre" (
|
|
||||||
id integer NOT NULL,
|
|
||||||
nom text NOT NULL,
|
|
||||||
image bytea
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE public."CartesTenebre" OWNER TO postgres;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 204 (class 1259 OID 16716)
|
|
||||||
-- Name: CartesVision; Type: TABLE; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE public."CartesVision" (
|
|
||||||
id integer NOT NULL,
|
|
||||||
nom text NOT NULL,
|
|
||||||
image bytea
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE public."CartesVision" OWNER TO postgres;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 206 (class 1259 OID 16732)
|
|
||||||
-- Name: CartesAll; Type: VIEW; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE VIEW public."CartesAll" AS
|
|
||||||
SELECT "CartesLumiere".id,
|
|
||||||
"CartesLumiere".nom,
|
|
||||||
"CartesLumiere".image
|
|
||||||
FROM public."CartesLumiere"
|
|
||||||
UNION
|
|
||||||
SELECT "CartesTenebre".id,
|
|
||||||
"CartesTenebre".nom,
|
|
||||||
"CartesTenebre".image
|
|
||||||
FROM public."CartesTenebre"
|
|
||||||
UNION
|
|
||||||
SELECT "CartesVision".id,
|
|
||||||
"CartesVision".nom,
|
|
||||||
"CartesVision".image
|
|
||||||
FROM public."CartesVision"
|
|
||||||
UNION
|
|
||||||
SELECT "CartesPersonnage".id,
|
|
||||||
"CartesPersonnage".nom,
|
|
||||||
"CartesPersonnage".image
|
|
||||||
FROM public."CartesPersonnage"
|
|
||||||
ORDER BY 1;
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE public."CartesAll" OWNER TO postgres;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2840 (class 0 OID 16700)
|
|
||||||
-- Dependencies: 202
|
|
||||||
-- Data for Name: CartesLumiere; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
COPY public."CartesLumiere" (id, nom, image) FROM stdin;
|
|
||||||
1 Amulette \\x573a5c7368495c6c756d696572655c616d756c657474652e706e67
|
|
||||||
2 Ange Gardien \\x573a5c7368495c6c756d696572655c616e67652d6761726469656e2e706e67
|
|
||||||
3 Avenment Suprême \\x573a5c7368495c6c756d696572655c6176656e6d656e742d73757072656d652e706e67
|
|
||||||
4 Barre de Chocolat \\x573a5c7368495c6c756d696572655c62617272652d64652d63686f636f6c61742e706e67
|
|
||||||
5 Bénédiction \\x573a5c7368495c6c756d696572655c62656e6564696374696f6e2e706e67
|
|
||||||
6 Boussole Mystique \\x573a5c7368495c6c756d696572655c626f7573736f6c652d6d797374697175652e706e67
|
|
||||||
7 Broche De Chance \\x573a5c7368495c6c756d696572655c62726f6368652d64652d6368616e63652e706e67
|
|
||||||
8 Crucifix En Argent \\x573a5c7368495c6c756d696572655c63727563696669782d656e2d617267656e742e706e67
|
|
||||||
9 Eau Bénite \\x573a5c7368495c6c756d696572655c6561752d62656e6974652e706e67
|
|
||||||
10 Eau Bénite \\x573a5c7368495c6c756d696572655c6561752d62656e6974652e706e67
|
|
||||||
11 Eclair Purificateur \\x573a5c7368495c6c756d696572655c65636c6169722d7075726966696361746575722e706e67
|
|
||||||
12 Lance De Longinus \\x573a5c7368495c6c756d696572655c6c616e63652d64652d6c6f6e67696e75732e706e67
|
|
||||||
13 Mirroir Divin \\x573a5c7368495c6c756d696572655c6d6972726f69722d646976696e2e706e67
|
|
||||||
14 Premier Secours \\x573a5c7368495c6c756d696572655c7072656d6965722d7365636f7572732e706e67
|
|
||||||
15 Savoir Ancestral \\x573a5c7368495c6c756d696572655c7361766f69722d616e6365737472616c2e706e67
|
|
||||||
16 Toge Sainte \\x573a5c7368495c6c756d696572655c746f67652d7361696e74652e706e67
|
|
||||||
\.
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2843 (class 0 OID 16724)
|
|
||||||
-- Dependencies: 205
|
|
||||||
-- Data for Name: CartesPersonnage; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
COPY public."CartesPersonnage" (id, nom, image) FROM stdin;
|
|
||||||
48 Alie \\x573a5c7368495c706572736f5c616c69652e706e67
|
|
||||||
49 Bob \\x573a5c7368495c706572736f5c626f622e706e67
|
|
||||||
50 Charles \\x573a5c7368495c706572736f5c636861726c65732e706e67
|
|
||||||
51 Daniel \\x573a5c7368495c706572736f5c64616e69656c2e706e67
|
|
||||||
52 Emi \\x573a5c7368495c706572736f5c656d692e706e67
|
|
||||||
53 Franklin \\x573a5c7368495c706572736f5c6672616e6b6c696e2e706e67
|
|
||||||
54 Georges \\x573a5c7368495c706572736f5c67656f726765732e706e67
|
|
||||||
55 Loup-Garou \\x573a5c7368495c706572736f5c6c6f75702d6761726f752e706e67
|
|
||||||
56 Metamorphe \\x573a5c7368495c706572736f5c6d6574616d6f727068652e706e67
|
|
||||||
57 Vampire \\x573a5c7368495c706572736f5c76616d706972652e706e67
|
|
||||||
\.
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2841 (class 0 OID 16708)
|
|
||||||
-- Dependencies: 203
|
|
||||||
-- Data for Name: CartesTenebre; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
COPY public."CartesTenebre" (id, nom, image) FROM stdin;
|
|
||||||
17 Araignée Sanguinaire \\x573a5c7368495c74656e656272655c61726169676e65652d73616e6775696e616972652e706e67
|
|
||||||
18 Chauve Souris Vampire \\x573a5c7368495c74656e656272655c6368617576652d736f757269732d76616d706972652e706e67
|
|
||||||
19 Chauve Souris Vampire \\x573a5c7368495c74656e656272655c6368617576652d736f757269732d76616d706972652e706e67
|
|
||||||
20 Chauve Souris Vampire \\x573a5c7368495c74656e656272655c6368617576652d736f757269732d76616d706972652e706e67
|
|
||||||
21 Dynamite \\x573a5c7368495c74656e656272655c64796e616d6974652e706e67
|
|
||||||
22 Hache Tueuse \\x573a5c7368495c74656e656272655c68616368652d7475657573652e706e67
|
|
||||||
23 Hachoir Maudit \\x573a5c7368495c74656e656272655c686163686f69722d6d61756469742e706e67
|
|
||||||
24 Mitrailleuse Funueste \\x573a5c7368495c74656e656272655c6d69747261696c6c657573652d66756e75657374652e706e67
|
|
||||||
25 Peau De Banane \\x573a5c7368495c74656e656272655c706561752d64652d62616e616e652e706e67
|
|
||||||
26 Poupée Démoniaque \\x573a5c7368495c74656e656272655c706f757065652d64656d6f6e69617175652e706e67
|
|
||||||
27 Revolver Des Ténèbres \\x573a5c7368495c74656e656272655c7265766f6c7665722d6465732d74656e65627265732e706e67
|
|
||||||
28 Rituel Diabolique \\x573a5c7368495c74656e656272655c72697475656c2d646961626f6c697175652e706e67
|
|
||||||
29 Sabre Hanté Masamune \\x573a5c7368495c74656e656272655c73616272652d68616e74652d6d6173616d756e652e706e67
|
|
||||||
30 Succube Tentatrice \\x573a5c7368495c74656e656272655c737563637562652d74656e746174726963652e706e67
|
|
||||||
31 Succube Tentatrice \\x573a5c7368495c74656e656272655c737563637562652d74656e746174726963652e706e67
|
|
||||||
32 Tronconneuse Du Mal \\x573a5c7368495c74656e656272655c74726f6e636f6e6e657573652d64752d6d616c2e706e67
|
|
||||||
\.
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2842 (class 0 OID 16716)
|
|
||||||
-- Dependencies: 204
|
|
||||||
-- Data for Name: CartesVision; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
COPY public."CartesVision" (id, nom, image) FROM stdin;
|
|
||||||
33 Vision Clairevoyante \\x573a5c7368495c766973696f6e5c766973696f6e2d636c61697265766f79616e74652e706e67
|
|
||||||
34 Vision Cupide \\x573a5c7368495c766973696f6e5c766973696f6e2d6375706964652e706e67
|
|
||||||
35 Vision Cupide \\x573a5c7368495c766973696f6e5c766973696f6e2d6375706964652e706e67
|
|
||||||
36 Vision Destructrice \\x573a5c7368495c766973696f6e5c766973696f6e2d6465737472756374726963652e706e67
|
|
||||||
37 Vision Divine \\x573a5c7368495c766973696f6e5c766973696f6e2d646976696e652e706e67
|
|
||||||
38 Vision Enivrante \\x573a5c7368495c766973696f6e5c766973696f6e2d656e697672616e74652e706e67
|
|
||||||
39 Vision Enivrante \\x573a5c7368495c766973696f6e5c766973696f6e2d656e697672616e74652e706e67
|
|
||||||
40 Vision Foudroyante \\x573a5c7368495c766973696f6e5c766973696f6e2d666f7564726f79616e74652e706e67
|
|
||||||
41 Vision-Furtive \\x573a5c7368495c766973696f6e5c766973696f6e2d667572746976652e706e67
|
|
||||||
42 Vision-Furtive \\x573a5c7368495c766973696f6e5c766973696f6e2d667572746976652e706e67
|
|
||||||
43 Vision Lugubre \\x573a5c7368495c766973696f6e5c766973696f6e2d6c7567756272652e706e67
|
|
||||||
44 Vision Mortifière \\x573a5c7368495c766973696f6e5c766973696f6e2d6d6f72746966696572652e706e67
|
|
||||||
45 Vision Purificatrice \\x573a5c7368495c766973696f6e5c766973696f6e2d707572696669636174726963652e706e67
|
|
||||||
46 Vision Réconfortante \\x573a5c7368495c766973696f6e5c766973696f6e2d7265636f6e666f7274616e74652e706e67
|
|
||||||
47 Vision Suprême \\x573a5c7368495c766973696f6e5c766973696f6e2d73757072656d652e706e67
|
|
||||||
\.
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2706 (class 2606 OID 16707)
|
|
||||||
-- Name: CartesLumiere CartesLumiere_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public."CartesLumiere"
|
|
||||||
ADD CONSTRAINT "CartesLumiere_pkey" PRIMARY KEY (id);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2712 (class 2606 OID 16731)
|
|
||||||
-- Name: CartesPersonnage CartesPersonnage_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public."CartesPersonnage"
|
|
||||||
ADD CONSTRAINT "CartesPersonnage_pkey" PRIMARY KEY (id);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2708 (class 2606 OID 16715)
|
|
||||||
-- Name: CartesTenebre CartesTenebre_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public."CartesTenebre"
|
|
||||||
ADD CONSTRAINT "CartesTenebre_pkey" PRIMARY KEY (id);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- TOC entry 2710 (class 2606 OID 16723)
|
|
||||||
-- Name: CartesVision CartesVision_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public."CartesVision"
|
|
||||||
ADD CONSTRAINT "CartesVision_pkey" PRIMARY KEY (id);
|
|
||||||
|
|
||||||
|
|
||||||
-- Completed on 2020-04-27 15:16:35
|
|
||||||
|
|
||||||
--
|
|
||||||
-- PostgreSQL database dump complete
|
|
||||||
--
|
|
||||||
|
|
12
git2.iml
Normal file
12
git2.iml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="lib1" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
47
src/database/DatabaseTesting.java
Normal file
47
src/database/DatabaseTesting.java
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
package database;
|
||||||
|
|
||||||
|
/*
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class DatabaseTesting {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
/*
|
||||||
|
try (Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/ShadowHunterDatabase", "shManager", "shadowhunter1234")) { //notre utilisateur que l'on utilisera (:
|
||||||
|
|
||||||
|
System.out.println("Connected to PostgreSQL database!");
|
||||||
|
Statement statement = connection.createStatement();
|
||||||
|
System.out.println("Reading records...");
|
||||||
|
System.out.printf("%-20.30s %-30.30s %-30.30s%n", "id", "nom", "image");
|
||||||
|
ResultSet resultSet = statement.executeQuery(QueryGenerator.AllFrom("CartesAll"));
|
||||||
|
//ResultSet resultSet = statement.executeQuery(QueryGenerator.WithId("CartesAll", 15));
|
||||||
|
//ResultSet resultSet = statement.executeQuery(QueryGenerator.WithName("CartesAll", "Vision Cupide"));
|
||||||
|
while (resultSet.next()) {
|
||||||
|
System.out.printf("%-20.30s %-30.30s %-20.30s%n", resultSet.getString("id"), resultSet.getString("nom"), resultSet.getBytes("image")); //resultSet.getBytes("image"));
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (SQLException e) {
|
||||||
|
System.out.println("Connection failure.");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
Table a = new Table("a");
|
||||||
|
a.remplirTable("CartesLumiere");
|
||||||
|
try {
|
||||||
|
ByteaToCardImage.getImg(a.getList().get(5).getImg());
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,7 +24,7 @@ choisir.equipement.a.voler=Choisissez un équipement à voler
|
|||||||
carte.vision=Carte Vision
|
carte.vision=Carte Vision
|
||||||
jouer.a.qui.donner.carte=Choisissez un joueur à qui donner la carte.
|
jouer.a.qui.donner.carte=Choisissez un joueur à qui donner la carte.
|
||||||
effet=Effet :
|
effet=Effet :
|
||||||
catye.vue.par.joiur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche.
|
carte.vue.par.joueur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche.
|
||||||
voir.carte=Voir carte
|
voir.carte=Voir carte
|
||||||
recoit=reçoit
|
recoit=reçoit
|
||||||
blessure=Blessures.
|
blessure=Blessures.
|
||||||
@ -54,3 +54,10 @@ reveler.identite=révèle son identité!
|
|||||||
c.est=C'est
|
c.est=C'est
|
||||||
faction=Faction :
|
faction=Faction :
|
||||||
utiliser.capacite=utilise sa capacité.
|
utiliser.capacite=utilise sa capacité.
|
||||||
|
nom.personnages=Nom Personnage
|
||||||
|
votre.competence=Votre compétence :
|
||||||
|
retourner.carte=Retourner la carte
|
||||||
|
benediction=Bénediction
|
||||||
|
premier.secours=Premier secours
|
||||||
|
voler.equipement.joueur=Volez un équipement au joueurs de votre choix
|
||||||
|
choisir.carte.equipement.a.voler=Cliquez sur la carte équipement que vous voulez voler
|
@ -25,7 +25,7 @@ carte.vision=Vision Card
|
|||||||
jouer.a.qui.donner.carte=Choose a player to give the card to.
|
jouer.a.qui.donner.carte=Choose a player to give the card to.
|
||||||
carte=Card
|
carte=Card
|
||||||
effet=Effect :
|
effet=Effect :
|
||||||
catye.vue.par.joiur.pioche=This card can only be seen by the player who draws it.
|
carte.vue.par.joueur.pioche=This card can only be seen by the player who draws it.
|
||||||
voir.carte=See card
|
voir.carte=See card
|
||||||
recoit=receives
|
recoit=receives
|
||||||
blessure=Injury.
|
blessure=Injury.
|
||||||
@ -55,4 +55,11 @@ reveler.identite=reveals his identity!
|
|||||||
c.est=This is
|
c.est=This is
|
||||||
faction=Faction :
|
faction=Faction :
|
||||||
utiliser.capacite=
|
utiliser.capacite=
|
||||||
uses its capacity.
|
uses its capacity.
|
||||||
|
nom.personnages=Name Character
|
||||||
|
votre.competence=Your competence :
|
||||||
|
retourner.carte=Flip the card
|
||||||
|
benediction=Blessing
|
||||||
|
premier.secours=First aid
|
||||||
|
voler.equipement.joueur=Steal equipment from players of your choice
|
||||||
|
choisir.carte.equipement.a.voler=Click on the equipment card you want to fly
|
@ -25,7 +25,7 @@ carte.vision=Carte Vision
|
|||||||
jouer.a.qui.donner.carte=Choisissez un joueur à qui donner la carte.
|
jouer.a.qui.donner.carte=Choisissez un joueur à qui donner la carte.
|
||||||
carte=Carte
|
carte=Carte
|
||||||
effet=Effet :
|
effet=Effet :
|
||||||
catye.vue.par.joiur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche.
|
carte.vue.par.joueur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche.
|
||||||
voir.carte=Voir carte
|
voir.carte=Voir carte
|
||||||
recoit=reçoit
|
recoit=reçoit
|
||||||
blessure=Blessures.
|
blessure=Blessures.
|
||||||
@ -54,4 +54,11 @@ ne.pas.attaqur=Ne pas attaquer
|
|||||||
reveler.identite=révèle son identité!
|
reveler.identite=révèle son identité!
|
||||||
c.est=C'est
|
c.est=C'est
|
||||||
faction=Faction :
|
faction=Faction :
|
||||||
utiliser.capacite=utilise sa capacité.
|
utiliser.capacite=utilise sa capacité.
|
||||||
|
nom.personnages=Nom Personnage
|
||||||
|
votre.competence=Votre compétence :
|
||||||
|
retourner.carte=Retourner la carte
|
||||||
|
benediction=Bénediction
|
||||||
|
premier.secours=Premier secours
|
||||||
|
voler.equipement.joueur=Volez un équipement au joueurs de votre choix
|
||||||
|
choisir.carte.equipement.a.voler=Cliquez sur la carte équipement que vous voulez voler
|
@ -16,7 +16,7 @@ public class Main extends Application {
|
|||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
System.out.println("Lancement de l'application");
|
System.out.println("Lancement de l'application");
|
||||||
|
|
||||||
final URL fxmlURL = getClass().getResource("ressources/Menu.fxml"); // "ressources/Jouer_tour(1)lancer_des.fxml"
|
final URL fxmlURL = getClass().getResource("ressources/parametre.fxml"); // "ressources/Jouer_tour(1)lancer_des.fxml"
|
||||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||||
Pane root = fxmlLoader.load();
|
Pane root = fxmlLoader.load();
|
||||||
|
@ -6,13 +6,22 @@ import java.util.Random;
|
|||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import carte.CarteLieu;
|
import carte.CarteLieu;
|
||||||
|
import ihm.SpriteAnimation;
|
||||||
|
import javafx.animation.Animation;
|
||||||
|
import javafx.event.Event;
|
||||||
|
import javafx.event.EventHandler;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.geometry.Rectangle2D;
|
||||||
|
import javafx.scene.Group;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.input.MouseEvent;
|
import javafx.scene.input.MouseEvent;
|
||||||
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
import javafx.scene.layout.Pane;
|
import javafx.scene.layout.Pane;
|
||||||
|
import javafx.util.Duration;
|
||||||
import main.Joueur;
|
import main.Joueur;
|
||||||
|
|
||||||
public class JouerSonTour1Controller implements Initializable{
|
public class JouerSonTour1Controller implements Initializable{
|
||||||
@ -20,10 +29,53 @@ public class JouerSonTour1Controller implements Initializable{
|
|||||||
|
|
||||||
@FXML private Pane rootPane;
|
@FXML private Pane rootPane;
|
||||||
@FXML private Label nomJoueur;
|
@FXML private Label nomJoueur;
|
||||||
|
@FXML private AnchorPane d6;
|
||||||
|
@FXML private AnchorPane d4;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
//nomJoueur.setText(joueur.getNom());
|
//nomJoueur.setText(joueur.getNom());
|
||||||
|
|
||||||
|
int OFFSET_X = 0;
|
||||||
|
int OFFSET_Y = 0;
|
||||||
|
int WIDTH = 200;
|
||||||
|
int HEIGHT = 200;
|
||||||
|
int COUNT = 6;
|
||||||
|
int COLUMNS = 6;
|
||||||
|
|
||||||
|
//anchorPane1.getChildren().setAll(imageView);
|
||||||
|
|
||||||
|
|
||||||
|
ImageView imageView;
|
||||||
|
try {
|
||||||
|
imageView = FXMLLoader.load(getClass().getResource("../ressources/img/des.fxml"));
|
||||||
|
imageView.setViewport(new Rectangle2D(OFFSET_X, OFFSET_Y, WIDTH, HEIGHT));
|
||||||
|
|
||||||
|
imageView.fitWidthProperty().bind(d6.widthProperty());
|
||||||
|
final SpriteAnimation animation = new SpriteAnimation(
|
||||||
|
imageView,
|
||||||
|
Duration.millis(250),
|
||||||
|
COUNT, COLUMNS,
|
||||||
|
OFFSET_X, OFFSET_Y,
|
||||||
|
557, 557
|
||||||
|
);
|
||||||
|
animation.setCycleCount(Animation.INDEFINITE);
|
||||||
|
animation.play();
|
||||||
|
d6.getChildren().addAll(new Group(imageView));
|
||||||
|
d6.setOnMousePressed(new EventHandler<Event>(
|
||||||
|
|
||||||
|
) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(Event arg0) {
|
||||||
|
animation.stop();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (IOException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
|
52
src/ihm/controller/ParametreController.java
Normal file
52
src/ihm/controller/ParametreController.java
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package ihm.controller;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
import ihm.Musique;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.CheckBox;
|
||||||
|
import javafx.scene.control.ComboBox;
|
||||||
|
import javafx.scene.input.MouseEvent;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
|
|
||||||
|
public class ParametreController implements Initializable{
|
||||||
|
@FXML private Pane rootPane;
|
||||||
|
@FXML private CheckBox cmusique;
|
||||||
|
@FXML private CheckBox clair;
|
||||||
|
@FXML private ComboBox<String> langues;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
langues.getItems().add("Anglais");
|
||||||
|
langues.getItems().add("Allemand");
|
||||||
|
langues.getItems().add("Espagnol");
|
||||||
|
langues.getItems().add("Français");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/*@FXML
|
||||||
|
public void enregistre(MouseEvent mouseEvent) throws IOException{
|
||||||
|
if(cmusique.isSelected()==true) {
|
||||||
|
|
||||||
|
String filepath = "src//ihm//ressources//musique//The_Red_Fox_Tavern.wav"; // lien vers la musique :
|
||||||
|
// https://www.youtube.com/watch?v=LBpKUIyOHdo
|
||||||
|
Musique musiqueObjet = new Musique();
|
||||||
|
//musiqueObjet.playMusique(filepath);
|
||||||
|
|
||||||
|
Pane root = FXMLLoader.load(getClass().getResource("ressources/parametre.fxml"));
|
||||||
|
//root.setStyle("ressources/style/menuLight.css);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} */
|
||||||
|
|
||||||
|
}
|
@ -2,28 +2,27 @@
|
|||||||
|
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.shape.Polygon?>
|
|
||||||
<?import javafx.scene.shape.Rectangle?>
|
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480.0" prefWidth="640.0" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour1Controller">
|
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480.0" prefWidth="640.0" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour1Controller">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="135.0" layoutY="29.0" text="%au.tour.de">
|
<Label layoutX="135.0" layoutY="29.0" text="C'est au tour de">
|
||||||
<font>
|
<font>
|
||||||
<Font size="36.0" />
|
<Font size="36.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="WHITE" height="174.0" layoutX="130.0" layoutY="149.0" stroke="BLACK" strokeType="INSIDE" width="173.0" />
|
<Button layoutX="262.0" layoutY="388.0" mnemonicParsing="false" onMouseClicked="#lancerDes" text="Lancer les dés">
|
||||||
<Polygon fill="WHITE" layoutX="440.0" layoutY="216.0" points="-75.79998779296875, 98.80001831054688, 97.0, 98.80001831054688, 8.20001220703125, -59.199981689453125" stroke="BLACK" strokeType="INSIDE" />
|
|
||||||
<Button layoutX="262.0" layoutY="388.0" mnemonicParsing="false" onMouseClicked="#lancerDes" text="%lancer.de.des">
|
|
||||||
<font>
|
<font>
|
||||||
<Font size="18.0" />
|
<Font size="18.0" />
|
||||||
</font></Button>
|
</font></Button>
|
||||||
<Label fx:id="nomJoueur" layoutX="405.0" layoutY="29.0" text="%joueur1">
|
<Label fx:id="nomJoueur" layoutX="405.0" layoutY="29.0" text="joueur 1">
|
||||||
<font>
|
<font>
|
||||||
<Font size="36.0" />
|
<Font size="36.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
|
<AnchorPane fx:id="d6" layoutX="91.0" layoutY="140.0" prefHeight="200.0" prefWidth="200.0" />
|
||||||
|
<AnchorPane fx:id="d4" layoutX="379.0" layoutY="140.0" prefHeight="200.0" prefWidth="200.0" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
BIN
src/ihm/ressources/img/dice.sprite.png
Normal file
BIN
src/ihm/ressources/img/dice.sprite.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
42
src/ihm/ressources/parametre.fxml
Normal file
42
src/ihm/ressources/parametre.fxml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.control.CheckBox?>
|
||||||
|
<?import javafx.scene.control.ComboBox?>
|
||||||
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.layout.HBox?>
|
||||||
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
|
<Pane fx:id="rootPane" prefHeight="595.0" prefWidth="758.0" styleClass="background" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ParametreController">
|
||||||
|
<children>
|
||||||
|
<HBox alignment="TOP_CENTER" layoutX="146.0" layoutY="171.0" prefHeight="242.0" prefWidth="507.0" spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<VBox prefHeight="309.0" prefWidth="127.0" spacing="50.0">
|
||||||
|
<children>
|
||||||
|
<CheckBox fx:id="clair" mnemonicParsing="false" styleClass="checkBox" text="Mode clair" />
|
||||||
|
<CheckBox fx:id="cmusique" mnemonicParsing="false" styleClass="checkBox" text="Musique" />
|
||||||
|
<CheckBox mnemonicParsing="false" styleClass="checkBox" text="Effet" />
|
||||||
|
<VBox prefHeight="200.0" prefWidth="100.0" spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<Label styleClass="titre" text="Langue">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<ComboBox fx:id="langues" prefHeight="26.0" prefWidth="90.0" />
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<Label layoutX="309.0" layoutY="23.0" styleClass="titre" text="Paramètre">
|
||||||
|
<font>
|
||||||
|
<Font size="36.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Button layoutX="340.0" layoutY="525.0" mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="Enregistrer" />
|
||||||
|
</children>
|
||||||
|
</Pane>
|
@ -13,4 +13,12 @@
|
|||||||
-fx-background-color: #1d1d1d;
|
-fx-background-color: #1d1d1d;
|
||||||
-fx-text-fill: #d8d8d8;
|
-fx-text-fill: #d8d8d8;
|
||||||
-fx-background-insets: 0 0 0 0, 0, 1, 2;
|
-fx-background-insets: 0 0 0 0, 0, 1, 2;
|
||||||
}
|
}
|
||||||
|
.checkBox {
|
||||||
|
|
||||||
|
-fx-border-width: 2;
|
||||||
|
-fx-background-radius: 0;
|
||||||
|
-fx-background-color: #1d1d1d;
|
||||||
|
-fx-text-fill: #d8d8d8;
|
||||||
|
-fx-background-insets: 0 0 0 0, 0, 1, 2;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user