-
Notifications
You must be signed in to change notification settings - Fork 93
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
Enhanced brush mode #17
Enhanced brush mode #17
Conversation
It shouldn't continue to be called BrushMode, because there are too many operations to memorize.
I haven't delved much into the full functionality of WPF, so this implementation requires me to understand it before I can draw conclusions
None at the moment, but I would suggest that this needs to be compatible with the Keybinding feature, as users may need to modify the shortcuts to make it easier for them to use them.
I do have an idea, is that the user's current pointer operation can be displayed near the pointer, for example, in your demonstration of the function #Deleting input object, when the user presses and holds the pointer and drags it, the words “Deletion of objects within the range” will be displayed near the pointer to indicate that Anyway, it's not recommended to merge this PR yet, need to wait for me to finish the keybinding feature first, sorry, but it's coming soon! |
[Key.D4] = new BrushModeInputWallRight(), | ||
[Key.D5] = new BrushModeInputLaneColorful(), | ||
[Key.T] = new BrushModeInputTap(), | ||
[Key.D] = new BrushModeInputHold(), |
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.
The H key should be assigned here
I will rename "Brush Mode" to "Batch Mode" and add new keybindings called |
Batch Mode requires its own set of keybindings, separate from the normal ones. So I have started to make a "layer" system. There are three layers, Global, Normal, and Batch. Keybindings in Normal are allowed to conflict with keybindings from Batch mode. Global keybinds are always active. For keybindings such as |
I used the feature a lot and made some changes. InputObjects are now referred to as "Submodes". There are two types of submodes. They determine what is done when clicking.
A new icon is displayed when in a FilterObjectSubmode. The filters are:
DocumentationDefault keybinds✏️: InputSubmode
These tables describe the behavior when clicking with different modifiers in Batch Mode. Left click operations
Right click operations
TODO
|
All planned functionality is complete. For now, please refer to the table in the previous comment for documentation. We should add the table to the wiki. If you have any ideas, let me know. I think there are improvements that could be made, but I am happy with the base functionality. |
|
One more question. |
I think we will still need to keep Ctrl+Alt because it allows "Drag to select only input object". As you mentioned it is currently not working but I will fix |
I am too tired, I will finish this tomorrow 😴 |
Just kidding wwwwww Need to bug test tomorrow. |
oo i broke clipboard again one sec |
Hmm, there is a bug where holding Shift + Alt in InputObject mode will always drag the selection. Sometimes it also breaks the undo/redo stack. |
I've left the SelectRegion code in a pretty ugly state, but I plan on refactoring it to be less fragile. I will do that in a separate PR. |
i think it is done 🙏 I will use this build to work on my fumens for a few days to find more bugs. |
You can deal with them in this PR together Some problems I had reported are still exist. such as clipboard and generate same object in same place |
Placement of objects behavior is annoying since it ignores bullet palette when checking for objects at same position. |
Added a method |
Clashes() should implement at editor because it's only for editor use match pattern |
Started refactor... sometimes there is the following crash while dragging the selection box around
I am too sleepy to figure out the cause tonight 😄 |
Fixed it! It was a race condition caused by setting it to |
at fad1143 KeyboardAction_DeleteSelectingObjects() QQ20241028-15741-HD.mp4But I see that you're deleting objects elsewhere as well, so I'd suggest that you need to follow up on that as well |
Thanks, I will follow your code for the other deletion functions |
Could you merge fad1143 into this PR? So i don't have to duplicate your deletion code. |
how , I merged your current work and push to batch_mode in my repo |
Oh, i can do it myself, sorry |
Crash when clicking on LaneBlock in batch mode:
|
I'm noticing this bug starting today, was it one of the recent commits? Bottom green object is a TAP and top green object is a HOLD. OngekiFumenEditor_XaJFbZp3ZQ.mp4 |
fixed and plz pull |
LaneBlockArea no X axis to move so it's actual not a OngekiMovableObjectBase |
Thank you, i should have mentioned i fixed it with db8b813 |
I think I am done with this PR. I will use it to make some charts and find bugs. |
It will be merged after days if there is no problem |
It will be merged after hours witch I wake up if there is no problem |
Congratulations! This is a huge improve for program and users. Thx your PR❤️ |
Thank you! Please let me know if there is any feedback from Chinese users about this feature. |
TODO
[x] Refactor selection area code
[x] Enable click selection with FilterSubmode
[x] Fix missing Brush button text
[x] Fix crash when clicking on LaneBlock in batch mode
[x] Add menu bar buttons so users can discover keybinds
Brush mode improvements
Brush mode has been changed. When in Brush Mode, an overlay is shown in the bottom left. It shows the input object.
By default, the input object is "Clipboard", which is the same as the old brush mode behavior.
Changing input object
The user can press keys to change the input object. See CommandDefinitions for the full list.
Insert input object
Left Click inserts the input object. If Alt or Ctrl is held, modifiers are applied to some inputs. If Shift is held, the previous selection will be kept; otherwise the selection will be cleared.
Deleting input object
If the input object is not "Clipboard", Right Click deletes instances of the input object.
Change selection
If Alt is held while clicking and dragging, normal box selection will be used. This is so that the user does not have to exit Brush Mode to change selection.
Questions
@MikiraSora, before I finish localizing and bugfixing, I want to make sure you like this.
Behavior
?