|
|
|
|
@ -219,22 +219,9 @@ 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) { |
|
|
|
|
@ -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 |
|
|
|
|
|