mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Make it so Last Activity column isn't cut off
Make it so double-clicking a gauntlet on the Load Gauntlet screen will launch it Support renaming gauntlets Support sorting gauntlets (and quests) case insensitive
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package forge.gauntlet;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamOmitField;
|
||||
import forge.deck.Deck;
|
||||
|
||||
import forge.deck.Deck;
|
||||
import forge.properties.ForgeConstants;
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,6 +39,21 @@ public final class GauntletData {
|
||||
name = name0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this gauntlet.
|
||||
*
|
||||
* @param newName
|
||||
* the new name to set
|
||||
*/
|
||||
public void rename(final String newName) {
|
||||
File newpath = new File(ForgeConstants.GAUNTLET_DIR.userPrefLoc, newName + ".dat");
|
||||
File oldpath = new File(ForgeConstants.GAUNTLET_DIR.userPrefLoc, this.name + ".dat");
|
||||
oldpath.renameTo(newpath);
|
||||
|
||||
this.name = newName;
|
||||
GauntletIO.saveGauntlet(this);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public final class QuestData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this quest the name.
|
||||
* Rename this quest.
|
||||
*
|
||||
* @param newName
|
||||
* the new name to set
|
||||
|
||||
Reference in New Issue
Block a user