Android: Add Pedometer Steps per Hour settings UI

This commit is contained in:
Reg Tiangha 2024-09-03 13:33:51 +02:00 committed by Gamer64
parent a6cc7b084d
commit 6870c175bc
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),
STEREOSCOPIC_3D_MODE("render_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_X_SHIFT("cardboard_x_shift", Settings.SECTION_LAYOUT, 0),
CARDBOARD_Y_SHIFT("cardboard_y_shift", Settings.SECTION_LAYOUT, 0),

View File

@ -378,6 +378,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(
RunnableSetting(
R.string.console_id,

View File

@ -368,7 +368,7 @@ init_ticks_type =
# Defaults to 0.
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.
steps_per_hour =

View File

@ -190,6 +190,8 @@
<string name="birthday_day">Day</string>
<string name="country">Country</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="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>

View File

@ -353,7 +353,7 @@ init_ticks_type =
# Defaults to 0.
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.
steps_per_hour =

View File

@ -384,7 +384,7 @@
<item row="12" column="0">
<widget class="QLabel" name="label_play_coins">
<property name="text">
<string>Play Coins:</string>
<string>Play Coins</string>
</property>
</widget>
</item>
@ -397,8 +397,11 @@
</item>
<item row="13" column="0">
<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">
<string>Pedometer steps per hour:</string>
<string>Pedometer Steps per Hour</string>
</property>
</widget>
</item>