From 53c3b5096ca9e6118d5c0dfb24d722ed8d05fa10 Mon Sep 17 00:00:00 2001
From: Gabriel Machado <97042217+GabrielBRDeveloper@users.noreply.github.com>
Date: Thu, 14 Dec 2023 00:56:35 -0400
Subject: [PATCH] Best Screen Gamepad accessibility
---
.../main/res/drawable/analog_background.xml | 26 +++++
.../main/res/drawable/analog_foreground.xml | 41 +++++++
.../app/src/main/res/drawable/button_a.xml | 39 +++++++
.../app/src/main/res/drawable/button_b.xml | 39 +++++++
.../app/src/main/res/drawable/button_l.xml | 24 +++++
.../app/src/main/res/drawable/button_r.xml | 24 +++++
.../src/main/res/drawable/button_select.xml | 38 +++++++
.../src/main/res/drawable/button_start.xml | 38 +++++++
.../app/src/main/res/drawable/button_x.xml | 39 +++++++
.../app/src/main/res/drawable/button_y.xml | 39 +++++++
.../app/src/main/res/drawable/dpad_down.xml | 39 +++++++
.../app/src/main/res/drawable/dpad_left.xml | 39 +++++++
.../app/src/main/res/drawable/dpad_right.xml | 39 +++++++
.../app/src/main/res/drawable/dpad_up.xml | 39 +++++++
.../app/src/main/res/drawable/ic_add.xml | 5 +
.../res/drawable/simple_analog_background.xml | 19 ----
.../res/drawable/simple_circle_button.xml | 10 --
.../src/main/res/layout/controller_dpad.xml | 30 +++---
.../main/res/layout/controller_gamepad.xml | 34 +++---
.../main/res/layout/controller_joystick.xml | 11 ++
.../app/src/main/res/layout/controller_l.xml | 10 ++
.../app/src/main/res/layout/controller_r.xml | 10 ++
.../src/main/res/layout/controller_select.xml | 10 ++
.../src/main/res/layout/controller_start.xml | 10 ++
.../app/src/main/res/layout/game_activity.xml | 100 +++---------------
.../app/src/main/res/values/styleable.xml | 10 +-
26 files changed, 613 insertions(+), 149 deletions(-)
create mode 100644 src/pandroid/app/src/main/res/drawable/analog_background.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/analog_foreground.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_a.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_b.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_l.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_r.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_select.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_start.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_x.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/button_y.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/dpad_down.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/dpad_left.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/dpad_right.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/dpad_up.xml
create mode 100644 src/pandroid/app/src/main/res/drawable/ic_add.xml
delete mode 100644 src/pandroid/app/src/main/res/drawable/simple_analog_background.xml
delete mode 100644 src/pandroid/app/src/main/res/drawable/simple_circle_button.xml
create mode 100644 src/pandroid/app/src/main/res/layout/controller_joystick.xml
create mode 100644 src/pandroid/app/src/main/res/layout/controller_l.xml
create mode 100644 src/pandroid/app/src/main/res/layout/controller_r.xml
create mode 100644 src/pandroid/app/src/main/res/layout/controller_select.xml
create mode 100644 src/pandroid/app/src/main/res/layout/controller_start.xml
diff --git a/src/pandroid/app/src/main/res/drawable/analog_background.xml b/src/pandroid/app/src/main/res/drawable/analog_background.xml
new file mode 100644
index 000000000..3f3747cd7
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/analog_background.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/analog_foreground.xml b/src/pandroid/app/src/main/res/drawable/analog_foreground.xml
new file mode 100644
index 000000000..c339e69fb
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/analog_foreground.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_a.xml b/src/pandroid/app/src/main/res/drawable/button_a.xml
new file mode 100644
index 000000000..d04306b9d
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_a.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_b.xml b/src/pandroid/app/src/main/res/drawable/button_b.xml
new file mode 100644
index 000000000..1611f28df
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_b.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_l.xml b/src/pandroid/app/src/main/res/drawable/button_l.xml
new file mode 100644
index 000000000..a2b2f5ad5
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_l.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_r.xml b/src/pandroid/app/src/main/res/drawable/button_r.xml
new file mode 100644
index 000000000..24cf739bb
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_r.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_select.xml b/src/pandroid/app/src/main/res/drawable/button_select.xml
new file mode 100644
index 000000000..c71a3bff7
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_select.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_start.xml b/src/pandroid/app/src/main/res/drawable/button_start.xml
new file mode 100644
index 000000000..33e0a58b1
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_start.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_x.xml b/src/pandroid/app/src/main/res/drawable/button_x.xml
new file mode 100644
index 000000000..4050c5394
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_x.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/button_y.xml b/src/pandroid/app/src/main/res/drawable/button_y.xml
new file mode 100644
index 000000000..877996917
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/button_y.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/dpad_down.xml b/src/pandroid/app/src/main/res/drawable/dpad_down.xml
new file mode 100644
index 000000000..3a904b2d3
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/dpad_down.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/dpad_left.xml b/src/pandroid/app/src/main/res/drawable/dpad_left.xml
new file mode 100644
index 000000000..8dad75bec
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/dpad_left.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/dpad_right.xml b/src/pandroid/app/src/main/res/drawable/dpad_right.xml
new file mode 100644
index 000000000..e0bea7ec8
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/dpad_right.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/dpad_up.xml b/src/pandroid/app/src/main/res/drawable/dpad_up.xml
new file mode 100644
index 000000000..4bc0a96b0
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/dpad_up.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/ic_add.xml b/src/pandroid/app/src/main/res/drawable/ic_add.xml
new file mode 100644
index 000000000..89633bb12
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/ic_add.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/pandroid/app/src/main/res/drawable/simple_analog_background.xml b/src/pandroid/app/src/main/res/drawable/simple_analog_background.xml
deleted file mode 100644
index 81855e147..000000000
--- a/src/pandroid/app/src/main/res/drawable/simple_analog_background.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/drawable/simple_circle_button.xml b/src/pandroid/app/src/main/res/drawable/simple_circle_button.xml
deleted file mode 100644
index 15879540b..000000000
--- a/src/pandroid/app/src/main/res/drawable/simple_circle_button.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- -
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/layout/controller_dpad.xml b/src/pandroid/app/src/main/res/layout/controller_dpad.xml
index 0eea66ace..e3320dafb 100644
--- a/src/pandroid/app/src/main/res/layout/controller_dpad.xml
+++ b/src/pandroid/app/src/main/res/layout/controller_dpad.xml
@@ -1,28 +1,34 @@
+ android:layout_width="57pt"
+ android:layout_height="57pt"
+ android:layout_gravity="bottom"
+ android:layout_marginBottom="40pt">
+ style="@style/ControllerStyle.SimpleButton"
+ android:background="@drawable/dpad_up"
+ android:layout_marginLeft="19pt"/>
+ style="@style/ControllerStyle.SimpleButton"
+ android:background="@drawable/dpad_left"
+ android:layout_marginTop="19pt"/>
+ style="@style/ControllerStyle.SimpleButton"
+ android:background="@drawable/dpad_down"
+ android:layout_marginTop="38pt"
+ android:layout_marginLeft="19pt"/>
+ style="@style/ControllerStyle.SimpleButton"
+ android:background="@drawable/dpad_right"
+ android:layout_marginTop="19pt"
+ android:layout_marginLeft="38pt"/>
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/layout/controller_gamepad.xml b/src/pandroid/app/src/main/res/layout/controller_gamepad.xml
index 16b5ba72e..dce6a60e3 100644
--- a/src/pandroid/app/src/main/res/layout/controller_gamepad.xml
+++ b/src/pandroid/app/src/main/res/layout/controller_gamepad.xml
@@ -1,32 +1,34 @@
+ android:layout_width="57pt"
+ android:layout_height="57pt"
+ android:layout_gravity="end|bottom"
+ android:layout_marginBottom="30pt">
+ style="@style/ControllerStyle.SimpleButton"
+ android:layout_marginStart="19pt"
+ android:background="@drawable/button_x"/>
+ style="@style/ControllerStyle.SimpleButton"
+ android:layout_marginTop="19pt"
+ android:background="@drawable/button_y"/>
+ style="@style/ControllerStyle.SimpleButton"
+ android:layout_marginTop="38pt"
+ android:layout_marginStart="19pt"
+ android:background="@drawable/button_b"/>
+ style="@style/ControllerStyle.SimpleButton"
+ android:layout_marginTop="19pt"
+ android:layout_marginStart="38pt"
+ android:background="@drawable/button_a"/>
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/layout/controller_joystick.xml b/src/pandroid/app/src/main/res/layout/controller_joystick.xml
new file mode 100644
index 000000000..d758822fb
--- /dev/null
+++ b/src/pandroid/app/src/main/res/layout/controller_joystick.xml
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/layout/controller_l.xml b/src/pandroid/app/src/main/res/layout/controller_l.xml
new file mode 100644
index 000000000..96ec7582e
--- /dev/null
+++ b/src/pandroid/app/src/main/res/layout/controller_l.xml
@@ -0,0 +1,10 @@
+
+
diff --git a/src/pandroid/app/src/main/res/layout/controller_r.xml b/src/pandroid/app/src/main/res/layout/controller_r.xml
new file mode 100644
index 000000000..8aa2fba17
--- /dev/null
+++ b/src/pandroid/app/src/main/res/layout/controller_r.xml
@@ -0,0 +1,10 @@
+
+
diff --git a/src/pandroid/app/src/main/res/layout/controller_select.xml b/src/pandroid/app/src/main/res/layout/controller_select.xml
new file mode 100644
index 000000000..a77855bec
--- /dev/null
+++ b/src/pandroid/app/src/main/res/layout/controller_select.xml
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/layout/controller_start.xml b/src/pandroid/app/src/main/res/layout/controller_start.xml
new file mode 100644
index 000000000..94f12eb77
--- /dev/null
+++ b/src/pandroid/app/src/main/res/layout/controller_start.xml
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/layout/game_activity.xml b/src/pandroid/app/src/main/res/layout/game_activity.xml
index 6f6f65d7e..9536a847f 100644
--- a/src/pandroid/app/src/main/res/layout/game_activity.xml
+++ b/src/pandroid/app/src/main/res/layout/game_activity.xml
@@ -1,5 +1,6 @@
@@ -18,95 +19,18 @@
+ android:layout_height="match_parent"
+ android:alpha="0.6"
+ android:padding="14pt">
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pandroid/app/src/main/res/values/styleable.xml b/src/pandroid/app/src/main/res/values/styleable.xml
index c5fc43296..692197243 100644
--- a/src/pandroid/app/src/main/res/values/styleable.xml
+++ b/src/pandroid/app/src/main/res/values/styleable.xml
@@ -1,10 +1,12 @@
-
\ No newline at end of file