Android: Add Pedometer Steps per Hour settings UI (#242)

This commit is contained in:
Reg Tiangha 2024-09-01 04:23:53 -06:00 committed by GitHub
parent 2f0b2f9839
commit 82faf2e557
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 22 additions and 4 deletions

View file

@ -19,6 +19,7 @@ enum class IntSetting(
RESOLUTION_FACTOR("resolution_factor", Settings.SECTION_RENDERER, 1), RESOLUTION_FACTOR("resolution_factor", Settings.SECTION_RENDERER, 1),
STEREOSCOPIC_3D_MODE("render_3d", Settings.SECTION_RENDERER, 0), STEREOSCOPIC_3D_MODE("render_3d", Settings.SECTION_RENDERER, 0),
STEREOSCOPIC_3D_DEPTH("factor_3d", Settings.SECTION_RENDERER, 0), STEREOSCOPIC_3D_DEPTH("factor_3d", Settings.SECTION_RENDERER, 0),
STEPS_PER_HOUR("steps_per_hour", Settings.SECTION_SYSTEM, 0),
CARDBOARD_SCREEN_SIZE("cardboard_screen_size", Settings.SECTION_LAYOUT, 85), CARDBOARD_SCREEN_SIZE("cardboard_screen_size", Settings.SECTION_LAYOUT, 85),
CARDBOARD_X_SHIFT("cardboard_x_shift", Settings.SECTION_LAYOUT, 0), CARDBOARD_X_SHIFT("cardboard_x_shift", Settings.SECTION_LAYOUT, 0),
CARDBOARD_Y_SHIFT("cardboard_y_shift", Settings.SECTION_LAYOUT, 0), CARDBOARD_Y_SHIFT("cardboard_y_shift", Settings.SECTION_LAYOUT, 0),

View file

@ -298,6 +298,18 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
"" ""
) )
) )
add(
SliderSetting(
IntSetting.STEPS_PER_HOUR,
R.string.steps_per_hour,
R.string.steps_per_hour_description,
0,
65535,
" steps",
IntSetting.STEPS_PER_HOUR.key,
IntSetting.STEPS_PER_HOUR.defaultValue.toFloat()
)
)
add( add(
RunnableSetting( RunnableSetting(
R.string.console_id, R.string.console_id,

View file

@ -307,7 +307,7 @@ init_ticks_type =
# Defaults to 0. # Defaults to 0.
init_ticks_override = init_ticks_override =
# Number of steps per hour reported by the pedometer. # Number of steps per hour reported by the pedometer. Range from 0 to 65,535.
# Defaults to 0. # Defaults to 0.
steps_per_hour = steps_per_hour =

View file

@ -186,6 +186,8 @@
<string name="birthday_day">Day</string> <string name="birthday_day">Day</string>
<string name="country">Country</string> <string name="country">Country</string>
<string name="play_coins">Play Coins</string> <string name="play_coins">Play Coins</string>
<string name="steps_per_hour">Pedometer Steps per Hour</string>
<string name="steps_per_hour_description">Number of steps per hour reported by the pedometer. Range from 0 to 65,535.</string>
<string name="console_id">Console ID</string> <string name="console_id">Console ID</string>
<string name="regenerate_console_id">Regenerate Console ID</string> <string name="regenerate_console_id">Regenerate Console ID</string>
<string name="regenerate_console_id_description">This will replace your current virtual 3DS with a new one. Your current virtual 3DS will not be recoverable. This might have unexpected effects in games. This might fail if you use an outdated config savegame. Continue?</string> <string name="regenerate_console_id_description">This will replace your current virtual 3DS with a new one. Your current virtual 3DS will not be recoverable. This might have unexpected effects in games. This might fail if you use an outdated config savegame. Continue?</string>

View file

@ -319,7 +319,7 @@ init_ticks_type =
# Defaults to 0. # Defaults to 0.
init_ticks_override = init_ticks_override =
# Number of steps per hour reported by the pedometer. # Number of steps per hour reported by the pedometer. Range from 0 to 65,535.
# Defaults to 0. # Defaults to 0.
steps_per_hour = steps_per_hour =

View file

@ -381,7 +381,7 @@
<item row="12" column="0"> <item row="12" column="0">
<widget class="QLabel" name="label_play_coins"> <widget class="QLabel" name="label_play_coins">
<property name="text"> <property name="text">
<string>Play Coins:</string> <string>Play Coins</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -394,8 +394,11 @@
</item> </item>
<item row="13" column="0"> <item row="13" column="0">
<widget class="QLabel" name="label_steps_per_hour"> <widget class="QLabel" name="label_steps_per_hour">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of steps per hour reported by the pedometer. Range from 0 to 65,535.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text"> <property name="text">
<string>Pedometer steps per hour:</string> <string>Pedometer Steps per Hour</string>
</property> </property>
</widget> </widget>
</item> </item>