Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions phira/locales/en-US/settings.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ item-show-acc = Real-Time Accuracy
item-dc-pause = Double-Tap to Pause
item-dhint = Simultaneous Hint
item-dhint-sub = Highlight notes that are meant to be hit at the same time.
item-disable-effect = Disable Shader Effect
item-disable-effect-sub = You can turn on this option if you experience lag when playing a chart with shader effects.
Comment on lines +47 to +48
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- item-disable-effect = Disable Shader Effect
- item-disable-effect-sub = You can turn on this option if you experience lag when playing a chart with shader effects.
+ item-shader-effect = Shader Effect
+ item-shader-effect = You can turn off this option if you experience lag when playing a chart with shader effects.

我们应该用双重否定句吗?我觉得描述为“着色器效果”,然后值默认为开,这样会符合直觉一点

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

虽然config里确实是disable_effect,但我觉得给用户呈现的要符合直觉一点?不一定和内部实现相同。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

各种地方也应该相应改名

item-opt = Chart Optimization
item-opt-sub = Significantly increase peformance while playing. (If unintended behavior arises, disable this.)
item-speed = Speed
Expand Down
2 changes: 2 additions & 0 deletions phira/locales/zh-CN/settings.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ item-show-acc = 显示实时准度
item-dc-pause = 双击暂停
item-dhint = 双押提示
item-dhint-sub = 同时触线的音符将会被高亮
item-disable-effect = 禁用着色器效果
item-disable-effect-sub = 如果你在播放包含着色器效果的谱面时遇到卡顿,可以开启此选项以提升流畅度。
Comment on lines +47 to +48
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- item-disable-effect = 禁用着色器效果
- item-disable-effect-sub = 如果你在播放包含着色器效果的谱面时遇到卡顿,可以开启此选项以提升流畅度。
+ item-shader-effect = 着色器效果
+ item-shader-effect-sub = 如果你在播放包含着色器效果的谱面时遇到卡顿,可以关闭此选项以提升流畅度。

同上

item-opt = 激进优化
item-opt-sub = 采用激进的优化策略,提升性能但可能导致部分谱面显示出错
item-speed = 速度
Expand Down
10 changes: 10 additions & 0 deletions phira/src/page/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ struct ChartList {
show_acc_btn: DRectButton,
dc_pause_btn: DRectButton,
dhint_btn: DRectButton,
disable_effect_btn: DRectButton,
opt_btn: DRectButton,
speed_slider: Slider,
size_slider: Slider,
Expand All @@ -628,6 +629,7 @@ impl ChartList {
show_acc_btn: DRectButton::new(),
dc_pause_btn: DRectButton::new(),
dhint_btn: DRectButton::new(),
disable_effect_btn: DRectButton::new(),
opt_btn: DRectButton::new(),
speed_slider: Slider::new(0.5..2., 0.05),
size_slider: Slider::new(0.8..1.2, 0.005),
Expand All @@ -653,6 +655,10 @@ impl ChartList {
config.double_hint ^= true;
return Ok(Some(true));
}
if self.disable_effect_btn.touch(touch, t) {
config.disable_effect ^= true;
return Ok(Some(true));
}
if self.opt_btn.touch(touch, t) {
config.aggressive ^= true;
return Ok(Some(true));
Expand Down Expand Up @@ -696,6 +702,10 @@ impl ChartList {
render_title(ui, tl!("item-dhint"), Some(tl!("item-dhint-sub")));
render_switch(ui, rr, t, &mut self.dhint_btn, config.double_hint);
}
item! {
render_title(ui, tl!("item-disable-effect"), Some(tl!("item-disable-effect-sub")));
render_switch(ui, rr, t, &mut self.disable_effect_btn, config.disable_effect);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样这里就应该用!config.disable_effect了,虽然内部实现有点怪,但是用起来可能更符合直觉?

}
item! {
render_title(ui, tl!("item-opt"), Some(tl!("item-opt-sub")));
render_switch(ui, rr, t, &mut self.opt_btn, config.aggressive);
Expand Down
Loading