Musique fini

julien
ZIRTR0X 4 years ago
parent e1ac6ce7c7
commit 1cd31bc2a1

@ -1,22 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.Shadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.*?>
<?import java.net.URL?>
<AnchorPane>
<ImageView fitHeight="600.0" fitWidth="1300" layoutX="133.0" layoutY="150.0" pickOnBounds="true" preserveRatio="true"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<Image url="/image/plaine.gif"/>
</ImageView>
<Rectangle arcHeight="5.0" arcWidth="5.0" height="600.0" layoutX="50" opacity="0.42" stroke="BLACK"
strokeType="INSIDE" width="800.0"/>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="662.0" fitWidth="979.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="/image/plaine.gif" />
</image>
</ImageView>
<Rectangle arcHeight="5.0" arcWidth="5.0" height="600.0" layoutX="78.0" opacity="0.42" stroke="BLACK" strokeType="INSIDE" width="745.0" />
</children>
</AnchorPane>

@ -13,6 +13,8 @@
<?import javafx.scene.text.Font?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.ToggleGroup?>
<AnchorPane fx:id="levelRoot" xmlns:fx="http://javafx.com/fxml/1" id="pane" maxHeight="-Infinity" maxWidth="-Infinity"
minHeight="-Infinity"
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"
@ -37,13 +39,21 @@
</Label>
<Line endX="181.0" endY="-3.0517578125E-5" layoutX="107.0" layoutY="160.0" startX="1.0889129638671875"
startY="-1.52587890625E-5" stroke="#535252"/>
<JFXToggleButton prefHeight="33.0" prefWidth="75.0" selected="true" textFill="WHITE"
toggleColor="#8e8c8c"
toggleLineColor="WHITE" unToggleLineColor="#99999981"/>
<JFXToggleButton prefHeight="33.0" prefWidth="75.0" textFill="WHITE" toggleColor="#8e8c8c"
toggleLineColor="WHITE" unToggleLineColor="#99999981"/>
<JFXToggleButton prefHeight="33.0" prefWidth="75.0" textFill="WHITE" toggleColor="#8e8c8c"
toggleLineColor="WHITE" unToggleLineColor="#99999981"/>
<RadioButton fx:id="radioButton1" layoutX="85" layoutY="200" prefHeight="33.0" prefWidth="75.0" selected="true" textFill="WHITE">
<toggleGroup>
<ToggleGroup fx:id="group"/>
</toggleGroup>
</RadioButton>
<RadioButton fx:id="radioButton2" layoutX="160" layoutY="200" prefHeight="33.0" prefWidth="75.0" textFill="WHITE">
<toggleGroup>
<fx:reference source="group"/>
</toggleGroup>
</RadioButton>
<RadioButton fx:id="radioButton3" layoutX="238" layoutY="200" prefHeight="33.0" prefWidth="75.0" textFill="WHITE">
<toggleGroup>
<fx:reference source="group"/>
</toggleGroup>
</RadioButton>
<Line endX="240.5999755859375" endY="-3.0517578125E-5" layoutX="47.0" layoutY="467.0"
startX="1.0889129638671875"
startY="-1.52587890625E-5" stroke="#535252"/>
@ -69,7 +79,7 @@
<Font name="Segoe UI Black" size="12.0"/>
</font>
</Label>
<ImageView fitHeight="126.0" fitWidth="109.0" layoutX="38.0" layoutY="309.0" pickOnBounds="true"
<ImageView fx:id="ImageChange" fitHeight="126.0" fitWidth="109.0" layoutX="38.0" layoutY="309.0" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="/image/personnage/Perso1.png"/>
@ -78,9 +88,9 @@
<SplitMenuButton alignment="CENTER" contentDisplay="CENTER" layoutX="152.0" layoutY="351.0"
mnemonicParsing="false" text="Choix Personnage">
<items>
<MenuItem mnemonicParsing="false" text="Personnage 1"/>
<MenuItem mnemonicParsing="false" text="Personnage 2"/>
<MenuItem mnemonicParsing="false" text="Personnage 3"/>
<MenuItem onAction="#changeSkin" fx:id="choice1" mnemonicParsing="false" text="Personnage 1"/>
<MenuItem onAction="#changeSkin" fx:id="choice2" mnemonicParsing="false" text="Personnage 2"/>
<MenuItem onAction="#changeSkin" fx:id="choice3" mnemonicParsing="false" text="Personnage 3"/>
</items>
<font>
<Font name="Segoe UI Black" size="12.0"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -20,11 +20,7 @@ import java.util.Objects;
public class Main extends Application {
private static Database currentd;
@Override
public void stop(){
System.out.println("Stopping");
}
private Album song;
@Override
public void start(Stage primaryStage) throws Exception {
@ -40,7 +36,7 @@ public class Main extends Application {
Musique song2 = new Musique("/musique/medieval_musique2.mp3",248000);
Musique song3 = new Musique("/musique/medieval_musique3.mp3",248000);
Musique song4 = new Musique("/musique/medieval_musique4.mp3",209000);
Album song = new Album(musiqueListe);
song = new Album(musiqueListe);
song.addList(song1);
song.addList(song2);
song.addList(song3);
@ -70,6 +66,13 @@ public class Main extends Application {
}
@Override
public void stop(){
System.out.println("Stopping");
song.stop();
}
public static Database getDatabase() {
return currentd;

@ -10,6 +10,7 @@ import java.util.Objects;
public class Album {
private ArrayList<Musique> listeMusiques;
private Thread musicThread;
public Album(ArrayList<Musique> listeMusiques) {
this.listeMusiques = listeMusiques;
@ -36,7 +37,7 @@ public class Album {
i++;
}*/
Thread musicThread = new Thread("musique") {
musicThread = new Thread("musique") {
public void run(){
int i;
Media media;
@ -60,6 +61,9 @@ public class Album {
}
public void stop() {
musicThread.stop();
}
public void addList(Musique musique){
listeMusiques.add(musique);

Loading…
Cancel
Save