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 c38e0535..3a256906 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 @@ -219,24 +219,11 @@ class TableDrawer(bitmap: Bitmap) : Canvas(bitmap) { for (i in 0 until hh.numberOfPlayers) { drawPlayerRectangle(i,false, animator, canvas, context) drawPlayerCircle(i, animator, canvas, context) - drawDealerButton(animator, canvas, context) +// drawDealerButton(animator, canvas, context) } } - private fun drawDealerButton(animator: ReplayerAnimator, canvas: Canvas, context: Context) { - - // Dealer button - val dealerCircle = animator.dealerCircle - this.fillPaint.color = context.getColor(R.color.red) - canvas.drawCircle(dealerCircle.x, dealerCircle.y, dealerCircle.radius, fillPaint) - this.strokePaint.color = context.getColor(R.color.white) - canvas.drawCircle(dealerCircle.x, dealerCircle.y, dealerCircle.radius, strokePaint) - this.textPaint.textSize = dealerCircle.radius - canvas.drawText("D", dealerCircle.x, dealerCircle.y + this.textPaint.textSize / 3, this.textPaint) - - } - private fun drawChip(amount: Double, playerIndex: Int, animator: ReplayerAnimator, canvas: Canvas, context: Context) { val circle = animator.chipCircle(playerIndex) val text = animator.chipText(playerIndex) @@ -368,11 +355,24 @@ class TableDrawer(bitmap: Bitmap) : Canvas(bitmap) { this.strokePaint ) - if (i == animator.handHistory.heroIndex) { // refresh dealer button + if (i == animator.handHistory.numberOfPlayers - 1) { // refresh dealer button drawDealerButton(animator, canvas, context) } } + private fun drawDealerButton(animator: ReplayerAnimator, canvas: Canvas, context: Context) { + + // Dealer button + val dealerCircle = animator.dealerCircle + this.fillPaint.color = context.getColor(R.color.red) + canvas.drawCircle(dealerCircle.x, dealerCircle.y, dealerCircle.radius, fillPaint) + this.strokePaint.color = context.getColor(R.color.white) + canvas.drawCircle(dealerCircle.x, dealerCircle.y, dealerCircle.radius, strokePaint) + this.textPaint.textSize = dealerCircle.radius + canvas.drawText("D", dealerCircle.x, dealerCircle.y + this.textPaint.textSize / 3, this.textPaint) + + } + private fun drawPositionAndInfo(i: Int, secondLine: String?, animator: ReplayerAnimator, canvas: Canvas) { val hh = animator.handHistory