Permalink
Browse files

Android: Switched to system built-in preference class.

  • Loading branch information...
1 parent db7fb39 commit 527acbef35d0e7f31f77ece2481c6f4891b2a647 @jjsat jjsat committed Aug 21, 2012
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
- <TextView android:text="@+id/label" android:layout_width="fill_parent"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
- android:id="@+id/label"
- android:layout_marginLeft="6px" android:layout_gravity="center_vertical"
- style="?android:attr/listSeparatorTextViewStyle"
- >
- </TextView>
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" >
-
- <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center_vertical" android:paddingLeft="6dip" android:minHeight="?android:attr/listPreferredItemHeight"/>
-
- <LinearLayout android:gravity="right" android:layout_gravity="right" android:layout_width="fill_parent" android:layout_height="fill_parent">
- <CheckBox android:id="@+id/check" android:paddingRight="6dip" android:clickable="false" android:focusable="false" android:gravity="center_vertical|right" android:layout_gravity="center_vertical|right" android:layout_width="wrap_content" android:layout_height="wrap_content" />
- </LinearLayout>
-
-</LinearLayout>
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" >
-
- <TwoLineListItem android:paddingTop="2dip" android:paddingBottom="2dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight">
-
- <TextView android:id="@+id/text1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="6dip" android:layout_marginTop="6dip" android:textAppearance="?android:attr/textAppearanceLarge"/>
- <TextView android:id="@+id/text2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="50dip" android:layout_below="@+id/text1" android:layout_alignLeft="@+id/text1" android:textAppearance="?android:attr/textAppearanceSmall"/>
-
- <LinearLayout android:gravity="right" android:layout_gravity="right" android:layout_width="fill_parent" android:layout_height="fill_parent">
- <CheckBox android:id="@+id/check" android:layout_marginTop="4dip" android:paddingRight="6dip" android:clickable="false" android:focusable="false" android:gravity="center_vertical|right" android:layout_gravity="center_vertical|right" android:layout_width="wrap_content" android:layout_height="wrap_content" />
- </LinearLayout>
-
- </TwoLineListItem>
-
-</LinearLayout>
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu
- xmlns:android="http://schemas.android.com/apk/res/android">
- <group android:checkableBehavior="single" android:id="@+id/language_group">
- <item android:titleCondensed="Default" android:title="Default" android:checked="true" android:id="@+id/default_language"></item>
- </group>
-
-</menu>
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu
- xmlns:android="http://schemas.android.com/apk/res/android">
- <group android:checkableBehavior="single" android:id="@+id/orientation_group"><item android:id="@+id/auto" android:titleCondensed="Off" android:title="Off" android:checked="true"></item><item android:title="Portrait" android:titleCondensed="Portrait" android:id="@+id/portrait"></item>
- <item android:title="Landscape" android:titleCondensed="Landscape" android:id="@+id/landscape"></item>
-</group>
-
-
-</menu>
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu
- xmlns:android="http://schemas.android.com/apk/res/android">
- <group android:checkableBehavior="single" android:id="@+id/renderer_group">
- <item android:id="@+id/software" android:checked="false" android:titleCondensed="Software" android:title="Software"></item>
- <item android:id="@+id/hardware" android:checked="false" android:titleCondensed="Hardware" android:title="Hardware"></item>
- <item android:id="@+id/rtt" android:titleCondensed="Hardware (pixel perfect)" android:title="Hardware (pixel perfect)" android:checked="true"></item>
- </group>
-
-</menu>
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu
- xmlns:android="http://schemas.android.com/apk/res/android">
- <group android:checkableBehavior="single" android:id="@+id/scaling_group">
- <item android:id="@+id/no_scaling" android:checked="false" android:titleCondensed="No scaling" android:title="No scaling"></item>
- <item android:id="@+id/preserve_aspect_ratio" android:checked="true" android:titleCondensed="Fullscreen (preserve AR)" android:title="Fullscreen (preserve AR)"></item>
- <item android:id="@+id/ignore_aspect_ratio" android:checked="false" android:titleCondensed="Fullscreen (ignore AR)" android:title="Fullscreen (ignore AR)"></item>
- </group>
-
-</menu>
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+ <string-array name="screen_orientation">
+ <item>Off</item>
+ <item>Portrait</item>
+ <item>Landscape</item>
+ </string-array>
+
+ <string-array name="screen_orientation_values">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ </string-array>
+
+
+ <string-array name="game_language">
+ <item>Default</item>
+ </string-array>
+
+ <string-array name="game_language_values">
+ <item>default</item>
+ </string-array>
+
+ <string-array name="renderer">
+ <item>Software</item>
+ <item>Hardware</item>
+ <item>Hardware (pixel perfect)</item>
+ </string-array>
+
+ <string-array name="renderer_values">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ </string-array>
+
+ <string-array name="screen_scaling">
+ <item>No scaling</item>
+ <item>Fullscreen (preserve AR)</item>
+ <item>Fullscreen (ignore AR)</item>
+ </string-array>
+
+ <string-array name="screen_scaling_values">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ </string-array>
+</resources>
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="CONFIG_NONE">-1</string>
+ <string name="CONFIG_IGNORE_ACSETUP">0</string>
+ <string name="CONFIG_CLEAR_CACHE">1</string>
+ <string name="CONFIG_AUDIO_RATE">2</string>
+ <string name="CONFIG_AUDIO_ENABLED">3</string>
+ <string name="CONFIG_AUDIO_THREADED">4</string>
+ <string name="CONFIG_AUDIO_CACHESIZE">5</string>
+ <string name="CONFIG_MIDI_ENABLED">6</string>
+ <string name="CONFIG_MIDI_PRELOAD">7</string>
+ <string name="CONFIG_VIDEO_FRAMEDROP">8</string>
+ <string name="CONFIG_GFX_RENDERER">9</string>
+ <string name="CONFIG_GFX_SMOOTHING">10</string>
+ <string name="CONFIG_GFX_SCALING">11</string>
+ <string name="CONFIG_GFX_SS">12</string>
+ <string name="CONFIG_ROTATION">13</string>
+ <string name="CONFIG_ENABLED">14</string>
+ <string name="CONFIG_DEBUG_FPS">15</string>
+ <string name="CONFIG_GFX_SMOOTH_SPRITES">16</string>
+ <string name="CONFIG_TRANSLATION">17</string>
+ <string name="CONFIG_DEBUG_LOGCAT">18</string>
+ <string name="CONFIG_MOUSE_METHOD">19</string>
+ <string name="CONFIG_MOUSE_LONGCLICK">20</string>
+</resources>
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <CheckBoxPreference android:disableDependentsState="false" android:summary="Check to override the global preferences for this game" android:key="@string/CONFIG_ENABLED" android:title="Use custom preferences"/>
+
+ <PreferenceCategory
+ android:title="General" android:key="preference_key_general">
+ <ListPreference android:summary="Select the game language if available" android:dialogTitle="Game language" android:title="Game language" android:key="@string/CONFIG_TRANSLATION" android:entries="@array/game_language" android:entryValues="@array/game_language_values"/>
+ <ListPreference android:summary="Prevents the screen from automatically rotating" android:entries="@array/screen_orientation" android:dialogTitle="Screen orientation" android:title="Lock screen orientation" android:key="@string/CONFIG_ROTATION" android:entryValues="@array/screen_orientation_values" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+
+ </PreferenceCategory>
+ <PreferenceCategory android:title="Controls" android:key="preference_key_controls">
+ <CheckBoxPreference android:summary="The mouse gets moved relative to the finger motion" android:key="@string/CONFIG_MOUSE_METHOD" android:title="Relative mouse control" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <CheckBoxPreference android:summary="A longclick keeps the left mouse button pressed" android:key="@string/CONFIG_MOUSE_LONGCLICK" android:title="Dragging with longclick" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ </PreferenceCategory>
+ <PreferenceCategory android:title="Sound" android:key="preference_key_sound">
+ <CheckBoxPreference android:key="@string/CONFIG_AUDIO_ENABLED" android:title="Enabled" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <CheckBoxPreference android:summary="Reduces stuttering but throws off lipsyncing" android:key="@string/CONFIG_AUDIO_THREADED" android:title="Use multithreading" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ </PreferenceCategory>
+ <PreferenceCategory android:title="Midi" android:key="preference_key_midi">
+ <CheckBoxPreference android:summary="Needs MIDI patches on the SD card" android:key="@string/CONFIG_MIDI_ENABLED" android:title="Enabled" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <CheckBoxPreference android:summary="Less delay between MIDI tracks but causes a startup delay" android:key="@string/CONFIG_MIDI_PRELOAD" android:title="Preload patches" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ </PreferenceCategory>
+ <PreferenceCategory android:title="Video" android:key="preference_key_video">
+ <CheckBoxPreference android:summary="On slow devices this can lead to all frames being skipped" android:key="@string/CONFIG_VIDEO_FRAMEDROP" android:title="Drop frames if necessary" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ </PreferenceCategory>
+ <PreferenceCategory android:title="Graphics" android:key="preference_key_graphics">
+ <ListPreference android:summary="Choose between software and hardware rendering" android:entries="@array/renderer" android:dialogTitle="Select renderer" android:entryValues="@array/renderer_values" android:title="Select renderer" android:key="@string/CONFIG_GFX_RENDERER" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <ListPreference android:entries="@array/screen_scaling" android:dialogTitle="Screen scaling" android:entryValues="@array/screen_scaling_values" android:title="Screen scaling" android:key="@string/CONFIG_GFX_SCALING" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <CheckBoxPreference android:key="@string/CONFIG_GFX_SMOOTHING" android:title="Linear filtering" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <CheckBoxPreference android:summary="Use a higher resolution for scaling objects" android:key="@string/CONFIG_GFX_SS" android:title="Supersampling" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <CheckBoxPreference android:key="@string/CONFIG_GFX_SMOOTH_SPRITES" android:title="Smooth scaled sprites" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ </PreferenceCategory>
+ <PreferenceCategory android:title="Debug" android:key="preference_key_debug">
+ <CheckBoxPreference android:key="@string/CONFIG_DEBUG_FPS" android:title="Show framerate" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ <CheckBoxPreference android:summary="Use a logcat reader to view the messages" android:key="@string/CONFIG_DEBUG_LOGCAT" android:title="Log debug messages" android:shouldDisableView="true" android:dependency="@string/CONFIG_ENABLED"/>
+ </PreferenceCategory>
+
+</PreferenceScreen>
+
Oops, something went wrong.

0 comments on commit 527acbe

Please sign in to comment.