diff --git a/app/src/main/java/com/nicue/onetwo/ui/life/LifePlayerUiModel.java b/app/src/main/java/com/nicue/onetwo/ui/life/LifePlayerUiModel.java index a08aa95..081c475 100644 --- a/app/src/main/java/com/nicue/onetwo/ui/life/LifePlayerUiModel.java +++ b/app/src/main/java/com/nicue/onetwo/ui/life/LifePlayerUiModel.java @@ -8,6 +8,7 @@ public class LifePlayerUiModel { private final int rotationDegrees; private final int backgroundColorRes; private final int foregroundColorRes; + private final int accentBackgroundColorRes; private final int recentLifeChange; private final long recentLifeChangeTimestampMs; private final boolean commanderDamageVisible; @@ -25,6 +26,7 @@ public LifePlayerUiModel( int rotationDegrees, int backgroundColorRes, int foregroundColorRes, + int accentBackgroundColorRes, int recentLifeChange, long recentLifeChangeTimestampMs, boolean commanderDamageVisible, @@ -40,6 +42,7 @@ public LifePlayerUiModel( this.rotationDegrees = rotationDegrees; this.backgroundColorRes = backgroundColorRes; this.foregroundColorRes = foregroundColorRes; + this.accentBackgroundColorRes = accentBackgroundColorRes; this.recentLifeChange = recentLifeChange; this.recentLifeChangeTimestampMs = recentLifeChangeTimestampMs; this.commanderDamageVisible = commanderDamageVisible; @@ -72,6 +75,10 @@ public int getForegroundColorRes() { return foregroundColorRes; } + public int getAccentBackgroundColorRes() { + return accentBackgroundColorRes; + } + public int getRecentLifeChange() { return recentLifeChange; } diff --git a/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeFragment.java b/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeFragment.java index 55b85e8..2311900 100644 --- a/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeFragment.java +++ b/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeFragment.java @@ -353,8 +353,19 @@ private void bindPlayerCell( player.isTimerExpired() ? ContextCompat.getColor(requireContext(), R.color.mtg_expired_foreground) : ContextCompat.getColor(requireContext(), player.getForegroundColorRes()); + int accentBgColor = + player.isTimerExpired() + ? ContextCompat.getColor(requireContext(), R.color.mtg_expired_foreground) + : ContextCompat.getColor( + requireContext(), player.getAccentBackgroundColorRes()); int seatIndex = player.getSeatIndex(); + ColorStateList accentTint = ColorStateList.valueOf(accentBgColor); + cellBinding.playerColorIndicatorStart.setImageTintList(accentTint); + cellBinding.playerColorIndicatorEnd.setImageTintList(accentTint); + cellBinding.playerColorIndicatorBottomStart.setImageTintList(accentTint); + cellBinding.playerColorIndicatorBottomEnd.setImageTintList(accentTint); + TextViewCompat.setAutoSizeTextTypeUniformWithConfiguration( cellBinding.tvLifeCount, 20, diff --git a/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeViewModel.java b/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeViewModel.java index bfbf1d5..492cae3 100644 --- a/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeViewModel.java +++ b/app/src/main/java/com/nicue/onetwo/ui/life/MtgLifeViewModel.java @@ -781,6 +781,7 @@ private void updateUiState() { getRotationForSeat(seatIndex, totalPlayers), getBackgroundColorResForSeat(seatIndex), getForegroundColorResForSeat(seatIndex), + getAccentBackgroundColorResForSeat(seatIndex), recentLifeChange, recentLifeChangeTimestampMs, commanderDamageEnabled && totalPlayers > 1, diff --git a/app/src/main/res/drawable/ic_corner_bracket.xml b/app/src/main/res/drawable/ic_corner_bracket.xml new file mode 100644 index 0000000..8242d87 --- /dev/null +++ b/app/src/main/res/drawable/ic_corner_bracket.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/layout/life_player_cell.xml b/app/src/main/res/layout/life_player_cell.xml index 9f51b78..24c0ce3 100644 --- a/app/src/main/res/layout/life_player_cell.xml +++ b/app/src/main/res/layout/life_player_cell.xml @@ -5,6 +5,46 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + + + + + + +