Skip to content

Commit

Permalink
Opt[Menu]: optimize menu layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirosakiMio committed Oct 10, 2024
1 parent d39f501 commit 85d7940
Show file tree
Hide file tree
Showing 3 changed files with 571 additions and 676 deletions.
7 changes: 0 additions & 7 deletions FCL/src/main/java/com/tungsten/fcl/control/GameMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public class GameMenu implements MenuCallback, View.OnClickListener {
private FCLButton manageButtonStyle;
private FCLButton manageDirectionStyle;

private FCLButton openMultiplayerMenu;
private FCLButton manageQuickInput;
private FCLButton sendKeycode;
private FCLButton gamepadResetMapper;
Expand Down Expand Up @@ -361,7 +360,6 @@ private void initRightMenu() {
FCLTextView gamepadAimZoneText = findViewById(R.id.gamepad_aimzone_text);
FCLTextView gyroSensitivityText = findViewById(R.id.gyro_sensitivity_text);

openMultiplayerMenu = findViewById(R.id.open_multiplayer_menu);
manageQuickInput = findViewById(R.id.open_quick_input);
sendKeycode = findViewById(R.id.open_send_key);
gamepadResetMapper = findViewById(R.id.gamepad_reset_mapper);
Expand Down Expand Up @@ -522,7 +520,6 @@ protected void invalidated() {
gamepadAimZoneText.stringProperty().bind(Bindings.createStringBinding(() -> gamepadAimZoneProperty.get() + " %", gamepadAimZoneProperty));
gyroSensitivityText.stringProperty().bind(Bindings.createStringBinding(() -> menuSetting.getGyroscopeSensitivityProperty().get() + "", menuSetting.getGyroscopeSensitivityProperty()));

openMultiplayerMenu.setOnClickListener(this);
manageQuickInput.setOnClickListener(this);
sendKeycode.setOnClickListener(this);
gamepadResetMapper.setOnClickListener(this);
Expand Down Expand Up @@ -785,10 +782,6 @@ public void onClone(CustomControl view) {
DirectionStyleDialog dialog = new DirectionStyleDialog(getActivity(), false, null, null);
dialog.show();
}

if (v == openMultiplayerMenu) {

}
if (v == manageQuickInput) {
openQuickInput();
}
Expand Down
56 changes: 28 additions & 28 deletions FCL/src/main/res/layout/menu_left.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.tungsten.fcllibrary.component.view.FCLLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand All @@ -23,7 +23,7 @@
android:layout_height="match_parent"
android:layout_marginTop="10dp">

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
Expand All @@ -41,7 +41,7 @@
android:layout_height="1dp"
android:background="@android:color/darker_gray"/>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:padding="5dp"
Expand All @@ -65,9 +65,9 @@
android:layout_gravity="center"
android:id="@+id/current_controller"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:layout_width="match_parent"
Expand All @@ -90,9 +90,9 @@
android:layout_gravity="center"
android:id="@+id/edit_mode"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:layout_width="match_parent"
Expand All @@ -115,9 +115,9 @@
android:layout_gravity="center"
android:id="@+id/show_boundary"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:layout_width="match_parent"
Expand All @@ -140,9 +140,9 @@
android:layout_gravity="center"
android:id="@+id/hide_all"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:layout_width="match_parent"
Expand All @@ -165,9 +165,9 @@
android:layout_gravity="center"
android:id="@+id/auto_fit"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:layout_marginTop="5dp"
android:padding="5dp"
android:layout_width="match_parent"
Expand All @@ -193,7 +193,7 @@
android:layout_gravity="center"
android:textSize="12sp"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLSeekBar
android:layout_marginTop="10dp"
Expand Down Expand Up @@ -224,7 +224,7 @@
android:layout_height="1dp"
android:background="@android:color/darker_gray"/>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:padding="5dp"
Expand All @@ -248,9 +248,9 @@
android:layout_gravity="center"
android:id="@+id/current_view_group"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:padding="5dp"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
Expand All @@ -276,9 +276,9 @@
android:textSize="12sp"
android:id="@+id/manage_view_groups"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:padding="5dp"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
Expand All @@ -304,9 +304,9 @@
android:textSize="12sp"
android:id="@+id/add_button"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:padding="5dp"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
Expand All @@ -332,7 +332,7 @@
android:textSize="12sp"
android:id="@+id/add_direction"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLTextView
app:auto_text_tint="true"
Expand All @@ -348,7 +348,7 @@
android:layout_height="1dp"
android:background="@android:color/darker_gray"/>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:padding="5dp"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
Expand All @@ -374,9 +374,9 @@
android:textSize="12sp"
android:id="@+id/manage_button_style"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

<com.tungsten.fcllibrary.component.view.FCLLinearLayout
<LinearLayout
android:padding="5dp"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
Expand All @@ -402,12 +402,12 @@
android:textSize="12sp"
android:id="@+id/manage_direction_style"/>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>

</ScrollView>

</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
</LinearLayout>
Loading

0 comments on commit 85d7940

Please sign in to comment.