Skip to content
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.

Commit

Permalink
Update 3.2
Browse files Browse the repository at this point in the history
Add icons for "File" -> "Unload Profile", "Change File", "Unload
Game/Mod"
  • Loading branch information
Leo40Git committed Dec 17, 2017
1 parent 9182a14 commit 069b3f3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
3.1
3.2
Update 3.2:
- Add icons for "File" -> "Unload Profile", "Change File", "Unload Game/Mod"
Update 3.1:
- Improve 290.rec editor
Hotfix 3.0.1:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/leo/cse/frontend/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Main extends JFrame implements ExeLoadListener, ProfileListener {
private static final long serialVersionUID = -5073541927297432013L;

public static final Dimension WINDOW_SIZE = new Dimension(867, 686);
public static final Version VERSION = new Version("3.1");
public static final Version VERSION = new Version("3.2");
public static final String UPDATE_CHECK_SITE = "https://raw.githubusercontent.com/Leo40Git/CaveSaveEdit/master/.version";
public static final String DOWNLOAD_SITE = "https://github.com/Leo40Git/CaveSaveEdit/releases/";
public static final Color COLOR_BG = new Color(0, 0, 25);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/leo/cse/frontend/Resources.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private static void loadImages() {
editorTabIcons = new BufferedImage[7];
for (int i = 0; i < editorTabIcons.length; i++)
editorTabIcons[i] = ui.getSubimage(i * 16, 16, 16, 16);
icons = new BufferedImage[11];
icons = new BufferedImage[14];
int tbx = 0, tby = 16;
for (int i = 0; i < icons.length; i++) {
if (i % 10 == 0) {
Expand Down
19 changes: 9 additions & 10 deletions src/main/java/com/leo/cse/frontend/ui/SaveEditorPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public MenuBarItem(String label, String hotkey, Runnable onClick) {
}

public MenuBarItem(String label, BufferedImage icon, Runnable onClick, Supplier<Boolean> enabled) {
this(label, null, icon, onClick, Main.TRUE_SUPPLIER);
this(label, null, icon, onClick, enabled);
}

public MenuBarItem(String label, BufferedImage icon, Runnable onClick) {
Expand Down Expand Up @@ -299,13 +299,12 @@ public void addComponents() {
mbiFile.add(new MenuBarItem("Load Profile", "Ctrl+O", Resources.icons[0], () -> {
loadProfile();
}));
if (plus)
mbiFile.add(new MenuBarItem("Change File", () -> {
addDialogBox(new PlusSlotDialog(true));
}, () -> {
return ProfileManager.isLoaded();
}));
mbiFile.add(new MenuBarItem("Unload Profile", () -> {
mbiFile.add(new MenuBarItem("Change File", Resources.icons[13], () -> {
addDialogBox(new PlusSlotDialog(true));
}, () -> {
return ProfileManager.isLoaded() && plus;
}));
mbiFile.add(new MenuBarItem("Unload Profile", Resources.icons[11], () -> {
if (ProfileManager.isLoaded() && ProfileManager.isModified()) {
int sel = JOptionPane.showConfirmDialog(Main.window,
"Are you sure you want to unload the profile?\nUnsaved changes will be lost!",
Expand All @@ -323,7 +322,7 @@ public void addComponents() {
mbiFile.add(new MenuBarItem("Load Game/Mod", "Ctrl+Shift+O", Resources.icons[1], () -> {
loadExe();
}));
mbiFile.add(new MenuBarItem("Unload Game/Mod", () -> {
mbiFile.add(new MenuBarItem("Unload Game/Mod", Resources.icons[12], () -> {
ExeData.unload();
loading = true;
repaint();
Expand Down Expand Up @@ -368,7 +367,7 @@ public void addComponents() {
addDialogBox(new NikuEditDialog());
}));
menuBars.add(new MenuBar("Tools", mbiTools));
boolean var = MCI.getSpecial("VarHack"), eqp = MCI.getSpecial("EquipPlusHack");
boolean var = plus && MCI.getSpecial("VarHack"), eqp = plus && MCI.getSpecial("EquipPlusHack");
tabs = new EditorPanel[(var ? 6 : 5)];
tabs[0] = new EditorPanel(EditorTab.GENERAL, new GeneralPanel());
tabs[1] = new EditorPanel(EditorTab.INVENTORY, new InventoryPanel());
Expand Down
Binary file modified src/main/resources/com/leo/cse/frontend/ui.png
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 069b3f3

Please sign in to comment.