Skip to content

Commit

Permalink
Merging content
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakjm committed Mar 29, 2019
1 parent 3a5c460 commit fedbf8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/java/Talkbox/configurer/ButtonConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public ButtonConfiguration(String buttonText, File buttonDir) {

/**
* Add image file to the button configuration.
*
* @param image The image file (JPEG or PNG).
*/
public void addImageFile(File image) {
if (image != null) {

this.imageFile = image;
FileIO.copyFile(image,
new File(this.buttonDir + FileIO.SEP + "sound" + FileIO.SEP + "image." + FileIO.getExt(image)));
Expand Down Expand Up @@ -144,6 +144,7 @@ public String toString() {
return format;
}


public String audioFilePath() {
return this.buttonDir.getPath() + FileIO.SEP + "sound" + FileIO.SEP + "sound.wav";
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/Talkbox/configurer/SetUpPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,7 @@ else if (event.getSource() == playSound) {
button.setText(nameField.getText());
button.addColor(currentColor);
button.addSoundFile(currentAudioFile);
// TODO: set local variable for selected image --> button.addImageFile(selectedImage)
//button.addImageFile(currentImageFile);
button.addImageFile(currentImageFile);
currentButton.setConfiguration(currentButton.getConfiguration());
hideSetupFrame();
}
Expand Down Expand Up @@ -847,6 +846,7 @@ else if(event.getSource() == square) {
}
else if(event.getSource() == confirmImage) {


}
}
}
Expand Down

0 comments on commit fedbf8c

Please sign in to comment.