-
Notifications
You must be signed in to change notification settings - Fork 163
feat: add option to disable effect #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ChickenPige0n
wants to merge
1
commit into
TeamFlos:main
Choose a base branch
from
ChickenPige0n:option-disable-effect
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 = 速度 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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, | ||
|
|
@@ -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), | ||
|
|
@@ -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)); | ||
|
|
@@ -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); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这样这里就应该用 |
||
| } | ||
| item! { | ||
| render_title(ui, tl!("item-opt"), Some(tl!("item-opt-sub"))); | ||
| render_switch(ui, rr, t, &mut self.opt_btn, config.aggressive); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们应该用双重否定句吗?我觉得描述为“着色器效果”,然后值默认为开,这样会符合直觉一点
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
虽然
config里确实是disable_effect,但我觉得给用户呈现的要符合直觉一点?不一定和内部实现相同。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
各种地方也应该相应改名