From 92c6ab27a0deaeb00c13db9037120729d4e6a3f6 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Mar 2021 17:36:13 +0800 Subject: [PATCH 1/7] [Mobile] revert fillTriangle --- forge-gui-mobile/src/forge/Graphics.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/forge-gui-mobile/src/forge/Graphics.java b/forge-gui-mobile/src/forge/Graphics.java index afe4fd8c073..d503653abaf 100644 --- a/forge-gui-mobile/src/forge/Graphics.java +++ b/forge-gui-mobile/src/forge/Graphics.java @@ -552,12 +552,9 @@ public class Graphics { } public void fillTriangle(FSkinColor skinColor, float x1, float y1, float x2, float y2, float x3, float y3) { - drawTriangle(skinColor.getColor(), x1, y1, x2, y2, x3, y3, true); + fillTriangle(skinColor.getColor(), x1, y1, x2, y2, x3, y3); } - public void drawTriangle(FSkinColor skinColor, float x1, float y1, float x2, float y2, float x3, float y3) { - drawTriangle(skinColor.getColor(), x1, y1, x2, y2, x3, y3, false); - } - public void drawTriangle(Color color, float x1, float y1, float x2, float y2, float x3, float y3, boolean fill) { + public void fillTriangle(Color color, float x1, float y1, float x2, float y2, float x3, float y3) { batch.end(); //must pause batch while rendering shapes if (alphaComposite < 1) { @@ -567,7 +564,7 @@ public class Graphics { Gdx.gl.glEnable(GL_BLEND); } - startShape(fill ? ShapeType.Filled : ShapeType.Line); + startShape(ShapeType.Filled); shapeRenderer.setColor(color); shapeRenderer.triangle(adjustX(x1), adjustY(y1, 0), adjustX(x2), adjustY(y2, 0), adjustX(x3), adjustY(y3, 0)); endShape(); From d622dc773f9fc9c04bf6f84e9b53ee5df7744384 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Mar 2021 17:50:44 +0800 Subject: [PATCH 2/7] [Android] enclosed check for FScrollPane drawOverlay --- .../src/forge/toolbox/FScrollPane.java | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/forge-gui-mobile/src/forge/toolbox/FScrollPane.java b/forge-gui-mobile/src/forge/toolbox/FScrollPane.java index f590f67cecf..d05a88be084 100644 --- a/forge-gui-mobile/src/forge/toolbox/FScrollPane.java +++ b/forge-gui-mobile/src/forge/toolbox/FScrollPane.java @@ -155,32 +155,36 @@ public abstract class FScrollPane extends FContainer { @Override protected void drawOverlay(Graphics g) { - boolean isFieldZoneView = toString().contains("VField")||toString().contains("VZoneDisplay"); - //TODO: Consider other ways to indicate scroll potential that fade in and out based on input - //draw triangles indicating scroll potential - if (!FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_ENABLE_MATCH_SCROLL_INDICATOR)) - return; - if (!isFieldZoneView) - return; - if (scrollLeft > 0) { - float x = INDICATOR_MARGIN; - float y = getHeight() / 2; - g.fillTriangle(INDICATOR_COLOR, x, y, x + INDICATOR_SIZE, y - INDICATOR_SIZE, x + INDICATOR_SIZE, y + INDICATOR_SIZE); - } - if (scrollLeft < getMaxScrollLeft()) { - float x = getWidth() - INDICATOR_MARGIN; - float y = getHeight() / 2; - g.fillTriangle(INDICATOR_COLOR, x, y, x - INDICATOR_SIZE, y - INDICATOR_SIZE, x - INDICATOR_SIZE, y + INDICATOR_SIZE); - } - if (scrollTop > 0) { - float x = getWidth() / 2; - float y = INDICATOR_MARGIN; - g.fillTriangle(INDICATOR_COLOR, x, y, x - INDICATOR_SIZE, y + INDICATOR_SIZE, x + INDICATOR_SIZE, y + INDICATOR_SIZE); - } - if (scrollTop < getMaxScrollTop()) { - float x = getWidth() / 2; - float y = getHeight() - INDICATOR_MARGIN; - g.fillTriangle(INDICATOR_COLOR, x, y, x - INDICATOR_SIZE, y - INDICATOR_SIZE, x + INDICATOR_SIZE, y - INDICATOR_SIZE); + try { + boolean isFieldZoneView = toString().contains("VField")||toString().contains("VZoneDisplay"); + //TODO: Consider other ways to indicate scroll potential that fade in and out based on input + //draw triangles indicating scroll potential + if (!FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_ENABLE_MATCH_SCROLL_INDICATOR)) + return; + if (!isFieldZoneView) + return; + if (scrollLeft > 0) { + float x = INDICATOR_MARGIN; + float y = getHeight() / 2; + g.fillTriangle(INDICATOR_COLOR, x, y, x + INDICATOR_SIZE, y - INDICATOR_SIZE, x + INDICATOR_SIZE, y + INDICATOR_SIZE); + } + if (scrollLeft < getMaxScrollLeft()) { + float x = getWidth() - INDICATOR_MARGIN; + float y = getHeight() / 2; + g.fillTriangle(INDICATOR_COLOR, x, y, x - INDICATOR_SIZE, y - INDICATOR_SIZE, x - INDICATOR_SIZE, y + INDICATOR_SIZE); + } + if (scrollTop > 0) { + float x = getWidth() / 2; + float y = INDICATOR_MARGIN; + g.fillTriangle(INDICATOR_COLOR, x, y, x - INDICATOR_SIZE, y + INDICATOR_SIZE, x + INDICATOR_SIZE, y + INDICATOR_SIZE); + } + if (scrollTop < getMaxScrollTop()) { + float x = getWidth() / 2; + float y = getHeight() - INDICATOR_MARGIN; + g.fillTriangle(INDICATOR_COLOR, x, y, x - INDICATOR_SIZE, y - INDICATOR_SIZE, x + INDICATOR_SIZE, y - INDICATOR_SIZE); + } + } catch (Exception e) { + e.printStackTrace(); } } From 5de477c4f19f88dbb7a8102f2cd9f50b5c960a50 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 1 Mar 2021 09:53:39 +0000 Subject: [PATCH 3/7] Update soulgorger_orgg.txt --- forge-gui/res/cardsfolder/s/soulgorger_orgg.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/forge-gui/res/cardsfolder/s/soulgorger_orgg.txt b/forge-gui/res/cardsfolder/s/soulgorger_orgg.txt index ebb908a119a..e40fa908143 100644 --- a/forge-gui/res/cardsfolder/s/soulgorger_orgg.txt +++ b/forge-gui/res/cardsfolder/s/soulgorger_orgg.txt @@ -4,12 +4,11 @@ Types:Creature Nightmare Orgg PT:6/6 K:Trample T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ TrigLoseLife | TriggerDescription$ When CARDNAME enters the battlefield, you lose all but 1 life. -SVar:TrigLoseLife:DB$ StoreSVar | References$ LifeAllButOne | SVar$ LifePaidOnETB | Type$ CountSVar | Expression$ LifeAllButOne | SubAbility$ DBLoseLife -SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ LifePaidOnETB | References$ LifePaidOnETB +SVar:TrigLoseLife:DB$ StoreSVar | References$ LifeAllButOne | SVar$ LifePaidOnETB | Type$ Calculate | Expression$ LifeAllButOne | SubAbility$ DBLoseLife +SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ LifePaidOnETB SVar:LifePaidOnETB:Number$0 SVar:LifeAllButOne:Count$YourLifeTotal/Minus.1 T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Creature.Self | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME leaves the battlefield, you gain life equal to the life you lost when it entered the battlefield. -SVar:TrigGainLife:DB$ GainLife | LifeAmount$ LifePaidOnETB | References$ LifePaidOnETB +SVar:TrigGainLife:DB$ GainLife | LifeAmount$ LifePaidOnETB AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/soulgorger_orgg.jpg Oracle:Trample\nWhen Soulgorger Orgg enters the battlefield, you lose all but 1 life.\nWhen Soulgorger Orgg leaves the battlefield, you gain life equal to the life you lost when it entered the battlefield. From 7a98856f330b42695a4e0303d7c0dc55e500a086 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 1 Mar 2021 09:54:33 +0000 Subject: [PATCH 4/7] Update vizkopa_confessor.txt --- forge-gui/res/cardsfolder/v/vizkopa_confessor.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/v/vizkopa_confessor.txt b/forge-gui/res/cardsfolder/v/vizkopa_confessor.txt index 062d66173bf..098cf2df67c 100644 --- a/forge-gui/res/cardsfolder/v/vizkopa_confessor.txt +++ b/forge-gui/res/cardsfolder/v/vizkopa_confessor.txt @@ -4,7 +4,7 @@ Types:Creature Human Cleric PT:1/3 K:Extort T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ PayLife | TriggerDescription$ When CARDNAME enters the battlefield, pay any amount of life. Target opponent reveals that many cards from their hand. You choose one of them and exile it. -SVar:PayLife:AB$ StoreSVar | Cost$ PayLife | References$ X | SVar$ LifePaidOnETB | Type$ CountSVar | Expression$ X | SubAbility$ OppRevealX +SVar:PayLife:AB$ StoreSVar | Cost$ PayLife | References$ X | SVar$ LifePaidOnETB | Type$ Calculate | Expression$ X | SubAbility$ OppRevealX SVar:OppRevealX:DB$ Reveal | ValidTgts$ Opponent | NumCards$ LifePaidOnETB | RememberRevealed$ True | SubAbility$ PickOne SVar:PickOne:DB$ ChooseCard | Defined$ You | Amount$ 1 | Mandatory$ True | ChoiceTitle$ Choose card to exile | Choices$ Card.IsRemembered | ChoiceZone$ Hand | SubAbility$ MoveChosen SVar:MoveChosen:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | Defined$ ChosenCard | SubAbility$ DBCleanup From 6a1a0d71e1173ffbbd91cf83760ed589cc873d34 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 1 Mar 2021 09:55:11 +0000 Subject: [PATCH 5/7] Update minion_of_the_wastes.txt --- forge-gui/res/cardsfolder/m/minion_of_the_wastes.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/forge-gui/res/cardsfolder/m/minion_of_the_wastes.txt b/forge-gui/res/cardsfolder/m/minion_of_the_wastes.txt index 6791b9bea50..17367608230 100644 --- a/forge-gui/res/cardsfolder/m/minion_of_the_wastes.txt +++ b/forge-gui/res/cardsfolder/m/minion_of_the_wastes.txt @@ -4,11 +4,10 @@ Types:Creature Minion PT:*/* K:Trample R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplaceWith$ PayLife | Description$ As CARDNAME enters the battlefield, pay any amount of life. -SVar:PayLife:AB$ StoreSVar | Cost$ PayLife | References$ X | SVar$ LifePaidOnETB | Type$ CountSVar | Expression$ X | SubAbility$ MoveToPlay +SVar:PayLife:AB$ StoreSVar | Cost$ PayLife | References$ X | SVar$ LifePaidOnETB | Type$ Calculate | Expression$ X | SubAbility$ MoveToPlay SVar:MoveToPlay:DB$ ChangeZone | Defined$ ReplacedCard | Origin$ All | Destination$ Battlefield -S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ LifePaidOnETB | SetToughness$ LifePaidOnETB | References$ LifePaidOnETB | Description$ CARDNAME's power and toughness are each equal to the life paid as it entered the battlefield. +S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ LifePaidOnETB | SetToughness$ LifePaidOnETB | Description$ CARDNAME's power and toughness are each equal to the life paid as it entered the battlefield. SVar:X:Count$xPaid SVar:LifePaidOnETB:Number$0 AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/minion_of_the_wastes.jpg Oracle:Trample\nAs Minion of the Wastes enters the battlefield, pay any amount of life.\nMinion of the Wastes's power and toughness are each equal to the life paid as it entered the battlefield. From 30a509cde687c0105d003a6c352fcbcce8179e14 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Mar 2021 10:03:26 +0000 Subject: [PATCH 6/7] Update FScrollPane.java --- forge-gui-mobile/src/forge/toolbox/FScrollPane.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/forge-gui-mobile/src/forge/toolbox/FScrollPane.java b/forge-gui-mobile/src/forge/toolbox/FScrollPane.java index d05a88be084..cb60e76e3d3 100644 --- a/forge-gui-mobile/src/forge/toolbox/FScrollPane.java +++ b/forge-gui-mobile/src/forge/toolbox/FScrollPane.java @@ -157,12 +157,13 @@ public abstract class FScrollPane extends FContainer { protected void drawOverlay(Graphics g) { try { boolean isFieldZoneView = toString().contains("VField")||toString().contains("VZoneDisplay"); - //TODO: Consider other ways to indicate scroll potential that fade in and out based on input - //draw triangles indicating scroll potential + //if ForgePreferences.FPref.UI_ENABLE_MATCH_SCROLL_INDICATOR is missing this will return NPE and could cause lockup on Startup if (!FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_ENABLE_MATCH_SCROLL_INDICATOR)) return; if (!isFieldZoneView) return; + //TODO: Consider other ways to indicate scroll potential that fade in and out based on input + //draw triangles indicating scroll potential if (scrollLeft > 0) { float x = INDICATOR_MARGIN; float y = getHeight() / 2; @@ -183,9 +184,7 @@ public abstract class FScrollPane extends FContainer { float y = getHeight() - INDICATOR_MARGIN; g.fillTriangle(INDICATOR_COLOR, x, y, x - INDICATOR_SIZE, y - INDICATOR_SIZE, x + INDICATOR_SIZE, y - INDICATOR_SIZE); } - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) {} } //allow overriding to adjust what scroll positions are restored after layout From af20285014dc01d3f599a5f5c09558dd41132eb4 Mon Sep 17 00:00:00 2001 From: CCTV-1 Date: Mon, 1 Mar 2021 18:51:43 +0800 Subject: [PATCH 7/7] update simplified chinese translation --- forge-gui/res/languages/zh-CN.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/forge-gui/res/languages/zh-CN.properties b/forge-gui/res/languages/zh-CN.properties index a9770e40446..29dfdf8671d 100644 --- a/forge-gui/res/languages/zh-CN.properties +++ b/forge-gui/res/languages/zh-CN.properties @@ -585,7 +585,7 @@ lblNetDecks=网络套牌 lblNetCommanderDecks=网络指挥官套牌 lblNetArchiveStandardDecks=网络标准套牌存档 lblNetArchiveModernDecks=网络摩登套牌存档 -lblNetArchivePioneerDecks=Net Archive Pioneer Decks +lblNetArchivePioneerDecks=网络先驱套牌存档 #VSubmenuTutorial lblTutorial=教程 lblTutorialMode=教程模式 @@ -1000,8 +1000,8 @@ lblEnableRoundBorder=启用圆角边框掩码 nlEnableRoundBorder=启用后,卡牌边框会变成圆角(带有完整边框的卡牌图片效果最好)。 lblPreloadExtendedArtCards=预加载拉伸卡图 nlPreloadExtendedArtCards=启用后,拉伸卡图将在启动时加载到缓存(使用高内存)。 -lblEnableMatchScrollIndicator=Match Scroll Indicator -nlEnableMatchScrollIndicator=When enabled, show the scroll indicator on the match screen. +lblEnableMatchScrollIndicator=对局滚动指示器 +nlEnableMatchScrollIndicator=启用后,将在比赛屏幕上显示滚动指示器。 lblShowFPSDisplay=显示当前的FPS值 nlShowFPSDisplay=启用后,将在画面左上角显示当前Forge的FPS(实验性特性)。 lblEnableUnknownCards=启用未知卡牌 @@ -1419,7 +1419,7 @@ lblChooseSets=选择系列 #HistoricFormatSelect.java lblChooseFormat=选择赛制 #Card.java -lblAdventure=Adventure +lblAdventure=历险 #TriggerAdapt.java lblAdapt=演化 #TriggerAttached.java