diff --git a/phira/locales/en-US/settings.ftl b/phira/locales/en-US/settings.ftl index d191e291..49b3e43d 100644 --- a/phira/locales/en-US/settings.ftl +++ b/phira/locales/en-US/settings.ftl @@ -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-shader-effect = Shader Effect +item-shader-effect-sub = You can turn off this option if you experience lag when playing a chart with shader effects. item-opt = Chart Optimization item-opt-sub = Significantly increase peformance while playing. (If unintended behavior arises, disable this.) item-speed = Speed diff --git a/phira/locales/zh-CN/settings.ftl b/phira/locales/zh-CN/settings.ftl index 3cf07063..6d167514 100644 --- a/phira/locales/zh-CN/settings.ftl +++ b/phira/locales/zh-CN/settings.ftl @@ -44,6 +44,8 @@ item-show-acc = 显示实时准度 item-dc-pause = 双击暂停 item-dhint = 双押提示 item-dhint-sub = 同时触线的音符将会被高亮 +item-shader-effect = 着色器效果 +item-shader-effect-sub = 如果你在播放包含着色器效果的谱面时遇到卡顿,可以关闭此选项以提升流畅度。 item-opt = 激进优化 item-opt-sub = 采用激进的优化策略,提升性能但可能导致部分谱面显示出错 item-speed = 速度 diff --git a/phira/src/page/settings.rs b/phira/src/page/settings.rs index 4da7b22a..ce78a0b6 100644 --- a/phira/src/page/settings.rs +++ b/phira/src/page/settings.rs @@ -639,6 +639,7 @@ struct ChartList { show_acc_btn: DRectButton, dc_pause_btn: DRectButton, dhint_btn: DRectButton, + shader_effect_btn: DRectButton, opt_btn: DRectButton, speed_slider: Slider, size_slider: Slider, @@ -650,6 +651,7 @@ impl ChartList { show_acc_btn: DRectButton::new(), dc_pause_btn: DRectButton::new(), dhint_btn: DRectButton::new(), + shader_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), @@ -675,6 +677,10 @@ impl ChartList { config.double_hint ^= true; return Ok(Some(true)); } + if self.shader_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)); @@ -718,6 +724,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-shader-effect"), Some(tl!("item-shader-effect-sub"))); + render_switch(ui, rr, t, &mut self.shader_effect_btn, !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);