mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
merged r15740-r15764 from the Trunk into CloneFix branch
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -956,6 +956,7 @@ res/cardsfolder/b/bloodhusk_ritualist.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/b/bloodied_ghost.txt svneol=native#text/plain
|
res/cardsfolder/b/bloodied_ghost.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/bloodletter_quill.txt svneol=native#text/plain
|
res/cardsfolder/b/bloodletter_quill.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/bloodline_keeper_lord_of_lineage.txt -text
|
res/cardsfolder/b/bloodline_keeper_lord_of_lineage.txt -text
|
||||||
|
res/cardsfolder/b/bloodline_shaman.txt -text
|
||||||
res/cardsfolder/b/bloodmark_mentor.txt svneol=native#text/plain
|
res/cardsfolder/b/bloodmark_mentor.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/bloodpyre_elemental.txt svneol=native#text/plain
|
res/cardsfolder/b/bloodpyre_elemental.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/bloodrage_vampire.txt svneol=native#text/plain
|
res/cardsfolder/b/bloodrage_vampire.txt svneol=native#text/plain
|
||||||
@@ -12002,7 +12003,6 @@ src/main/java/forge/gui/framework/package-info.java -text svneol=native#text/pla
|
|||||||
src/main/java/forge/gui/home/CMainMenu.java -text
|
src/main/java/forge/gui/home/CMainMenu.java -text
|
||||||
src/main/java/forge/gui/home/EMenuGroup.java -text
|
src/main/java/forge/gui/home/EMenuGroup.java -text
|
||||||
src/main/java/forge/gui/home/EMenuItem.java -text
|
src/main/java/forge/gui/home/EMenuItem.java -text
|
||||||
src/main/java/forge/gui/home/ICSubmenu.java -text
|
|
||||||
src/main/java/forge/gui/home/IVSubmenu.java -text
|
src/main/java/forge/gui/home/IVSubmenu.java -text
|
||||||
src/main/java/forge/gui/home/StartButton.java -text
|
src/main/java/forge/gui/home/StartButton.java -text
|
||||||
src/main/java/forge/gui/home/VHomeUI.java -text
|
src/main/java/forge/gui/home/VHomeUI.java -text
|
||||||
@@ -12193,7 +12193,6 @@ src/main/java/forge/view/FView.java -text
|
|||||||
src/main/java/forge/view/Main.java -text
|
src/main/java/forge/view/Main.java -text
|
||||||
src/main/java/forge/view/SplashFrame.java -text
|
src/main/java/forge/view/SplashFrame.java -text
|
||||||
src/main/java/forge/view/ViewBazaarUI.java -text
|
src/main/java/forge/view/ViewBazaarUI.java -text
|
||||||
src/main/java/forge/view/ViewEditorUI.java -text
|
|
||||||
src/main/java/forge/view/arcane/CardArea.java svneol=native#text/plain
|
src/main/java/forge/view/arcane/CardArea.java svneol=native#text/plain
|
||||||
src/main/java/forge/view/arcane/CardPanel.java svneol=native#text/plain
|
src/main/java/forge/view/arcane/CardPanel.java svneol=native#text/plain
|
||||||
src/main/java/forge/view/arcane/CardPanelContainer.java svneol=native#text/plain
|
src/main/java/forge/view/arcane/CardPanelContainer.java svneol=native#text/plain
|
||||||
|
|||||||
32
CHANGES.txt
32
CHANGES.txt
@@ -302,6 +302,38 @@ Fixes/Features:
|
|||||||
- AbilityWork:Corrected References$ for Avalanche.
|
- AbilityWork:Corrected References$ for Avalanche.
|
||||||
- Added the recent commit logs to changes.txt.
|
- Added the recent commit logs to changes.txt.
|
||||||
- Added the recent commit logs to changes.txt. Preparing for the snapshot build release.
|
- Added the recent commit logs to changes.txt. Preparing for the snapshot build release.
|
||||||
|
- AbilityWork: Made sure SpellPermanent's with X-cost get their X-SVar set. (*Fixes Balduvian Hydra among others.)
|
||||||
|
- Increased the width of the checkbox with label for chbType. The test "Type" is no longer truncated under Mac OS.
|
||||||
|
- Fixed filter problems in Card Shop.
|
||||||
|
- Standardization: Implemented ILocalRepaint#repaintSelf() on FLabel and FPanel.
|
||||||
|
- Increased the width of the Selectors in the deck editor filter section.
|
||||||
|
- AbilityWork:Fixed a problem with subabilities operating on the wrong host card. (Enables Necrotic Ooze+Bloodline Keeper+Grimgrin, Corpse-Born infinite combo ^^ )
|
||||||
|
- AbilityWork:Added a "Trigger Breakpoint" dev mode button. Set a breakpoint at the indicated row in GuiDisplayUtil.devModeBreakpoint(), click this button while running in debug mode and enjoy a nice overview of the internals of the game.
|
||||||
|
- AbilityWork:Made calculateAmount fall back on card SVars if the wanted one isn't found on the spellability. Better fix for Balduvian Hydra and similar.
|
||||||
|
- AbilityWork: Added References$ parameter to scripted abilities of 'G' cards where necessary.
|
||||||
|
- AbilityWork: Console printout warning when calculateAmount falls back to using Card Svars. Helps when debugging if an ability is not stolen properly, for instance.
|
||||||
|
- Bugfix: Quest challenges now persist across restarts. Also some checkstyle.
|
||||||
|
- Checkstyle.
|
||||||
|
- Checkstyle.
|
||||||
|
- Minor correction.
|
||||||
|
- creating branch for fixing clone cards
|
||||||
|
- added Clone AF and first steps in moving SVars to CardCharacteristics class
|
||||||
|
- updated LQ picture downloader to handle flip/DFC states
|
||||||
|
- Added "transform on click" capability to card picture and detail.
|
||||||
|
- A few tweaks to card flip code.
|
||||||
|
- Changed tab text to match skin color swatch.
|
||||||
|
- Cleanup: Tightened up interface contracts in home submenus.
|
||||||
|
- Merged changes from trunk to AbilityWork: 15691-15747
|
||||||
|
- Added the recent commit logs to changes.txt. Preparing for the snapshot build release.
|
||||||
|
- This will center the Type checkbox between the Name and Text checkboxes.
|
||||||
|
- Reverted the changes made to the main.properties file, these were probably pushed unintentionally to the SVN.
|
||||||
|
- CheckStyle.
|
||||||
|
- Added the recent commit logs to changes.txt. Preparing for the snapshot build release.
|
||||||
|
- Edited the README.txt file and included more info about the layout files.
|
||||||
|
- fixed bug in Effect AB that was causing a NPE
|
||||||
|
- AbilityWork: Added References$ parameter to scripted abilities of 'M' cards where necessary.
|
||||||
|
- AbilityWork: Added some missing References$ params
|
||||||
|
- Added the recent commit logs to changes.txt. Preparing for the snapshot build release.
|
||||||
|
|
||||||
|
|
||||||
Many people helped with this version. A special thank you goes out to them. (Attempted to list names alphabetically):
|
Many people helped with this version. A special thank you goes out to them. (Attempted to list names alphabetically):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Once the Forge archive has been decompressed you should then be able to launch F
|
|||||||
|
|
||||||
After downloading and installing a newer version of Forge you may want to move certain files from the older version over to the newer version of Forge. You should maintain your older version of Forge as a back up in case you make a mistake while installing the newer version.
|
After downloading and installing a newer version of Forge you may want to move certain files from the older version over to the newer version of Forge. You should maintain your older version of Forge as a back up in case you make a mistake while installing the newer version.
|
||||||
|
|
||||||
1) The /res/pics/ folder contains the card pictures, icons and token pictures (mtg card tokens and quest pet/plant tokens). Please note that the /res/images/icons/ folder was moved back to the /res/pics/icons/ folder. The forge /res/images/ folder no longer is used as of version 1.2.8.
|
1) The /res/pics/ folder contains the card pictures, icons and token pictures (mtg card tokens and quest pet/plant tokens). Please note that the /res/images/icons/ folder was moved back to the /res/pics/ folder. The forge /res/images/ folder no longer is used as of version 1.2.8.
|
||||||
|
|
||||||
The /res/pics/icons/ folder contains the quest opponent icons, small quest pet/plant icons (non-tokens) and some icons that are used by forge's quest mode. While several of these pictures ship with the forge archive most of them have to be downloaded using the Home screen -> Utilities -> Download Quest Images command.
|
The /res/pics/icons/ folder contains the quest opponent icons, small quest pet/plant icons (non-tokens) and some icons that are used by forge's quest mode. While several of these pictures ship with the forge archive most of them have to be downloaded using the Home screen -> Utilities -> Download Quest Images command.
|
||||||
|
|
||||||
@@ -20,9 +20,11 @@ You can place your deck files from an earlier version of Forge into the /res/dec
|
|||||||
|
|
||||||
5) The /res/quest/data folder contains your questData files. These files include all of the information for your current quests. You will not be able to continue your quests in a newer version of Forge unless you copy over the your quest data files. These files have a ".dat" extension. You can now have multiple ongoing quests at the same time.
|
5) The /res/quest/data folder contains your questData files. These files include all of the information for your current quests. You will not be able to continue your quests in a newer version of Forge unless you copy over the your quest data files. These files have a ".dat" extension. You can now have multiple ongoing quests at the same time.
|
||||||
|
|
||||||
6) The Forge /res/preferences/ folder contains the preference files named "forge.preferences" and "editor.preferences". You should also move a copy of these files over to the newer version. The /res/preferences/ folder was added to version 1.2.8.
|
6) The Forge /res/preferences/ folder contains the preference files named "forge.preferences" and "editor.preferences". You should also move a copy of these files over to the newer version. The /res/preferences/ folder was added to version 1.2.8. The main.properties file was also moved to the /res/preferences/ folder.
|
||||||
|
|
||||||
7) The /res/layouts/ folder contains a file named "match_preferred.xml". This file contains information that forge uses when setting the layout for the battlefield display.
|
7) The /res/layouts/ folder contains a file named "match_preferred.xml". This file contains information that forge uses when setting the layout for the battlefield display. The match_default.xml file contains the default layout for the battlefield.
|
||||||
|
|
||||||
|
The editor_preferred.xml file contains information that forge uses when setting the layout for the deck editor display. The editor_default.xml file contains the default layout for the deck editor display.
|
||||||
|
|
||||||
|
|
||||||
Advanced Updating to a newer version Instructions:
|
Advanced Updating to a newer version Instructions:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ A:SP$ Attach | Cost$ G | ValidTgts$ Land | AILogic$ Pump
|
|||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ FreeCard | TriggerDescription$ When CARDNAME enters the battlefield, draw a card.
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ FreeCard | TriggerDescription$ When CARDNAME enters the battlefield, draw a card.
|
||||||
SVar:FreeCard:DB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
|
SVar:FreeCard:DB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
|
||||||
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddAbility$ AbundantGrowthTap | Description$ Enchanted land has "T: Add one mana of any color to your mana pool."
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddAbility$ AbundantGrowthTap | Description$ Enchanted land has "T: Add one mana of any color to your mana pool."
|
||||||
SVar:AbundantGrowthTap:AB$ Mana | Cost$ T | Produced$ Any
|
SVar:AbundantGrowthTap:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool.
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/abundant_growth.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/abundant_growth.jpg
|
||||||
SetInfo:AVR|Common|http://magiccards.info/scans/en/avr/167.jpg
|
SetInfo:AVR|Common|http://magiccards.info/scans/en/avr/167.jpg
|
||||||
|
|||||||
13
res/cardsfolder/b/bloodline_shaman.txt
Normal file
13
res/cardsfolder/b/bloodline_shaman.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Name:Bloodline Shaman
|
||||||
|
ManaCost:1 G
|
||||||
|
Types:Creature Elf Wizard Shaman
|
||||||
|
Text:no text
|
||||||
|
PT:1/1
|
||||||
|
A:AB$ ChooseType | Cost$ T | Defined$ You | Type$ Creature | AILogic$ MostProminentInComputerDeck | SubAbility$ ShamanDig | SpellDescription$ Choose a creature type. Reveal the top card of your library. If that card is a creature card of the chosen type, put it into your hand. Otherwise, put it into your graveyard.
|
||||||
|
SVar:ShamanDig:DB$ Dig | DigNum$ 1 | Reveal$ True | ChangeNum$ All | ChangeValid$ Creature.ChosenType | DestinationZone$ Hand | DestinationZone2$ Graveyard
|
||||||
|
SVar:RemRandomDeck:True
|
||||||
|
SVar:Rarity:Uncommon
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/bloodline_shaman.jpg
|
||||||
|
SetInfo:ONS|Uncommon|http://magiccards.info/scans/en/on/249.jpg
|
||||||
|
Oracle:{T}: Choose a creature type. Reveal the top card of your library. If that card is a creature card of the chosen type, put it into your hand. Otherwise, put it into your graveyard.
|
||||||
|
End
|
||||||
@@ -58,8 +58,8 @@ draft--properties=../draft/draft.properties
|
|||||||
|
|
||||||
lang--transparent-properties=../lang/lang.properties
|
lang--transparent-properties=../lang/lang.properties
|
||||||
|
|
||||||
image/base--file=../../../pics
|
image/base--file=C:/forge/pics
|
||||||
image/token--file=../../../pics/tokens
|
image/token--file=C:/forge/pics/tokens
|
||||||
image/icon--file=../../../pics/icons
|
image/icon--file=../../../pics/icons
|
||||||
image/product--file=../../../pics_product
|
image/product--file=../../../pics_product
|
||||||
pics/booster/images--file=../quest/booster-images.txt
|
pics/booster/images--file=../quest/booster-images.txt
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 579 KiB After Width: | Height: | Size: 585 KiB |
@@ -116,7 +116,7 @@ public class GameLog extends MyObservable {
|
|||||||
public List<LogEntry> getLogEntries() {
|
public List<LogEntry> getLogEntries() {
|
||||||
return log;
|
return log;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the log entries below a certain level as a list.
|
* Gets the log entries below a certain level as a list.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -541,8 +541,7 @@ public class AbilityFactoryEffect {
|
|||||||
if ((duration == null) || duration.equals("EndOfTurn")) {
|
if ((duration == null) || duration.equals("EndOfTurn")) {
|
||||||
AllZone.getEndOfTurn().addUntil(endEffect);
|
AllZone.getEndOfTurn().addUntil(endEffect);
|
||||||
}
|
}
|
||||||
|
else if (duration.equals("UntilHostLeavesPlay")) {
|
||||||
if (duration.equals("UntilHostLeavesPlay")) {
|
|
||||||
card.addLeavesPlayCommand(endEffect);
|
card.addLeavesPlayCommand(endEffect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,21 +162,21 @@ class CardFactoryEquipment {
|
|||||||
sbTrig.append("ValidCard$ Card.Self | Execute$ TrigGerm | TriggerDescription$ ");
|
sbTrig.append("ValidCard$ Card.Self | Execute$ TrigGerm | TriggerDescription$ ");
|
||||||
sbTrig.append("Living Weapon (When this Equipment enters the battlefield, ");
|
sbTrig.append("Living Weapon (When this Equipment enters the battlefield, ");
|
||||||
sbTrig.append("put a 0/0 black Germ creature token onto the battlefield, then attach this to it.)");
|
sbTrig.append("put a 0/0 black Germ creature token onto the battlefield, then attach this to it.)");
|
||||||
|
|
||||||
final StringBuilder sbGerm = new StringBuilder();
|
final StringBuilder sbGerm = new StringBuilder();
|
||||||
sbGerm.append("DB$ Token | TokenAmount$ 1 | TokenName$ Germ | TokenTypes$ Creature,Germ | RememberTokens$ True | ");
|
sbGerm.append("DB$ Token | TokenAmount$ 1 | TokenName$ Germ | TokenTypes$ Creature,Germ | RememberTokens$ True | ");
|
||||||
sbGerm.append("TokenOwner$ You | TokenColors$ Black | TokenPower$ 0 | TokenToughness$ 0 | TokenImage$ B 0 0 Germ | SubAbility$ DBGermAttach");
|
sbGerm.append("TokenOwner$ You | TokenColors$ Black | TokenPower$ 0 | TokenToughness$ 0 | TokenImage$ B 0 0 Germ | SubAbility$ DBGermAttach");
|
||||||
|
|
||||||
final StringBuilder sbAttach = new StringBuilder();
|
final StringBuilder sbAttach = new StringBuilder();
|
||||||
sbAttach.append("DB$ Attach | Defined$ Remembered | SubAbility$ DBGermClear");
|
sbAttach.append("DB$ Attach | Defined$ Remembered | SubAbility$ DBGermClear");
|
||||||
|
|
||||||
final StringBuilder sbClear = new StringBuilder();
|
final StringBuilder sbClear = new StringBuilder();
|
||||||
sbClear.append("DB$ Cleanup | ClearRemembered$ True");
|
sbClear.append("DB$ Cleanup | ClearRemembered$ True");
|
||||||
|
|
||||||
card.setSVar("TrigGerm", sbGerm.toString());
|
card.setSVar("TrigGerm", sbGerm.toString());
|
||||||
card.setSVar("DBGermAttach", sbAttach.toString());
|
card.setSVar("DBGermAttach", sbAttach.toString());
|
||||||
card.setSVar("DBGermClear", sbClear.toString());
|
card.setSVar("DBGermClear", sbClear.toString());
|
||||||
|
|
||||||
final Trigger etbTrigger = TriggerHandler.parseTrigger(sbTrig.toString(), card, true);
|
final Trigger etbTrigger = TriggerHandler.parseTrigger(sbTrig.toString(), card, true);
|
||||||
card.addTrigger(etbTrigger);
|
card.addTrigger(etbTrigger);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ public class CardFactorySorceries {
|
|||||||
Card biggest = exiled.get(0);
|
Card biggest = exiled.get(0);
|
||||||
|
|
||||||
for (final Card c : exiled) {
|
for (final Card c : exiled) {
|
||||||
if (biggest.getManaCost().getCMC() < c.getManaCost().getCMC() ) {
|
if (biggest.getManaCost().getCMC() < c.getManaCost().getCMC()) {
|
||||||
biggest = c;
|
biggest = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,11 +145,10 @@ public class Cost {
|
|||||||
private static final String RETURN_STR = "Return<";
|
private static final String RETURN_STR = "Return<";
|
||||||
private static final String REVEAL_STR = "Reveal<";
|
private static final String REVEAL_STR = "Reveal<";
|
||||||
|
|
||||||
|
|
||||||
public Cost(final Card card, CardManaCost cost, final boolean bAbility) {
|
public Cost(final Card card, CardManaCost cost, final boolean bAbility) {
|
||||||
this(card, cost.toString(), bAbility);
|
this(card, cost.toString(), bAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Constructor for Cost.
|
* Constructor for Cost.
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ public interface IParserManaCost extends Iterator<ManaCostShard> {
|
|||||||
* @return the total colorless cost
|
* @return the total colorless cost
|
||||||
*/
|
*/
|
||||||
int getTotalColorlessCost();
|
int getTotalColorlessCost();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,10 +61,11 @@ public class ManaCost {
|
|||||||
|
|
||||||
final CardManaCost manaCost = new CardManaCost(new ManaCostParser(sCost));
|
final CardManaCost manaCost = new CardManaCost(new ManaCostParser(sCost));
|
||||||
for (ManaCostShard shard : manaCost.getShards()) {
|
for (ManaCostShard shard : manaCost.getShards()) {
|
||||||
if ( shard == ManaCostShard.X )
|
if (shard == ManaCostShard.X) {
|
||||||
cntX++;
|
cntX++;
|
||||||
else
|
} else {
|
||||||
increaseShard(shard, 1);
|
increaseShard(shard, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
increaseColorlessMana(manaCost.getGenericCost());
|
increaseColorlessMana(manaCost.getGenericCost());
|
||||||
}
|
}
|
||||||
@@ -120,11 +121,14 @@ public class ManaCost {
|
|||||||
*/
|
*/
|
||||||
private List<ManaCostShard> getUnpaidPhyrexianMana() {
|
private List<ManaCostShard> getUnpaidPhyrexianMana() {
|
||||||
ArrayList<ManaCostShard> res = new ArrayList<ManaCostShard>();
|
ArrayList<ManaCostShard> res = new ArrayList<ManaCostShard>();
|
||||||
for(final Entry<ManaCostShard, Integer> part : this.unpaidShards.entrySet() )
|
for (final Entry<ManaCostShard, Integer> part : this.unpaidShards.entrySet()) {
|
||||||
{
|
|
||||||
if( !part.getKey().isPhyrexian() ) continue;
|
if (!part.getKey().isPhyrexian()) {
|
||||||
for(int i = 0; i < part.getValue(); i++)
|
continue;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < part.getValue(); i++) {
|
||||||
res.add(part.getKey());
|
res.add(part.getKey());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -137,8 +141,10 @@ public class ManaCost {
|
|||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public final boolean containsPhyrexianMana() {
|
public final boolean containsPhyrexianMana() {
|
||||||
for(ManaCostShard shard : unpaidShards.keySet()) {
|
for (ManaCostShard shard : unpaidShards.keySet()) {
|
||||||
if ( shard.isPhyrexian() ) return true;
|
if (shard.isPhyrexian()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -155,8 +161,11 @@ public class ManaCost {
|
|||||||
|
|
||||||
if (phy.size() > 0) {
|
if (phy.size() > 0) {
|
||||||
Integer cnt = unpaidShards.get(phy.get(0));
|
Integer cnt = unpaidShards.get(phy.get(0));
|
||||||
if( cnt <= 1 ) unpaidShards.remove(phy.get(0));
|
if (cnt <= 1) {
|
||||||
else unpaidShards.put(phy.get(0), Integer.valueOf(cnt - 1));
|
unpaidShards.remove(phy.get(0));
|
||||||
|
} else {
|
||||||
|
unpaidShards.put(phy.get(0), Integer.valueOf(cnt - 1));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -177,13 +186,16 @@ public class ManaCost {
|
|||||||
*/
|
*/
|
||||||
public final boolean isColor(final String color) {
|
public final boolean isColor(final String color) {
|
||||||
//if ( "1".equals(color) ) return getColorlessManaAmount() > 0;
|
//if ( "1".equals(color) ) return getColorlessManaAmount() > 0;
|
||||||
if ( color.matches("^\\d+$") ) return getColorlessManaAmount() > 0;
|
if (color.matches("^\\d+$")) {
|
||||||
|
return getColorlessManaAmount() > 0;
|
||||||
for(ManaCostShard shard : unpaidShards.keySet())
|
}
|
||||||
{
|
|
||||||
|
for (ManaCostShard shard : unpaidShards.keySet()) {
|
||||||
|
|
||||||
String ss = shard.toString();
|
String ss = shard.toString();
|
||||||
if (ss.contains(color))
|
if (ss.contains(color)) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -211,7 +223,7 @@ public class ManaCost {
|
|||||||
if (mana.length() > 1) {
|
if (mana.length() > 1) {
|
||||||
mana = InputPayManaCostUtil.getShortColorString(mana);
|
mana = InputPayManaCostUtil.getShortColorString(mana);
|
||||||
}
|
}
|
||||||
for(ManaCostShard shard : unpaidShards.keySet()) {
|
for (ManaCostShard shard : unpaidShards.keySet()) {
|
||||||
if (canBePaidWith(shard, mana)) {
|
if (canBePaidWith(shard, mana)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -230,11 +242,11 @@ public class ManaCost {
|
|||||||
*/
|
*/
|
||||||
public final boolean isNeeded(final Mana paid) {
|
public final boolean isNeeded(final Mana paid) {
|
||||||
for (ManaCostShard shard : unpaidShards.keySet()) {
|
for (ManaCostShard shard : unpaidShards.keySet()) {
|
||||||
|
|
||||||
if (canBePaidWith(shard, paid)) {
|
if (canBePaidWith(shard, paid)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shard.isSnow() && paid.isSnow()) {
|
if (shard.isSnow() && paid.isSnow()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -299,12 +311,11 @@ public class ManaCost {
|
|||||||
if (toAdd <= 0) {
|
if (toAdd <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer cnt = unpaidShards.get(shard);
|
Integer cnt = unpaidShards.get(shard);
|
||||||
unpaidShards.put(shard, Integer.valueOf(cnt == null || cnt == 0 ? toAdd : toAdd + cnt ));
|
unpaidShards.put(shard, Integer.valueOf(cnt == null || cnt == 0 ? toAdd : toAdd + cnt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* decreaseColorlessMana
|
* decreaseColorlessMana
|
||||||
@@ -319,19 +330,18 @@ public class ManaCost {
|
|||||||
decreaseShard(ManaCostShard.COLORLESS, manaToSubtract);
|
decreaseShard(ManaCostShard.COLORLESS, manaToSubtract);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public final void decreaseShard(final ManaCostShard shard, final int manaToSubtract) {
|
public final void decreaseShard(final ManaCostShard shard, final int manaToSubtract) {
|
||||||
if (manaToSubtract <= 0) {
|
if (manaToSubtract <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer genericCnt = unpaidShards.get(shard);
|
Integer genericCnt = unpaidShards.get(shard);
|
||||||
if( null == genericCnt || genericCnt - manaToSubtract <= 0 )
|
if (null == genericCnt || genericCnt - manaToSubtract <= 0) {
|
||||||
unpaidShards.remove(shard);
|
unpaidShards.remove(shard);
|
||||||
else
|
} else {
|
||||||
unpaidShards.put(shard, Integer.valueOf(genericCnt - manaToSubtract));
|
unpaidShards.put(shard, Integer.valueOf(genericCnt - manaToSubtract));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -363,8 +373,7 @@ public class ManaCost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ManaCostShard choice = null;
|
ManaCostShard choice = null;
|
||||||
for(ManaCostShard toPay : unpaidShards.keySet())
|
for (ManaCostShard toPay : unpaidShards.keySet()) {
|
||||||
{
|
|
||||||
if (canBePaidWith(toPay, mana)) {
|
if (canBePaidWith(toPay, mana)) {
|
||||||
// if m is a better to pay than choice
|
// if m is a better to pay than choice
|
||||||
if (choice == null) {
|
if (choice == null) {
|
||||||
@@ -391,36 +400,42 @@ public class ManaCost {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isFisrtChoiceBetter(ManaCostShard s1, ManaCostShard s2 ) {
|
private boolean isFisrtChoiceBetter(ManaCostShard s1, ManaCostShard s2) {
|
||||||
return getPayPriority(s1) > getPayPriority(s2);
|
return getPayPriority(s1) > getPayPriority(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getPayPriority(ManaCostShard s1) {
|
|
||||||
if ( s1 == ManaCostShard.COLORLESS ) return 0;
|
|
||||||
|
|
||||||
if( s1.isMonoColor() ) {
|
private int getPayPriority(ManaCostShard s1) {
|
||||||
if ( s1.isOr2Colorless() ) return 9;
|
if (s1 == ManaCostShard.COLORLESS) {
|
||||||
if ( !s1.isPhyrexian() ) return 10;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s1.isMonoColor()) {
|
||||||
|
if (s1.isOr2Colorless()) {
|
||||||
|
return 9;
|
||||||
|
}
|
||||||
|
if (!s1.isPhyrexian()) {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean canBePaidWith(ManaCostShard shard, Mana mana) {
|
private boolean canBePaidWith(ManaCostShard shard, Mana mana) {
|
||||||
//System.err.println(String.format("ManaPaid: paying for %s with %s" , shard, mana));
|
//System.err.println(String.format("ManaPaid: paying for %s with %s" , shard, mana));
|
||||||
// debug here even more;
|
// debug here even more;
|
||||||
return canBePaidWith(shard, InputPayManaCostUtil.getShortColorString(mana.getColor()) );
|
return canBePaidWith(shard, InputPayManaCostUtil.getShortColorString(mana.getColor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean canBePaidWith(ManaCostShard shard, String mana) {
|
private boolean canBePaidWith(ManaCostShard shard, String mana) {
|
||||||
// most debug here!!
|
// most debug here!!
|
||||||
String sShard = shard.toString();
|
String sShard = shard.toString();
|
||||||
boolean res = "1".equals(sShard) || sShard.contains(mana);
|
boolean res = "1".equals(sShard) || sShard.contains(mana);
|
||||||
//System.out.println(String.format("Str: paying for %s with %s => %d" , shard, mana, res ? 1 : 0));
|
//System.out.println(String.format("Str: paying for %s with %s => %d" , shard, mana, res ? 1 : 0));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* addMana.
|
* addMana.
|
||||||
@@ -436,8 +451,7 @@ public class ManaCost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ManaCostShard choice = null;
|
ManaCostShard choice = null;
|
||||||
for(ManaCostShard toPay : unpaidShards.keySet())
|
for (ManaCostShard toPay : unpaidShards.keySet()) {
|
||||||
{
|
|
||||||
if (canBePaidWith(toPay, mana)) {
|
if (canBePaidWith(toPay, mana)) {
|
||||||
// if m is a better to pay than choice
|
// if m is a better to pay than choice
|
||||||
if (choice == null) {
|
if (choice == null) {
|
||||||
@@ -475,11 +489,12 @@ public class ManaCost {
|
|||||||
*/
|
*/
|
||||||
public final void combineManaCost(final String extra) {
|
public final void combineManaCost(final String extra) {
|
||||||
final CardManaCost manaCost = new CardManaCost(new ManaCostParser(extra));
|
final CardManaCost manaCost = new CardManaCost(new ManaCostParser(extra));
|
||||||
for(ManaCostShard shard : manaCost.getShards()) {
|
for (ManaCostShard shard : manaCost.getShards()) {
|
||||||
if ( shard == ManaCostShard.X )
|
if (shard == ManaCostShard.X) {
|
||||||
cntX++;
|
cntX++;
|
||||||
else
|
} else {
|
||||||
increaseShard(shard, 1);
|
increaseShard(shard, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
increaseColorlessMana(manaCost.getGenericCost());
|
increaseColorlessMana(manaCost.getGenericCost());
|
||||||
}
|
}
|
||||||
@@ -502,11 +517,14 @@ public class ManaCost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int nGeneric = getColorlessManaAmount();
|
int nGeneric = getColorlessManaAmount();
|
||||||
if( nGeneric > 0 )
|
if (nGeneric > 0) {
|
||||||
sb.append(nGeneric).append(" ");
|
sb.append(nGeneric).append(" ");
|
||||||
|
}
|
||||||
for( Entry<ManaCostShard, Integer> s : unpaidShards.entrySet() ) {
|
|
||||||
if ( s.getKey() == ManaCostShard.COLORLESS) continue;
|
for (Entry<ManaCostShard, Integer> s : unpaidShards.entrySet()) {
|
||||||
|
if (s.getKey() == ManaCostShard.COLORLESS) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for (int i = 0; i < s.getValue(); i++) {
|
for (int i = 0; i < s.getValue(); i++) {
|
||||||
sb.append(s.getKey().toString()).append(" ");
|
sb.append(s.getKey().toString()).append(" ");
|
||||||
}
|
}
|
||||||
@@ -536,7 +554,7 @@ public class ManaCost {
|
|||||||
*/
|
*/
|
||||||
public final int getConvertedManaCost() {
|
public final int getConvertedManaCost() {
|
||||||
int cmc = 0;
|
int cmc = 0;
|
||||||
|
|
||||||
for (final Entry<ManaCostShard, Integer> s : this.unpaidShards.entrySet()) {
|
for (final Entry<ManaCostShard, Integer> s : this.unpaidShards.entrySet()) {
|
||||||
cmc += s.getKey().getCmc() * s.getValue();
|
cmc += s.getKey().getCmc() * s.getValue();
|
||||||
}
|
}
|
||||||
@@ -550,7 +568,9 @@ public class ManaCost {
|
|||||||
*
|
*
|
||||||
* @return a int.
|
* @return a int.
|
||||||
*/
|
*/
|
||||||
public final int getXcounter() { return cntX; }
|
public final int getXcounter() {
|
||||||
|
return cntX;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -157,11 +157,13 @@ public class ReplacementHandler {
|
|||||||
buildQuestion.append(replacementEffect.toString());
|
buildQuestion.append(replacementEffect.toString());
|
||||||
buildQuestion.append(")");
|
buildQuestion.append(")");
|
||||||
if (!GameActionUtil.showYesNoDialog(replacementEffect.getHostCard(), buildQuestion.toString())) {
|
if (!GameActionUtil.showYesNoDialog(replacementEffect.getHostCard(), buildQuestion.toString())) {
|
||||||
|
replacementEffect.setHasRun(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// AI-logic
|
// AI-logic
|
||||||
if (!replacementEffect.aiShouldRun(effectSA)) {
|
if (!replacementEffect.aiShouldRun(effectSA)) {
|
||||||
|
replacementEffect.setHasRun(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
|
|||||||
// private JLabel label;
|
// private JLabel label;
|
||||||
// private ImageIcon icon;
|
// private ImageIcon icon;
|
||||||
private final ScaledImagePanel panel;
|
private final ScaledImagePanel panel;
|
||||||
private Image currentImange;
|
private Image currentImage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -82,6 +82,8 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.setCard(c);
|
this.setCard(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +120,8 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
|
|||||||
this.setImage();
|
this.setImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setImage() {
|
/** */
|
||||||
|
public void setImage() {
|
||||||
final Insets i = this.getInsets();
|
final Insets i = this.getInsets();
|
||||||
Image image = null;
|
Image image = null;
|
||||||
if (this.inventoryItem != null) {
|
if (this.inventoryItem != null) {
|
||||||
@@ -130,8 +133,8 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
|
|||||||
- i.bottom - 2);
|
- i.bottom - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image != this.currentImange) {
|
if (image != this.currentImage) {
|
||||||
this.currentImange = image;
|
this.currentImage = image;
|
||||||
this.panel.setImage(image, null);
|
this.panel.setImage(image, null);
|
||||||
this.panel.repaint();
|
this.panel.repaint();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,8 +135,8 @@ public enum VFilters implements IVDoc {
|
|||||||
pnlText.add(txfContains, "pushx, growx, span 2 1, gap 5px 5px 2px 2px, h 30px!");
|
pnlText.add(txfContains, "pushx, growx, span 2 1, gap 5px 5px 2px 2px, h 30px!");
|
||||||
pnlText.add(lblWithout, "w 80px!, h 30px!");
|
pnlText.add(lblWithout, "w 80px!, h 30px!");
|
||||||
pnlText.add(txfWithout, "pushx, growx, span 2 1, gap 5px 5px 2px 2px, h 30px!");
|
pnlText.add(txfWithout, "pushx, growx, span 2 1, gap 5px 5px 2px 2px, h 30px!");
|
||||||
pnlText.add(chbName, "w 70px!, h 25px!, gap 5px 5px 2px 2px");
|
pnlText.add(chbName, "pushx, growx, w 70px!, h 25px!, gap 5px 5px 2px 2px");
|
||||||
pnlText.add(chbType, "w 70px!, h 25px!, gap 0 5px 2px 2px");
|
pnlText.add(chbType, "pushx, growx, w 70px!, h 25px!, gap 0 5px 2px 2px");
|
||||||
pnlText.add(chbText, "w 60px!, h 25px!, gap 0 5px 2px 2px");
|
pnlText.add(chbText, "w 60px!, h 25px!, gap 0 5px 2px 2px");
|
||||||
|
|
||||||
chbName.setSelected(true);
|
chbName.setSelected(true);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public final class DragTab extends JLabel implements ILocalRepaint {
|
|||||||
setOpaque(false);
|
setOpaque(false);
|
||||||
setSelected(false);
|
setSelected(false);
|
||||||
setBorder(new EmptyBorder(2, 5, 2, 5));
|
setBorder(new EmptyBorder(2, 5, 2, 5));
|
||||||
|
setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
||||||
|
|
||||||
this.addMouseListener(SRearrangingUtil.getRearrangeClickEvent());
|
this.addMouseListener(SRearrangingUtil.getRearrangeClickEvent());
|
||||||
this.addMouseMotionListener(SRearrangingUtil.getRearrangeDragEvent());
|
this.addMouseMotionListener(SRearrangingUtil.getRearrangeDragEvent());
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
package forge.gui.home;
|
|
||||||
|
|
||||||
import forge.Command;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dictates methods required for a submenu controller.
|
|
||||||
*
|
|
||||||
* <br><br><i>(I at beginning of class name denotes an interface.)</i>
|
|
||||||
* <br><i>(C at beginning of class name denotes a controller class.)</i>
|
|
||||||
*/
|
|
||||||
public interface ICSubmenu {
|
|
||||||
/** Fires when a menu is selected. Avoid any reference
|
|
||||||
* referring to VHomeUI in this method, because
|
|
||||||
* it is triggered when VHomeUI is initialized, which
|
|
||||||
* will create an NPE.
|
|
||||||
*
|
|
||||||
* @return {@link forge.Command} */
|
|
||||||
Command getMenuCommand();
|
|
||||||
|
|
||||||
/** Call this method after the view singleton has been fully realized
|
|
||||||
* for the first time. This method should ideally only be called once. */
|
|
||||||
void initialize();
|
|
||||||
|
|
||||||
/** Update whatever content is in the panel. */
|
|
||||||
void update();
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
package forge.gui.home;
|
package forge.gui.home;
|
||||||
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
|
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
|
import forge.gui.framework.IVDoc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dictates methods required for a submenu view.
|
* Dictates methods required for a submenu view.
|
||||||
@@ -10,16 +9,7 @@ import forge.gui.framework.EDocID;
|
|||||||
* <br><br><i>(I at beginning of class name denotes an interface.)</i>
|
* <br><br><i>(I at beginning of class name denotes an interface.)</i>
|
||||||
* <br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*/
|
*/
|
||||||
public interface IVSubmenu {
|
public interface IVSubmenu extends IVDoc {
|
||||||
/** Allows static factory creation by decoupling UI components.
|
|
||||||
* @return {@link javax.swing.JPanel} */
|
|
||||||
JPanel getPanel();
|
|
||||||
|
|
||||||
/** Retrives control object associated with this instance.
|
|
||||||
* @return {@link forge.gui.home.ICSubmenu}
|
|
||||||
*/
|
|
||||||
ICSubmenu getSubmenuControl();
|
|
||||||
|
|
||||||
/** Returns parent menu grouping of this submenu, useful for
|
/** Returns parent menu grouping of this submenu, useful for
|
||||||
* functions such as expanding and collapsing in the menu area.
|
* functions such as expanding and collapsing in the menu area.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -214,8 +214,8 @@ public enum VMainMenu implements IVDoc {
|
|||||||
// with the selection display process.
|
// with the selection display process.
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (item.getSubmenuControl().getMenuCommand() != null) {
|
if (item.getLayoutControl().getCommandOnSelect() != null) {
|
||||||
item.getSubmenuControl().getMenuCommand().execute();
|
item.getLayoutControl().getCommandOnSelect().execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ import forge.Command;
|
|||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.CMainMenu;
|
import forge.gui.home.CMainMenu;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.quest.SSubmenuQuestUtil.SelectablePanel;
|
import forge.gui.home.quest.SSubmenuQuestUtil.SelectablePanel;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.quest.QuestController;
|
import forge.quest.QuestController;
|
||||||
import forge.quest.QuestEventChallenge;
|
import forge.quest.QuestEventChallenge;
|
||||||
|
import forge.quest.bazaar.QuestItemType;
|
||||||
import forge.quest.bazaar.QuestPetController;
|
import forge.quest.bazaar.QuestPetController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,27 +26,10 @@ import forge.quest.bazaar.QuestPetController;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum CSubmenuChallenges implements ICSubmenu, ICDoc {
|
public enum CSubmenuChallenges implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
final QuestController qc = AllZone.getQuest();
|
|
||||||
return new Command() {
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
|
||||||
if (qc.getAchievements() == null) {
|
|
||||||
CMainMenu.SINGLETON_INSTANCE.itemClick(EDocID.HOME_QUESTDATA);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#initialize()
|
* @see forge.control.home.IControlSubmenu#initialize()
|
||||||
*/
|
*/
|
||||||
@@ -71,10 +54,9 @@ public enum CSubmenuChallenges implements ICSubmenu, ICDoc {
|
|||||||
new Command() {
|
new Command() {
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
int todo = 5;
|
AllZone.getQuest().getAchievements().setCurrentChallenges(null);
|
||||||
//AllZone.getQuest().getAchievements().setCurrentChallenges(null);
|
AllZone.getQuest().getAssets().setItemLevel(QuestItemType.ZEPPELIN, 2);
|
||||||
//AllZone.getQuest().getAssets().setItemLevel(QuestItemType.ZEPPELIN, 2);
|
update();
|
||||||
//update();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -142,8 +124,17 @@ public enum CSubmenuChallenges implements ICSubmenu, ICDoc {
|
|||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
@Override
|
@Override
|
||||||
public Command getCommandOnSelect() {
|
public Command getCommandOnSelect() {
|
||||||
return null;
|
final QuestController qc = AllZone.getQuest();
|
||||||
|
return new Command() {
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
if (qc.getAchievements() == null) {
|
||||||
|
CMainMenu.SINGLETON_INSTANCE.itemClick(EDocID.HOME_QUESTDATA);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import forge.Command;
|
|||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.CMainMenu;
|
import forge.gui.home.CMainMenu;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.quest.SSubmenuQuestUtil.SelectablePanel;
|
import forge.gui.home.quest.SSubmenuQuestUtil.SelectablePanel;
|
||||||
import forge.quest.QuestController;
|
import forge.quest.QuestController;
|
||||||
import forge.quest.QuestEventDuel;
|
import forge.quest.QuestEventDuel;
|
||||||
@@ -21,26 +20,10 @@ import forge.quest.bazaar.QuestPetController;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum CSubmenuDuels implements ICSubmenu, ICDoc {
|
public enum CSubmenuDuels implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
final QuestController qc = AllZone.getQuest();
|
|
||||||
return new Command() {
|
|
||||||
public void execute() {
|
|
||||||
if (qc.getAchievements() == null) {
|
|
||||||
CMainMenu.SINGLETON_INSTANCE.itemClick(EDocID.HOME_QUESTDATA);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#initialize()
|
* @see forge.control.home.IControlSubmenu#initialize()
|
||||||
*/
|
*/
|
||||||
@@ -113,8 +96,16 @@ public enum CSubmenuDuels implements ICSubmenu, ICDoc {
|
|||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
@Override
|
@Override
|
||||||
public Command getCommandOnSelect() {
|
public Command getCommandOnSelect() {
|
||||||
return null;
|
final QuestController qc = AllZone.getQuest();
|
||||||
|
return new Command() {
|
||||||
|
public void execute() {
|
||||||
|
if (qc.getAchievements() == null) {
|
||||||
|
CMainMenu.SINGLETON_INSTANCE.itemClick(EDocID.HOME_QUESTDATA);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import forge.Command;
|
|||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.gui.GuiUtils;
|
import forge.gui.GuiUtils;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.properties.ForgeProps;
|
import forge.properties.ForgeProps;
|
||||||
import forge.properties.NewConstants;
|
import forge.properties.NewConstants;
|
||||||
import forge.quest.QuestController;
|
import forge.quest.QuestController;
|
||||||
@@ -34,7 +33,7 @@ import forge.quest.io.QuestDataIO;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public enum CSubmenuQuestData implements ICSubmenu, ICDoc {
|
public enum CSubmenuQuestData implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -55,14 +54,6 @@ public enum CSubmenuQuestData implements ICSubmenu, ICDoc {
|
|||||||
new Command() { @Override public void execute() { newQuest(); } });
|
new Command() { @Override public void execute() { newQuest(); } });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import forge.gui.deckeditor.controllers.CEditorQuest;
|
|||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.CMainMenu;
|
import forge.gui.home.CMainMenu;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.quest.QuestController;
|
import forge.quest.QuestController;
|
||||||
import forge.quest.data.QuestPreferences.QPref;
|
import forge.quest.data.QuestPreferences.QPref;
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ import forge.quest.data.QuestPreferences.QPref;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public enum CSubmenuQuestDecks implements ICSubmenu, ICDoc {
|
public enum CSubmenuQuestDecks implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -42,22 +41,6 @@ public enum CSubmenuQuestDecks implements ICSubmenu, ICDoc {
|
|||||||
private final Command cmdDeckDelete = new Command() { @Override
|
private final Command cmdDeckDelete = new Command() { @Override
|
||||||
public void execute() { update(); } };
|
public void execute() { update(); } };
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
final QuestController qc = AllZone.getQuest();
|
|
||||||
return new Command() {
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
|
||||||
if (qc.getAchievements() == null) {
|
|
||||||
CMainMenu.SINGLETON_INSTANCE.itemClick(EDocID.HOME_QUESTDATA);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
@@ -125,6 +108,14 @@ public enum CSubmenuQuestDecks implements ICSubmenu, ICDoc {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Command getCommandOnSelect() {
|
public Command getCommandOnSelect() {
|
||||||
return null;
|
final QuestController qc = AllZone.getQuest();
|
||||||
|
return new Command() {
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
if (qc.getAchievements() == null) {
|
||||||
|
CMainMenu.SINGLETON_INSTANCE.itemClick(EDocID.HOME_QUESTDATA);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package forge.gui.home.quest;
|
|||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.quest.VSubmenuQuestPrefs.PrefInput;
|
import forge.gui.home.quest.VSubmenuQuestPrefs.PrefInput;
|
||||||
import forge.quest.data.QuestPreferences;
|
import forge.quest.data.QuestPreferences;
|
||||||
import forge.quest.data.QuestPreferences.QPref;
|
import forge.quest.data.QuestPreferences.QPref;
|
||||||
@@ -14,7 +13,7 @@ import forge.quest.data.QuestPreferences.QPref;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum CSubmenuQuestPrefs implements ICSubmenu, ICDoc {
|
public enum CSubmenuQuestPrefs implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -33,14 +32,6 @@ public enum CSubmenuQuestPrefs implements ICSubmenu, ICDoc {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks validity of values entered into prefInputs.
|
* Checks validity of values entered into prefInputs.
|
||||||
* @param i0   a PrefInput object
|
* @param i0   a PrefInput object
|
||||||
|
|||||||
@@ -282,11 +282,11 @@ public class SSubmenuQuestUtil {
|
|||||||
selectedOpponent.setSelected(false);
|
selectedOpponent.setSelected(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VSubmenuDuels.SINGLETON_INSTANCE.getPanel().isShowing() && getCurrentDeck() != null) {
|
if (VSubmenuDuels.SINGLETON_INSTANCE.getPnlDuels().isShowing() && getCurrentDeck() != null) {
|
||||||
VSubmenuDuels.SINGLETON_INSTANCE.getBtnStart().setEnabled(true);
|
VSubmenuDuels.SINGLETON_INSTANCE.getBtnStart().setEnabled(true);
|
||||||
VSubmenuChallenges.SINGLETON_INSTANCE.getBtnStart().setEnabled(false);
|
VSubmenuChallenges.SINGLETON_INSTANCE.getBtnStart().setEnabled(false);
|
||||||
}
|
}
|
||||||
else if (VSubmenuChallenges.SINGLETON_INSTANCE.getPanel().isShowing() && getCurrentDeck() != null) {
|
else if (VSubmenuChallenges.SINGLETON_INSTANCE.getPnlChallenges().isShowing() && getCurrentDeck() != null) {
|
||||||
VSubmenuDuels.SINGLETON_INSTANCE.getBtnStart().setEnabled(false);
|
VSubmenuDuels.SINGLETON_INSTANCE.getBtnStart().setEnabled(false);
|
||||||
VSubmenuChallenges.SINGLETON_INSTANCE.getBtnStart().setEnabled(true);
|
VSubmenuChallenges.SINGLETON_INSTANCE.getBtnStart().setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import forge.gui.framework.EDocID;
|
|||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
import forge.gui.framework.IVDoc;
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.toolbox.FCheckBox;
|
import forge.gui.toolbox.FCheckBox;
|
||||||
@@ -82,14 +81,6 @@ public enum VSubmenuChallenges implements IVSubmenu, IStatsAndPet, IVDoc {
|
|||||||
.opaque(true).hoverable(true).text("Spell Shop")
|
.opaque(true).hoverable(true).text("Spell Shop")
|
||||||
.fontSize(14).tooltip("Travel to the Spell Shop").build();
|
.fontSize(14).tooltip("Travel to the Spell Shop").build();
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.view.home.IViewSubmenu#getGroup()
|
* @see forge.view.home.IViewSubmenu#getGroup()
|
||||||
*/
|
*/
|
||||||
@@ -114,14 +105,6 @@ public enum VSubmenuChallenges implements IVSubmenu, IStatsAndPet, IVDoc {
|
|||||||
return EDocID.HOME_QUESTCHALLENGES;
|
return EDocID.HOME_QUESTCHALLENGES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuChallenges.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.view.home.IViewSubmenu#populate()
|
* @see forge.view.home.IViewSubmenu#populate()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import forge.gui.framework.EDocID;
|
|||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
import forge.gui.framework.IVDoc;
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.toolbox.FCheckBox;
|
import forge.gui.toolbox.FCheckBox;
|
||||||
@@ -81,14 +80,6 @@ public enum VSubmenuDuels implements IVSubmenu, IStatsAndPet, IVDoc {
|
|||||||
.opaque(true).hoverable(true).text("Spell Shop")
|
.opaque(true).hoverable(true).text("Spell Shop")
|
||||||
.fontSize(14).tooltip("Travel to the Spell Shop").build();
|
.fontSize(14).tooltip("Travel to the Spell Shop").build();
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.view.home.IViewSubmenu#getGroup()
|
* @see forge.view.home.IViewSubmenu#getGroup()
|
||||||
*/
|
*/
|
||||||
@@ -113,14 +104,6 @@ public enum VSubmenuDuels implements IVSubmenu, IStatsAndPet, IVDoc {
|
|||||||
return EDocID.HOME_QUESTDUELS;
|
return EDocID.HOME_QUESTDUELS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuDuels.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.view.home.IViewSubmenu#populate()
|
* @see forge.view.home.IViewSubmenu#populate()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FPanel;
|
import forge.gui.toolbox.FPanel;
|
||||||
@@ -40,7 +38,7 @@ import forge.util.IStorageView;
|
|||||||
*
|
*
|
||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuQuestData implements IVSubmenu, IVDoc {
|
public enum VSubmenuQuestData implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -201,15 +199,6 @@ public enum VSubmenuQuestData implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.QUEST;
|
return EMenuGroup.QUEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -226,14 +215,6 @@ public enum VSubmenuQuestData implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_QUESTDATA;
|
return EDocID.HOME_QUESTDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuQuestData.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {@link forge.gui.home.quest.QuestFileLister}
|
* @return {@link forge.gui.home.quest.QuestFileLister}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.DeckLister;
|
import forge.gui.toolbox.DeckLister;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
@@ -22,7 +20,7 @@ import forge.gui.toolbox.FScrollPane;
|
|||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuQuestDecks implements IVSubmenu, IVDoc {
|
public enum VSubmenuQuestDecks implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -69,14 +67,6 @@ public enum VSubmenuQuestDecks implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.QUEST;
|
return EMenuGroup.QUEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -93,14 +83,6 @@ public enum VSubmenuQuestDecks implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_QUESTDECKS;
|
return EDocID.HOME_QUESTDECKS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuQuestDecks.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link forge.gui.toolbox.DeckLister} */
|
/** @return {@link forge.gui.toolbox.DeckLister} */
|
||||||
public DeckLister getLstDecks() {
|
public DeckLister getLstDecks() {
|
||||||
return this.lstDecks;
|
return this.lstDecks;
|
||||||
|
|||||||
@@ -19,9 +19,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FPanel;
|
import forge.gui.toolbox.FPanel;
|
||||||
@@ -36,7 +34,7 @@ import forge.quest.data.QuestPreferences.QPref;
|
|||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuQuestPrefs implements IVSubmenu, IVDoc {
|
public enum VSubmenuQuestPrefs implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -148,14 +146,6 @@ public enum VSubmenuQuestPrefs implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.QUEST;
|
return EMenuGroup.QUEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -172,14 +162,6 @@ public enum VSubmenuQuestPrefs implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_QUESTPREFS;
|
return EDocID.HOME_QUESTPREFS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuQuestPrefs.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JLabel} */
|
/** @return {@link javax.swing.JLabel} */
|
||||||
public JLabel getLblErrRewards() {
|
public JLabel getLblErrRewards() {
|
||||||
return lblErrRewards;
|
return lblErrRewards;
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ import forge.game.GameNew;
|
|||||||
import forge.game.player.PlayerType;
|
import forge.game.player.PlayerType;
|
||||||
import forge.gui.SOverlayUtils;
|
import forge.gui.SOverlayUtils;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.item.CardPrinted;
|
import forge.item.CardPrinted;
|
||||||
import forge.item.ItemPoolView;
|
import forge.item.ItemPoolView;
|
||||||
@@ -53,7 +52,7 @@ import forge.util.IStorage;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public enum CSubmenuConstructed implements ICSubmenu, ICDoc {
|
public enum CSubmenuConstructed implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -87,13 +86,6 @@ public enum CSubmenuConstructed implements ICSubmenu, ICDoc {
|
|||||||
COLOR_VALS.put("Red", "red");
|
COLOR_VALS.put("Red", "red");
|
||||||
COLOR_VALS.put("White", "white");
|
COLOR_VALS.put("White", "white");
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.ICSubmenu#getMenuCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.ICSubmenu#initialize()
|
* @see forge.gui.home.ICSubmenu#initialize()
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import forge.gui.SOverlayUtils;
|
|||||||
import forge.gui.deckeditor.CDeckEditorUI;
|
import forge.gui.deckeditor.CDeckEditorUI;
|
||||||
import forge.gui.deckeditor.controllers.CEditorDraftingProcess;
|
import forge.gui.deckeditor.controllers.CEditorDraftingProcess;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,7 +34,7 @@ import forge.gui.toolbox.FSkin;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public enum CSubmenuDraft implements ICSubmenu, ICDoc {
|
public enum CSubmenuDraft implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -129,14 +128,6 @@ public enum CSubmenuDraft implements ICSubmenu, ICDoc {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import forge.gui.deckeditor.CDeckEditorUI;
|
|||||||
import forge.gui.deckeditor.controllers.ACEditorBase;
|
import forge.gui.deckeditor.controllers.ACEditorBase;
|
||||||
import forge.gui.deckeditor.controllers.CEditorLimited;
|
import forge.gui.deckeditor.controllers.CEditorLimited;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
import forge.item.CardPrinted;
|
import forge.item.CardPrinted;
|
||||||
import forge.item.ItemPool;
|
import forge.item.ItemPool;
|
||||||
@@ -43,7 +42,7 @@ import forge.util.TextUtil;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public enum CSubmenuSealed implements ICSubmenu, ICDoc {
|
public enum CSubmenuSealed implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -96,14 +95,6 @@ public enum CSubmenuSealed implements ICSubmenu, ICDoc {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.toolbox.FCheckBox;
|
import forge.gui.toolbox.FCheckBox;
|
||||||
@@ -33,7 +31,7 @@ import forge.gui.toolbox.FScrollPane;
|
|||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuConstructed implements IVSubmenu, IVDoc {
|
public enum VSubmenuConstructed implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -89,22 +87,6 @@ public enum VSubmenuConstructed implements IVSubmenu, IVDoc {
|
|||||||
grpRadiosAI.add(radQuestsAI);
|
grpRadiosAI.add(radQuestsAI);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuConstructed.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getGroupEnum()
|
* @see forge.gui.home.IVSubmenu#getGroupEnum()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.toolbox.DeckLister;
|
import forge.gui.toolbox.DeckLister;
|
||||||
@@ -40,7 +38,7 @@ import forge.gui.toolbox.FSkin;
|
|||||||
*
|
*
|
||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuDraft implements IVSubmenu, IVDoc {
|
public enum VSubmenuDraft implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -68,14 +66,6 @@ public enum VSubmenuDraft implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.SANCTIONED;
|
return EMenuGroup.SANCTIONED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -246,14 +236,6 @@ public enum VSubmenuDraft implements IVSubmenu, IVDoc {
|
|||||||
return parentCell;
|
return parentCell;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuDraft.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.framework.IVDoc#getLayoutControl()
|
* @see forge.gui.framework.IVDoc#getLayoutControl()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.toolbox.DeckLister;
|
import forge.gui.toolbox.DeckLister;
|
||||||
@@ -37,7 +35,7 @@ import forge.gui.toolbox.FSkin;
|
|||||||
*
|
*
|
||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuSealed implements IVSubmenu, IVDoc {
|
public enum VSubmenuSealed implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -107,22 +105,6 @@ public enum VSubmenuSealed implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_SEALED;
|
return EDocID.HOME_SEALED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuSealed.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JLabel} */
|
/** @return {@link javax.swing.JLabel} */
|
||||||
public JLabel getBtnDirections() {
|
public JLabel getBtnDirections() {
|
||||||
return this.btnDirections;
|
return this.btnDirections;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package forge.gui.home.settings;
|
|||||||
|
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the avatars submenu in the home UI.
|
* Controls the avatars submenu in the home UI.
|
||||||
@@ -10,7 +9,7 @@ import forge.gui.home.ICSubmenu;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum CSubmenuAvatars implements ICSubmenu, ICDoc {
|
public enum CSubmenuAvatars implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -21,14 +20,6 @@ public enum CSubmenuAvatars implements ICSubmenu, ICDoc {
|
|||||||
public void initialize() {
|
public void initialize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import forge.Constant;
|
|||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.control.RestartUtil;
|
import forge.control.RestartUtil;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
import forge.properties.ForgePreferences;
|
import forge.properties.ForgePreferences;
|
||||||
import forge.properties.ForgePreferences.FPref;
|
import forge.properties.ForgePreferences.FPref;
|
||||||
@@ -23,7 +22,7 @@ import forge.properties.ForgePreferences.FPref;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum CSubmenuPreferences implements ICSubmenu, ICDoc {
|
public enum CSubmenuPreferences implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -155,14 +154,6 @@ public enum CSubmenuPreferences implements ICSubmenu, ICDoc {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FScrollPane;
|
import forge.gui.toolbox.FScrollPane;
|
||||||
@@ -30,7 +28,7 @@ import forge.properties.ForgePreferences.FPref;
|
|||||||
*
|
*
|
||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuAvatars implements IVSubmenu, IVDoc {
|
public enum VSubmenuAvatars implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -73,14 +71,6 @@ public enum VSubmenuAvatars implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.SETTINGS;
|
return EMenuGroup.SETTINGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -97,14 +87,6 @@ public enum VSubmenuAvatars implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_AVATARS;
|
return EDocID.HOME_AVATARS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuAvatars.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
private void populateAvatars() {
|
private void populateAvatars() {
|
||||||
final Map<Integer, Image> avatarMap = FSkin.getAvatars();
|
final Map<Integer, Image> avatarMap = FSkin.getAvatars();
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FList;
|
import forge.gui.toolbox.FList;
|
||||||
@@ -48,7 +46,7 @@ import forge.properties.NewConstants.Lang.OldGuiNewGame.NewGameText;
|
|||||||
*
|
*
|
||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuPreferences implements IVSubmenu, IVDoc {
|
public enum VSubmenuPreferences implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -178,14 +176,6 @@ public enum VSubmenuPreferences implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.SETTINGS;
|
return EMenuGroup.SETTINGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -202,14 +192,6 @@ public enum VSubmenuPreferences implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_PREFERENCES;
|
return EDocID.HOME_PREFERENCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuPreferences.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Consolidates checkbox styling in one place. */
|
/** Consolidates checkbox styling in one place. */
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
private class OptionsCheckBox extends JCheckBox {
|
private class OptionsCheckBox extends JCheckBox {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import forge.control.FControl;
|
|||||||
import forge.gui.deckeditor.CDeckEditorUI;
|
import forge.gui.deckeditor.CDeckEditorUI;
|
||||||
import forge.gui.deckeditor.controllers.CEditorConstructed;
|
import forge.gui.deckeditor.controllers.CEditorConstructed;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the deck editor submenu option in the home UI.
|
* Controls the deck editor submenu option in the home UI.
|
||||||
@@ -13,7 +12,7 @@ import forge.gui.home.ICSubmenu;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum CSubmenuDeckEditor implements ICSubmenu, ICDoc {
|
public enum CSubmenuDeckEditor implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -24,16 +23,6 @@ public enum CSubmenuDeckEditor implements ICSubmenu, ICDoc {
|
|||||||
public void initialize() {
|
public void initialize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return new Command() { @Override
|
|
||||||
public void execute() { showDeckEditor(); } };
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
@@ -51,8 +40,10 @@ public enum CSubmenuDeckEditor implements ICSubmenu, ICDoc {
|
|||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
@Override
|
@Override
|
||||||
public Command getCommandOnSelect() {
|
public Command getCommandOnSelect() {
|
||||||
return null;
|
return new Command() { @Override
|
||||||
|
public void execute() { showDeckEditor(); } };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package forge.gui.home.utilities;
|
|||||||
|
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the exit submenu option in the home UI.
|
* Controls the exit submenu option in the home UI.
|
||||||
@@ -10,20 +9,10 @@ import forge.gui.home.ICSubmenu;
|
|||||||
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
* <br><br><i>(C at beginning of class name denotes a control class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum CSubmenuExit implements ICSubmenu, ICDoc {
|
public enum CSubmenuExit implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return new Command() { @Override
|
|
||||||
public void execute() { System.exit(0); } };
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
@@ -40,8 +29,10 @@ public enum CSubmenuExit implements ICSubmenu, ICDoc {
|
|||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
* @see forge.gui.framework.ICDoc#getCommandOnSelect()
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
@Override
|
@Override
|
||||||
public Command getCommandOnSelect() {
|
public Command getCommandOnSelect() {
|
||||||
return getMenuCommand();
|
return new Command() { @Override
|
||||||
|
public void execute() { System.exit(0); } };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import forge.gui.download.GuiDownloadPrices;
|
|||||||
import forge.gui.download.GuiDownloadQuestImages;
|
import forge.gui.download.GuiDownloadQuestImages;
|
||||||
import forge.gui.download.GuiDownloadSetPicturesLQ;
|
import forge.gui.download.GuiDownloadSetPicturesLQ;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the utilities submenu in the home UI.
|
* Controls the utilities submenu in the home UI.
|
||||||
@@ -17,7 +16,7 @@ import forge.gui.home.ICSubmenu;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public enum CSubmenuUtilities implements ICSubmenu, ICDoc {
|
public enum CSubmenuUtilities implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -65,14 +64,6 @@ public enum CSubmenuUtilities implements ICSubmenu, ICDoc {
|
|||||||
view.getBtnLicensing().setCommand(cmdLicensing);
|
view.getBtnLicensing().setCommand(cmdLicensing);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.control.home.IControlSubmenu#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Command getMenuCommand() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.control.home.IControlSubmenu#update()
|
* @see forge.control.home.IControlSubmenu#update()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
|
|
||||||
@@ -19,7 +17,7 @@ import forge.gui.toolbox.FLabel;
|
|||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuDeckEditor implements IVSubmenu, IVDoc {
|
public enum VSubmenuDeckEditor implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -40,7 +38,7 @@ public enum VSubmenuDeckEditor implements IVSubmenu, IVDoc {
|
|||||||
pnl.setOpaque(false);
|
pnl.setOpaque(false);
|
||||||
|
|
||||||
pnl.add(new FLabel.Builder().text("Open Deck Editor").opaque(true)
|
pnl.add(new FLabel.Builder().text("Open Deck Editor").opaque(true)
|
||||||
.hoverable(true).cmdClick(CSubmenuDeckEditor.SINGLETON_INSTANCE.getMenuCommand())
|
.hoverable(true).cmdClick(CSubmenuDeckEditor.SINGLETON_INSTANCE.getCommandOnSelect())
|
||||||
.fontSize(16).build(), "w 200px!, h 40px!");
|
.fontSize(16).build(), "w 200px!, h 40px!");
|
||||||
|
|
||||||
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0"));
|
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0"));
|
||||||
@@ -55,14 +53,6 @@ public enum VSubmenuDeckEditor implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.UTILITIES;
|
return EMenuGroup.UTILITIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -79,14 +69,6 @@ public enum VSubmenuDeckEditor implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_DECKEDITOR;
|
return EDocID.HOME_DECKEDITOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuDeckEditor.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
//========== Overridden from IVDoc
|
//========== Overridden from IVDoc
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
|
|
||||||
@@ -19,7 +17,7 @@ import forge.gui.toolbox.FLabel;
|
|||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuExit implements IVSubmenu, IVDoc {
|
public enum VSubmenuExit implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -39,7 +37,7 @@ public enum VSubmenuExit implements IVSubmenu, IVDoc {
|
|||||||
pnl.setOpaque(false);
|
pnl.setOpaque(false);
|
||||||
|
|
||||||
pnl.add(new FLabel.Builder().text("Open Deck Editor").opaque(true)
|
pnl.add(new FLabel.Builder().text("Open Deck Editor").opaque(true)
|
||||||
.hoverable(true).cmdClick(CSubmenuDeckEditor.SINGLETON_INSTANCE.getMenuCommand())
|
.hoverable(true).cmdClick(CSubmenuDeckEditor.SINGLETON_INSTANCE.getCommandOnSelect())
|
||||||
.fontSize(16).build(), "w 200px!, h 40px!");
|
.fontSize(16).build(), "w 200px!, h 40px!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,14 +49,6 @@ public enum VSubmenuExit implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.UTILITIES;
|
return EMenuGroup.UTILITIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
* @see forge.gui.home.IVSubmenu#getMenuTitle()
|
||||||
*/
|
*/
|
||||||
@@ -75,14 +65,6 @@ public enum VSubmenuExit implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_EXIT;
|
return EDocID.HOME_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuExit.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.framework.IVDoc#getDocumentID()
|
* @see forge.gui.framework.IVDoc#getDocumentID()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,9 +23,7 @@ import forge.gui.framework.DragCell;
|
|||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
|
||||||
import forge.gui.home.EMenuGroup;
|
import forge.gui.home.EMenuGroup;
|
||||||
import forge.gui.home.ICSubmenu;
|
|
||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FButton;
|
import forge.gui.toolbox.FButton;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
@@ -41,7 +39,7 @@ import forge.properties.NewConstants.Lang;
|
|||||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum VSubmenuUtilities implements IVSubmenu, IVDoc {
|
public enum VSubmenuUtilities implements IVSubmenu {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
@@ -141,14 +139,6 @@ public enum VSubmenuUtilities implements IVSubmenu, IVDoc {
|
|||||||
return EMenuGroup.UTILITIES;
|
return EMenuGroup.UTILITIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.view.home.IViewSubmenu#getPanel()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JPanel getPanel() {
|
|
||||||
return pnl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link forge.gui.toolbox.FLabel} */
|
/** @return {@link forge.gui.toolbox.FLabel} */
|
||||||
public FLabel getBtnDownloadPics() {
|
public FLabel getBtnDownloadPics() {
|
||||||
return btnDownloadPics;
|
return btnDownloadPics;
|
||||||
@@ -296,14 +286,6 @@ public enum VSubmenuUtilities implements IVSubmenu, IVDoc {
|
|||||||
return EDocID.HOME_UTILITIES;
|
return EDocID.HOME_UTILITIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.gui.home.IVSubmenu#getSubmenuControl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ICSubmenu getSubmenuControl() {
|
|
||||||
return CSubmenuUtilities.SINGLETON_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
//========== Overridden from IVDoc
|
//========== Overridden from IVDoc
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
package forge.gui.match.controllers;
|
package forge.gui.match.controllers;
|
||||||
|
|
||||||
|
import java.awt.event.MouseAdapter;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
@@ -41,7 +44,9 @@ public enum CDetail implements ICDoc {
|
|||||||
*/
|
*/
|
||||||
public void showCard(final Card c) {
|
public void showCard(final Card c) {
|
||||||
this.currentCard = c;
|
this.currentCard = c;
|
||||||
|
VDetail.SINGLETON_INSTANCE.getLblFlipcard().setVisible(c.isDoubleFaced() ? true : false);
|
||||||
VDetail.SINGLETON_INSTANCE.getPnlDetail().setCard(c);
|
VDetail.SINGLETON_INSTANCE.getPnlDetail().setCard(c);
|
||||||
|
VDetail.SINGLETON_INSTANCE.getParentCell().repaintSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,6 +71,16 @@ public enum CDetail implements ICDoc {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
|
VDetail.SINGLETON_INSTANCE.getPnlDetail().addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(final MouseEvent e) {
|
||||||
|
if (VDetail.SINGLETON_INSTANCE.getPnlDetail().getCard() == null) { return; }
|
||||||
|
|
||||||
|
if (VDetail.SINGLETON_INSTANCE.getPnlDetail().getCard().isDoubleFaced()) {
|
||||||
|
CPicture.SINGLETON_INSTANCE.flipCard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|||||||
@@ -16,7 +16,11 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package forge.gui.match.controllers;
|
package forge.gui.match.controllers;
|
||||||
|
import java.awt.event.MouseAdapter;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
|
import forge.CardCharactersticName;
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.match.views.VPicture;
|
import forge.gui.match.views.VPicture;
|
||||||
@@ -31,6 +35,7 @@ public enum CPicture implements ICDoc {
|
|||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
private Card currentCard = null;
|
private Card currentCard = null;
|
||||||
|
private boolean flipped = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows card details and/or picture in sidebar cardview tabber.
|
* Shows card details and/or picture in sidebar cardview tabber.
|
||||||
@@ -40,6 +45,7 @@ public enum CPicture implements ICDoc {
|
|||||||
*/
|
*/
|
||||||
public void showCard(final Card c) {
|
public void showCard(final Card c) {
|
||||||
this.currentCard = c;
|
this.currentCard = c;
|
||||||
|
VPicture.SINGLETON_INSTANCE.getLblFlipcard().setVisible(c.isDoubleFaced() ? true : false);
|
||||||
VPicture.SINGLETON_INSTANCE.getPnlPicture().setCard(c);
|
VPicture.SINGLETON_INSTANCE.getPnlPicture().setCard(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +71,16 @@ public enum CPicture implements ICDoc {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
|
VPicture.SINGLETON_INSTANCE.getPnlPicture().addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(final MouseEvent e) {
|
||||||
|
if (VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard() == null) { return; }
|
||||||
|
|
||||||
|
if (VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard().isDoubleFaced()) {
|
||||||
|
flipCard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@@ -73,4 +89,19 @@ public enum CPicture implements ICDoc {
|
|||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** */
|
||||||
|
public void flipCard() {
|
||||||
|
if (flipped) {
|
||||||
|
flipped = false;
|
||||||
|
VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard().setState(CardCharactersticName.Original);
|
||||||
|
CDetail.SINGLETON_INSTANCE.showCard(this.currentCard);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
flipped = true;
|
||||||
|
VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard().setState(CardCharactersticName.Transformed);
|
||||||
|
CDetail.SINGLETON_INSTANCE.showCard(this.currentCard);
|
||||||
|
}
|
||||||
|
VPicture.SINGLETON_INSTANCE.getPnlPicture().setImage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
package forge.gui.match.views;
|
package forge.gui.match.views;
|
||||||
|
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.gui.CardDetailPanel;
|
import forge.gui.CardDetailPanel;
|
||||||
import forge.gui.framework.DragCell;
|
import forge.gui.framework.DragCell;
|
||||||
@@ -25,6 +27,7 @@ import forge.gui.framework.EDocID;
|
|||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
import forge.gui.framework.IVDoc;
|
||||||
import forge.gui.match.controllers.CDetail;
|
import forge.gui.match.controllers.CDetail;
|
||||||
|
import forge.gui.toolbox.FSkin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assembles Swing components of card detail area.
|
* Assembles Swing components of card detail area.
|
||||||
@@ -41,6 +44,13 @@ public enum VDetail implements IVDoc {
|
|||||||
|
|
||||||
// Top-level containers
|
// Top-level containers
|
||||||
private final CardDetailPanel pnlDetail = new CardDetailPanel(null);
|
private final CardDetailPanel pnlDetail = new CardDetailPanel(null);
|
||||||
|
private final JLabel lblFlipcard = new JLabel(
|
||||||
|
FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD));
|
||||||
|
|
||||||
|
//========= Constructor
|
||||||
|
private VDetail() {
|
||||||
|
lblFlipcard.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
//========= Overridden methods
|
//========= Overridden methods
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@@ -48,7 +58,8 @@ public enum VDetail implements IVDoc {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void populate() {
|
public void populate() {
|
||||||
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0"));
|
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, center"));
|
||||||
|
parentCell.getBody().add(lblFlipcard, "pos (50% - 40px) (50% - 60px)");
|
||||||
parentCell.getBody().add(pnlDetail, "w 100%!, h 100%!");
|
parentCell.getBody().add(pnlDetail, "w 100%!, h 100%!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,4 +109,9 @@ public enum VDetail implements IVDoc {
|
|||||||
public CardDetailPanel getPnlDetail() {
|
public CardDetailPanel getPnlDetail() {
|
||||||
return pnlDetail;
|
return pnlDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return {@link javax.swing.JLabel} */
|
||||||
|
public JLabel getLblFlipcard() {
|
||||||
|
return lblFlipcard;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
package forge.gui.match.views;
|
package forge.gui.match.views;
|
||||||
|
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.gui.CardPicturePanel;
|
import forge.gui.CardPicturePanel;
|
||||||
import forge.gui.framework.DragCell;
|
import forge.gui.framework.DragCell;
|
||||||
@@ -25,6 +27,7 @@ import forge.gui.framework.EDocID;
|
|||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.framework.IVDoc;
|
import forge.gui.framework.IVDoc;
|
||||||
import forge.gui.match.controllers.CPicture;
|
import forge.gui.match.controllers.CPicture;
|
||||||
|
import forge.gui.toolbox.FSkin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assembles Swing components of card picture area.
|
* Assembles Swing components of card picture area.
|
||||||
@@ -41,10 +44,13 @@ public enum VPicture implements IVDoc {
|
|||||||
|
|
||||||
// Top-level containers
|
// Top-level containers
|
||||||
private final CardPicturePanel pnlPicture = new CardPicturePanel(null);
|
private final CardPicturePanel pnlPicture = new CardPicturePanel(null);
|
||||||
|
private final JLabel lblFlipcard = new JLabel(
|
||||||
|
FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD));
|
||||||
|
|
||||||
//========= Constructor
|
//========= Constructor
|
||||||
private VPicture() {
|
private VPicture() {
|
||||||
pnlPicture.setOpaque(false);
|
pnlPicture.setOpaque(false);
|
||||||
|
lblFlipcard.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//========== Overridden methods
|
//========== Overridden methods
|
||||||
@@ -55,6 +61,7 @@ public enum VPicture implements IVDoc {
|
|||||||
@Override
|
@Override
|
||||||
public void populate() {
|
public void populate() {
|
||||||
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, center"));
|
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, center"));
|
||||||
|
parentCell.getBody().add(lblFlipcard, "pos (50% - 40px) (50% - 60px)");
|
||||||
parentCell.getBody().add(pnlPicture, "w 100%!, h 100%!");
|
parentCell.getBody().add(pnlPicture, "w 100%!, h 100%!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,4 +111,9 @@ public enum VPicture implements IVDoc {
|
|||||||
public CardPicturePanel getPnlPicture() {
|
public CardPicturePanel getPnlPicture() {
|
||||||
return pnlPicture;
|
return pnlPicture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return {@link javax.swing.JLabel} */
|
||||||
|
public JLabel getLblFlipcard() {
|
||||||
|
return lblFlipcard;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ public enum FSkin {
|
|||||||
ICO_SAVEAS (new int[] {660, 580, 20, 20}), /** */
|
ICO_SAVEAS (new int[] {660, 580, 20, 20}), /** */
|
||||||
ICO_UNKNOWN (new int[] {0, 720, 80, 80}), /** */
|
ICO_UNKNOWN (new int[] {0, 720, 80, 80}), /** */
|
||||||
ICO_LOGO (new int[] {480, 0, 200, 200}), /** */
|
ICO_LOGO (new int[] {480, 0, 200, 200}), /** */
|
||||||
|
ICO_FLIPCARD (new int[] {400, 0, 80, 120}), /** */
|
||||||
ICO_FAVICON (new int[] {0, 640, 80, 80});
|
ICO_FAVICON (new int[] {0, 640, 80, 80});
|
||||||
|
|
||||||
private int[] coords;
|
private int[] coords;
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Forge: Play Magic: the Gathering.
|
|
||||||
* Copyright (C) 2011 Forge Team
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package forge.view;
|
|
||||||
|
|
||||||
import forge.gui.toolbox.FPanel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Lays out battle, sidebar, user areas in locked % vals and repaints as
|
|
||||||
* necessary.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public class ViewEditorUI extends FPanel {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a new editor top level.
|
|
||||||
*/
|
|
||||||
public ViewEditorUI() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user