Permalink
Browse files

front: WIP new cheat editor

  • Loading branch information...
fzurita committed Mar 18, 2016
1 parent ceec93a commit 4b5ce8f9c8da16234596404a5fe228e36380b66b
View
@@ -27,6 +27,7 @@
android:allowBackup="true"
android:isGame="true"
android:hardwareAccelerated="true"
+ android:exported="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:logo="@drawable/hireslogo"
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <LinearLayout
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <EditText
+ android:id="@+id/textCheatTitle"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="5dp"
+ android:hint="@string/cheatEditor_hint_cheatTitle"
+ android:inputType="textNoSuggestions|text"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <EditText
+ android:id="@+id/textCheatNotes"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="5dp"
+ android:gravity="top|start"
+ android:hint="@string/cheatEditor_hint_cheatNotes"
+ android:lines="8"
+ android:maxLines="10"
+ android:minLines="1"
+ android:scrollbars="vertical"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <EditText
+ android:id="@+id/textCheatAddress"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_margin="5dp"
+ android:layout_weight="2"
+ android:digits="0123456789ABCDEF"
+ android:hint="@string/cheatEditor_hint_cheatAddress"
+ android:inputType="textCapCharacters"
+ android:maxLength="8"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <EditText
+ android:id="@+id/textCheatMainValue"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="5dp"
+ android:layout_weight="1"
+ android:digits="0123456789ABCDEF"
+ android:hint="@string/cheatEditor_hint_value"
+ android:inputType="textCapCharacters"
+ android:maxLength="4"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/linearLayoutCheatOptionsHolder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="?android:attr/buttonBarStyle"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/addMoreCheatOptionsButton"
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="@string/cheatEditor_add_option"
+ android:drawableLeft="@android:drawable/ic_menu_add"
+ android:drawableStart="@android:drawable/ic_menu_add"
+ android:text="@string/cheatEditor_add_option" />
+ <Button
+ android:id="@+id/addMoreCheatsButton"
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="@string/cheatEditor_add_cheats"
+ android:drawableLeft="@android:drawable/ic_menu_add"
+ android:drawableStart="@android:drawable/ic_menu_add"
+ android:text="@string/cheatEditor_add_cheats" />
+ </LinearLayout>
+ </LinearLayout>
+
+</ScrollView>
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <EditText
+ android:id="@+id/textCheatExtraAddress"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_margin="5dp"
+ android:layout_weight="2"
+ android:digits="0123456789ABCDEF"
+ android:hint="@string/cheatEditor_hint_cheatAddress"
+ android:inputType="textCapCharacters"
+ android:maxLength="8"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <EditText
+ android:id="@+id/textCheatExtraValue"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="5dp"
+ android:layout_weight="1"
+ android:digits="0123456789ABCDEF"
+ android:hint="@string/cheatEditor_hint_value"
+ android:inputType="textCapCharacters"
+ android:maxLength="4"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <ImageButton
+ android:id="@+id/removeCheatOptionButton"
+ android:layout_width="35dp"
+ android:layout_height="35dp"
+ android:layout_margin="5dp"
+ android:contentDescription="@string/cheatEditor_remove_option"
+ android:src="@android:drawable/ic_menu_close_clear_cancel" />
+
+</LinearLayout>
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <EditText
+ android:id="@+id/textCheatValue"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_margin="5dp"
+ android:layout_weight="2"
+ android:digits="0123456789ABCDEF"
+ android:hint="@string/cheatEditor_hint_value"
+ android:inputType="textCapCharacters"
+ android:maxLength="4"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <EditText
+ android:id="@+id/textCheatValueDescription"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_margin="5dp"
+ android:layout_weight="4"
+ android:hint="@string/cheatEditor_hint_value_description"
+ android:inputType="text"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <ImageButton
+ android:id="@+id/removeCheatOptionButton"
+ android:layout_width="35dp"
+ android:layout_height="35dp"
+ android:layout_margin="5dp"
+ android:contentDescription="@string/cheatEditor_remove_option"
+ android:src="@android:drawable/ic_menu_close_clear_cancel" />
+
+</LinearLayout>
@@ -3,38 +3,25 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
- <ImageButton
- android:id="@+id/imgBtnChtAdd"
- android:layout_width="50dp"
- android:layout_height="50dp"
- android:src="@drawable/ic_plus" />
- <ImageButton
- android:id="@+id/imgBtnChtEdit"
- android:layout_width="50dp"
- android:layout_height="50dp"
- android:src="@drawable/ic_pencil" />
- <ImageButton
- android:id="@+id/imgBtnChtSave"
- android:layout_width="50dp"
- android:layout_height="50dp"
- android:src="@drawable/ic_save" />
- <ImageButton
- android:id="@+id/imgBtnChtInfo"
- android:layout_width="50dp"
- android:layout_height="50dp"
- android:src="@drawable/ic_help" />
- </LinearLayout>
- <ListView
- android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="match_parent"
- android:layout_gravity="bottom"
- android:longClickable="true"/>
+ <ImageButton
+ android:id="@+id/imgBtnChtAdd"
+ android:layout_width="50dp"
+ android:layout_height="50dp"
+ android:contentDescription="@string/cheatEditor_add"
+ android:src="@drawable/ic_plus" />
+ </LinearLayout>
+
+ <ListView
+ android:id="@android:id/list"
+ android:layout_width="fill_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="bottom"
+ android:longClickable="true" />
</LinearLayout>
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/btnEditTitle"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/cheatEditor_title_desc" />
-
- <Button
- android:id="@+id/btnEditNotes"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/cheatEditor_notes_desc" />
-
- <Button
- android:id="@+id/btnEditCode"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/cheatEditor_code_desc" />
-
- <Button
- android:id="@+id/btnEditOption"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/cheatEditor_option_desc" />
-
- <Button
- android:id="@+id/btnDelete"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/cheatEditor_delete" />
-
-</LinearLayout>
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item
+ android:id="@+id/menuItem_edit"
+ android:title="@string/cheatEditor_edit1"/>
+ <item
+ android:id="@+id/menuItem_delete"
+ android:title="@string/cheatEditor_delete"/>
+
+</menu>
View
@@ -532,40 +532,27 @@
<string name="cheatOption_title">Full text</string>
<string name="cheatNotes_title">Notes</string>
<string name="cheatNotes_none">(no notes available for this cheat)</string>
-
+
<!-- Cheat Editor -->
<string name="menuItem_cheatEditor">Cheat editor</string>
- <string name="cheatEditor_empty">Empty cheat</string>
- <string name="cheatEditor_added">Empty cheat added at bottom of list</string>
<string name="cheatEditor_edit">Edit cheats</string>
- <string name="cheatEditor_edit_desc">Long press a cheat to edit it</string>
<string name="cheatEditor_help">Help</string>
- <string name="cheatEditor_readme1">Welcome to the Mupen64plus AE Cheat editor</string>
- <string name="cheatEditor_readme2">Please adhere to the following guidelines when adding or editing cheats:</string>
- <string name="cheatEditor_readme3">1. Titles and descriptions should NOT contain line breaks (the enter button). Any line breaks will be replaced with spaces.</string>
- <string name="cheatEditor_readme4">2. Hexadecimal numbers must be used in place of the X\'s in the examples given below.</string>
- <string name="cheatEditor_readme5">3. Cheats must only have one code per line in the format \"XXXXXXXX XXXX\" without quotes or \"XXXXXXXX ????\" without quotes if the cheat code has options. Cheats can have multiple lines.</string>
- <string name="cheatEditor_readme6">4. Options codes must only have one option per line in the format \"Option Description XXXX\" without quotes. Option codes can also have multiple lines.</string>
- <string name="cheatEditor_config">Cheat config</string>
- <string name="cheatEditor_config_desc">Edit cheat configuration</string>
- <string name="cheatEditor_title">Cheat title</string>
- <string name="cheatEditor_title_desc">Edit cheat title</string>
- <string name="cheatEditor_notes">Cheat notes</string>
- <string name="cheatEditor_notes_desc">Edit cheat notes</string>
- <string name="cheatEditor_code">Cheat code</string>
- <string name="cheatEditor_code_desc">Edit cheat code</string>
- <string name="cheatEditor_badCode">Bad code(s), reverting…</string>
- <string name="cheatEditor_option">Cheat options</string>
- <string name="cheatEditor_option_desc">Edit cheat options</string>
- <string name="cheatEditor_badOption">Bad option(s), reverting…</string>
- <string name="cheatEditor_delete">Delete cheat</string>
<string name="cheatEditor_confirm">Are you sure?</string>
<string name="cheatEditor_info">Cheat information</string>
- <string name="cheatEditor_title2">Title:</string>
- <string name="cheatEditor_notes2">Notes:</string>
- <string name="cheatEditor_code2">Code(s):</string>
- <string name="cheatEditor_option2">Option(s):</string>
<string name="cheatEditor_saveConfirm">Save cheat file?</string>
+ <string name="cheatEditor_edit1">Edit cheat</string>
+ <string name="cheatEditor_invalid_value">N/A</string>
+ <string name="cheatEditor_delete">Delete cheat</string>
+ <string name="cheatEditor_add">Add cheat</string>
+ <string name="cheatEditor_save">Save cheat</string>
+ <string name="cheatEditor_hint_cheatTitle">Cheat Title</string>
+ <string name="cheatEditor_hint_cheatNotes">Cheat Notes (optional)</string>
+ <string name="cheatEditor_hint_cheatAddress">Address</string>
+ <string name="cheatEditor_hint_value">Value</string>
+ <string name="cheatEditor_hint_value_description">Description</string>
+ <string name="cheatEditor_add_option">Add option</string>
+ <string name="cheatEditor_add_cheats">Add cheat</string>
+ <string name="cheatEditor_remove_option">Remove option</string>
<!-- Hi-Res Texture Unpacking -->
<string name="pathHiResTexturesTask_title">Unpacking textures</string>
Oops, something went wrong.

0 comments on commit 4b5ce8f

Please sign in to comment.