Skip to content

Commit

Permalink
Add sound icons to the github directory
Browse files Browse the repository at this point in the history
- Add back,forward,next,pause,play,previous,record,record_on,repeat,shuffle,shuffle_on, and stop icons
- Move mute & volume icons to correct directory
- Icons will be used for RPTools#615
- Icons provided by @JamzTheMan

Co-Authored-By: Jamz <[email protected]>
  • Loading branch information
Merudo and JamzTheMan committed Sep 11, 2019
1 parent 6604900 commit e4a1e8f
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/main/java/net/rptools/maptool/client/ui/ToolbarPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.util.Hashtable;
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
Expand Down Expand Up @@ -133,8 +134,8 @@ public ToolbarPanel(Toolbox tbox) {
// the Volume icon
add(
createMuteButton(
"net/rptools/maptool/client/image/tool/mute.png",
"net/rptools/maptool/client/image/tool/volume.png",
"net/rptools/maptool/client/image/audio/mute.png",
"net/rptools/maptool/client/image/audio/volume.png",
I18N.getText("tools.mute.tooltip"),
I18N.getText("tools.unmute.tooltip")));

Expand Down Expand Up @@ -391,8 +392,8 @@ public void actionPerformed(ActionEvent e) {
});

try {
button.setIcon(new ImageIcon(ImageUtil.getImage(offIcon)));
button.setSelectedIcon(new ImageIcon(ImageUtil.getImage(icon)));
button.setIcon(createIcon(offIcon, 25, 25));
button.setSelectedIcon(createIcon(icon, 25, 25));
} catch (IOException ioe) {
ioe.printStackTrace();
}
Expand All @@ -402,6 +403,13 @@ public void actionPerformed(ActionEvent e) {
return button;
}

private ImageIcon createIcon(String strResource, int w, int h) throws IOException {
return ImageUtil.resizeImage(
new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream(strResource))),
w,
h);
}

private JToggleButton createTokenSelectionButton(
final String icon, final String offIcon, String tooltip, TokenSelection tokenSelection) {
final JToggleButton button = new JToggleButton();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e4a1e8f

Please sign in to comment.