Skip to content

Commit 381c8f7

Browse files
committed
chore: added hit sound setting
1 parent 9e365de commit 381c8f7

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

lib/phasetida_flutter.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import 'package:phasetida_flutter/src/rust/frb_generated.dart';
66
export 'simulator/shell.dart' show PhigrosChartPlayerShellWidget;
77
export 'simulator/simulator.dart' show PhigrosSimulatorRenderWidget;
88

9-
const String phasetidaVersion = "0.2.0";
9+
const String phasetidaFlutterVersion = "0.2.0";
10+
const String phasetidaCoreVersion = "0.1.11";
1011

1112
class PhasetidaFlutter {
1213
static Future<void> init() async {

lib/simulator/shell.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class _PhigrosChartPlayerShellState extends State<PhigrosChartPlayerShellWidget>
3131
final controller = PhigrosSimulatorRenderController();
3232
bool auto = true;
3333
bool highlight = true;
34+
bool hitSound = true;
3435

3536
double totalTime = 0.0;
3637

@@ -783,7 +784,8 @@ class _PhigrosChartPlayerShellState extends State<PhigrosChartPlayerShellWidget>
783784
_infoRow("A-B End", _formatTime(abEnd), theme),
784785
),
785786
const Divider(),
786-
_infoRow("phasetida version", phasetidaVersion, theme),
787+
_infoRow("phasetida_flutter version", phasetidaFlutterVersion, theme),
788+
_infoRow("phasetida-core version", phasetidaCoreVersion, theme),
787789
ValueListenableBuilder(
788790
valueListenable: controller.logBufferUsage,
789791
builder: (_, bufferUsage, _) => _infoRow(
@@ -799,6 +801,16 @@ class _PhigrosChartPlayerShellState extends State<PhigrosChartPlayerShellWidget>
799801
),
800802
),
801803
const Divider(),
804+
SwitchListTile(
805+
title: const Text("打击音效"),
806+
value: hitSound,
807+
onChanged: (v) {
808+
setState(() {
809+
hitSound = v;
810+
});
811+
controller.setEnableSound(hitSound);
812+
},
813+
),
802814
// SwitchListTile(
803815
// title: const Text("自动播放"),
804816
// value: auto,

0 commit comments

Comments
 (0)