diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayerConfiguration.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayerConfiguration.kt index 85ac64bf..6b7b5f75 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayerConfiguration.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayerConfiguration.kt @@ -119,6 +119,7 @@ class ReplayerConfiguration(var handHistory: HandHistory) { var rectCenterY: Float var chipXOffset: Float var chipYOffset: Float + var chipTextYOffsetCoef = 0f var circleOffset = playerItemsHeight * 1.75f for (i in 1..count) { @@ -140,13 +141,15 @@ class ReplayerConfiguration(var handHistory: HandHistory) { rectCenterY = height - this.tableVPadding circleOffset *= -1 chipXOffset = cornerDirection * chipsHorizontalOffsetFromStackCenter - chipYOffset = -1.25f * chipsVerticalOffsetFromStackCenter + chipYOffset = -1 * chipsVerticalOffsetFromStackCenter + chipTextYOffsetCoef = 1f } 1 -> { // left rectCenterX = this.tableHPadding rectCenterY = height - y * i chipXOffset = 1 * chipsHorizontalOffsetFromStackCenter chipYOffset = cornerDirection * -1 * chipsVerticalOffsetFromStackCenter + chipTextYOffsetCoef = 1f * (i - 1) / count } 2 -> { // top rectCenterX = x * i @@ -159,6 +162,7 @@ class ReplayerConfiguration(var handHistory: HandHistory) { rectCenterY = y * i chipXOffset = -1 * chipsHorizontalOffsetFromStackCenter chipYOffset = cornerDirection * chipsVerticalOffsetFromStackCenter + chipTextYOffsetCoef = 1f * (count - i - 1) / count } else -> throw PAIllegalStateException("can't happen") } @@ -170,9 +174,13 @@ class ReplayerConfiguration(var handHistory: HandHistory) { this.playerStackRects.add(RectF(left, top, right, bottom)) val chipRadius = this.playerItemsHeight / 4 - this.chipCircles.add(Circle(rectCenterX + chipXOffset, rectCenterY + chipYOffset, chipRadius)) + + val chipCircleY = rectCenterY + chipYOffset - chipTextYOffsetCoef * chipRadius + + this.chipCircles.add(Circle(rectCenterX + chipXOffset, chipCircleY, chipRadius)) val chipTextSize = chipRadius - this.chipTextPoints.add(TextPoint(rectCenterX + chipXOffset, rectCenterY + chipYOffset + 2 * chipTextSize, chipTextSize)) + + this.chipTextPoints.add(TextPoint(rectCenterX + chipXOffset, chipCircleY + 2 * chipTextSize, chipTextSize)) // we give each text zone 1/3rd of the box height, leaving 1/3 for space // the y given is the bottom of the text rect, giving 1/18th as the offset diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/TableDrawer.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/TableDrawer.kt index 56d1ba94..bc5555ef 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/TableDrawer.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/TableDrawer.kt @@ -23,7 +23,7 @@ class TableDrawer(bitmap: Bitmap) : Canvas(bitmap) { private const val tableStrokeWidth = 30f private const val playerStrokeWidth = 8f - private const val cardStrokeWidth = 6f + private const val cardStrokeWidth = 8f private val strokePaint = Paint() private val fillPaint = Paint()