Extend DPad Touch Area on Android

This commit is contained in:
Florian Märkl 2021-01-13 20:24:25 +01:00
commit 3a90ef0a65
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
2 changed files with 6 additions and 5 deletions

View file

@ -71,7 +71,7 @@ class DPadView @JvmOverloads constructor(
else
drawable = dpadIdleDrawable
drawable?.setBounds(0, 0, width, height)
drawable?.setBounds(paddingLeft, paddingTop, width - paddingRight, height - paddingBottom)
//drawable?.alpha = 127
drawable?.draw(canvas)
}

View file

@ -49,10 +49,11 @@
<com.metallic.chiaki.touchcontrols.DPadView
android:id="@+id/dpadView"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginLeft="32dp"
android:layout_marginBottom="32dp"
android:layout_width="160dp"
android:layout_height="160dp"
android:padding="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />