snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.59k stars 291 forks source link

QoL Update: Select and scroll to new command on add #996

Closed Arylos07 closed 3 years ago

Arylos07 commented 3 years ago

Description

Minor quality of life update. When a new command is added from the command list, it will automatically select that new command and also scroll to it in the inspector if needed. Subsequently added commands will also go underneath the new command instead of going straight to the bottom.

Note: This does not affect copy + paste or duplicate. That can be addressed in a different PR since that's kind of niche. This only affects adding new commands from the commands menu.

Additionally, this is untested with the old menu layout. It should work though. If not, I'll add a toggle so this feature is disabled when using the old ui.

What is the current behavior?

Currently, when a new command is added, it goes to whatever the currently selected command is, which isn't bad, but it deselects commands, requiring you to click on the new command in order to modify it.

Additionally, if adding commands in sequence (repeatedly adding them), any additional commands will go to the bottom of the list. This isn't bad unless you're trying to set up stuff in the middle of an already configured block.

Resolves #994

What is the new behavior?

Important Notes

Other information

Important: because I did a silly, this PR includes changes from PR #934 which contains an optional boolean to Writer Audio. When merging this branch, 934 can be deleted as this already contains it. (as usual)

stevehalliwell commented 3 years ago

Thanks for the PR.

After reviewing it I'll manually checkout and cherrypick as it seems you've got some unreleated commits here.

breadnone commented 3 years ago

Tested this, since yesterday, didn't find any issue and it feels right at home. No more weird getting out focus after creating bunch of commands simultaneously.

stevehalliwell commented 3 years ago

Cherry-picked commits directly related to this issue from the submitted branch.