Browse Source

Small changes

The images now scale at runtime
master
Sogomn 9 years ago
parent
commit
887556f4a1
  1. BIN
      Ratty/res/gui_icon.png
  2. BIN
      Ratty/res/menu_icons.png
  3. BIN
      Ratty/res/menu_icons_tree.png
  4. 2
      Ratty/src/de/sogomn/rat/Ratty.java
  5. 5
      Ratty/src/de/sogomn/rat/server/gui/FileTree.java
  6. 5
      Ratty/src/de/sogomn/rat/server/gui/RattyGui.java

BIN
Ratty/res/gui_icon.png

Before

Width: 16  |  Height: 16  |  Size: 168 B

After

Width: 16  |  Height: 16  |  Size: 176 B

BIN
Ratty/res/menu_icons.png

Before

Width: 128  |  Height: 96  |  Size: 981 B

After

Width: 64  |  Height: 48  |  Size: 740 B

BIN
Ratty/res/menu_icons_tree.png

Before

Width: 96  |  Height: 64  |  Size: 670 B

After

Width: 48  |  Height: 32  |  Size: 522 B

2
Ratty/src/de/sogomn/rat/Ratty.java

@ -25,7 +25,7 @@ import de.sogomn.rat.server.gui.RattyGuiController;
*/ */
public final class Ratty { public final class Ratty {
public static final boolean DEBUG = false;
public static final boolean DEBUG = true;
public static final String VERSION = "1.3"; public static final String VERSION = "1.3";
public static final ResourceBundle LANGUAGE = ResourceBundle.getBundle("language.lang"); public static final ResourceBundle LANGUAGE = ResourceBundle.getBundle("language.lang");

5
Ratty/src/de/sogomn/rat/server/gui/FileTree.java

@ -1,6 +1,6 @@
package de.sogomn.rat.server.gui; package de.sogomn.rat.server.gui;
import static de.sogomn.rat.Ratty.*;
import static de.sogomn.rat.Ratty.LANGUAGE;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -21,6 +21,7 @@ import javax.swing.tree.TreePath;
import de.sogomn.engine.fx.SpriteSheet; import de.sogomn.engine.fx.SpriteSheet;
import de.sogomn.engine.util.AbstractListenerContainer; import de.sogomn.engine.util.AbstractListenerContainer;
import de.sogomn.engine.util.ImageUtils;
public final class FileTree extends AbstractListenerContainer<IGuiController> { public final class FileTree extends AbstractListenerContainer<IGuiController> {
@ -37,7 +38,7 @@ public final class FileTree extends AbstractListenerContainer<IGuiController> {
private static final String ROOT_NAME = ""; private static final String ROOT_NAME = "";
private static final Dimension DEFAULT_SIZE = new Dimension(500, 500); private static final Dimension DEFAULT_SIZE = new Dimension(500, 500);
private static final BufferedImage[] MENU_ICONS = new SpriteSheet("/menu_icons_tree.png", 32, 32).getSprites();
private static final BufferedImage[] MENU_ICONS = new SpriteSheet(ImageUtils.scaleImage(ImageUtils.loadImage("/menu_icons_tree.png"), 2), 16 * 2, 16 * 2).getSprites();
public static final String REQUEST = LANGUAGE.getString("action.request_files"); public static final String REQUEST = LANGUAGE.getString("action.request_files");
public static final String DOWNLOAD = LANGUAGE.getString("action.download"); public static final String DOWNLOAD = LANGUAGE.getString("action.download");

5
Ratty/src/de/sogomn/rat/server/gui/RattyGui.java

@ -53,8 +53,9 @@ final class RattyGui extends AbstractListenerContainer<IGuiController> {
private static final BufferedImage GUI_ICON_SMALL = ImageUtils.loadImage("/gui_icon.png"); private static final BufferedImage GUI_ICON_SMALL = ImageUtils.loadImage("/gui_icon.png");
private static final BufferedImage GUI_ICON_MEDIUM = ImageUtils.scaleImage(ImageUtils.loadImage("/gui_icon.png"), 64, 64); private static final BufferedImage GUI_ICON_MEDIUM = ImageUtils.scaleImage(ImageUtils.loadImage("/gui_icon.png"), 64, 64);
private static final BufferedImage GUI_ICON_LARGE = ImageUtils.scaleImage(ImageUtils.loadImage("/gui_icon.png"), 128, 128); private static final BufferedImage GUI_ICON_LARGE = ImageUtils.scaleImage(ImageUtils.loadImage("/gui_icon.png"), 128, 128);
private static final List<BufferedImage> GUI_ICONS = Arrays.asList(GUI_ICON_SMALL, GUI_ICON_MEDIUM, GUI_ICON_LARGE);
private static final BufferedImage[] MENU_ICONS = new SpriteSheet("/menu_icons.png", 32, 32).getSprites();
private static final BufferedImage GUI_ICON_HUGE = ImageUtils.scaleImage(ImageUtils.loadImage("/gui_icon.png"), 128, 128);
private static final List<BufferedImage> GUI_ICONS = Arrays.asList(GUI_ICON_SMALL, GUI_ICON_MEDIUM, GUI_ICON_LARGE, GUI_ICON_HUGE);
private static final BufferedImage[] MENU_ICONS = new SpriteSheet(ImageUtils.scaleImage(ImageUtils.loadImage("/menu_icons.png"), 2), 16 * 2, 16 * 2).getSprites();
public static final String POPUP = LANGUAGE.getString("action.popup"); public static final String POPUP = LANGUAGE.getString("action.popup");
public static final String SCREENSHOT = LANGUAGE.getString("action.screenshot"); public static final String SCREENSHOT = LANGUAGE.getString("action.screenshot");

Loading…
Cancel
Save