* GUI: new reworked GUI and card render engine, card icons and dozens of other fixes (see full list in related PR);

This commit is contained in:
Oleg Agafonov 2021-01-30 16:38:55 +04:00
parent df98cc3e62
commit a1da5ef437
304 changed files with 7266 additions and 5093 deletions

View file

@ -28,6 +28,7 @@ public enum ClientCallbackMethod {
GAME_INFORM_PERSONAL("gameInformPersonal"),
GAME_ERROR("gameError"),
GAME_UPDATE("gameUpdate"),
GAME_REDRAW_GUI("gameRedrawGUI", true),
DRAFT_OVER("draftOver"),
REPLAY_DONE("replayDone"),
USER_REQUEST_DIALOG("userRequestDialog"),
@ -44,13 +45,22 @@ public enum ClientCallbackMethod {
GAME_PLAY_XMANA("gamePlayXMana"),
GAME_GET_AMOUNT("gameSelectAmount"),
DRAFT_INIT("draftInit"),
// DRAFT_INFORM("draftInform"),
DRAFT_PICK("draftPick"),
DRAFT_UPDATE("draftUpdate");
String value;
String code;
boolean isClientSideMessage;
ClientCallbackMethod(String value) {
this.value = value;
ClientCallbackMethod(String code) {
this(code, false);
}
ClientCallbackMethod(String code, boolean isClientSideMessage) {
this.code = code;
this.isClientSideMessage = isClientSideMessage;
}
public boolean isClientSideMessage() {
return this.isClientSideMessage;
}
}

View file

@ -1,6 +1,6 @@
package mage.interfaces.plugin;
import mage.cards.MagePermanent;
import mage.cards.MageCard;
import mage.cards.action.ActionCallback;
import mage.view.CardView;
import mage.view.PermanentView;
@ -16,17 +16,16 @@ import java.util.UUID;
* Interface for card plugins
*
* @author nantuko
* @version 0.1 31.10.2010 #getMagePermanent, #sortPermanents
*/
public interface CardPlugin extends Plugin {
MagePermanent getMagePermanent(PermanentView permanent, Dimension dimension, UUID gameId, ActionCallback callback,
boolean canBeFoil, boolean loadImage, int renderMode, boolean needFullPermanentRender);
MagePermanent getMageCard(CardView permanent, Dimension dimension, UUID gameId, ActionCallback callback,
MageCard getMagePermanent(PermanentView permanent, Dimension dimension, UUID gameId, ActionCallback callback,
boolean canBeFoil, boolean loadImage, int renderMode, boolean needFullPermanentRender);
int sortPermanents(Map<String, JComponent> ui, Map<UUID, MagePermanent> cards, boolean nonPermanentsOwnRow, boolean topPanel);
MageCard getMageCard(CardView permanent, Dimension dimension, UUID gameId, ActionCallback callback,
boolean canBeFoil, boolean loadImage, int renderMode, boolean needFullPermanentRender);
int sortPermanents(Map<String, JComponent> ui, Map<UUID, MageCard> cards, boolean nonPermanentsOwnRow, boolean topPanel);
/**
* Download various symbols (mana, tap, set).
@ -35,9 +34,21 @@ public interface CardPlugin extends Plugin {
*/
void downloadSymbols(String imagesDir);
void onAddCard(MagePermanent card, int count);
/**
* Uses for show/hide animation on the battlefield
*
* @param card
* @param count
*/
void onAddCard(MageCard card, int count);
void onRemoveCard(MagePermanent card, int count);
/**
* Uses for show/hide animation on the battlefield
*
* @param card
* @param count
*/
void onRemoveCard(MageCard card, int count);
JComponent getCardInfoPane();