Skip to content
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

Added a script category to New File, with appropriate directory structure #1027

Merged
merged 2 commits into from
Dec 7, 2022

Conversation

kwekmaster
Copy link
Contributor

@kwekmaster kwekmaster commented Dec 6, 2022

Implemented

New Redscript file. (Click spoiler to see image)

image

New CET Lua file. (Click spoiler to see image)

image

Implementation Notes:

  • Scripts is the category for both. Because that's what they are: scripts.
  • GetDefaultDir is still set to the resources directory. I added the full path to the FileName instead. This allows better control for script writers who (hopefully) has a bit more knowledge on where these things go. IMHO this strikes a good balance between UX and usability.
  • That said, I tacked on the project's name as starting directory for the scripts in the FileName. User can change this manually.
  • I didn't care too much for the file icons since it doesn't impact functionality. *.reds has a pre-existing icon, but CET lua doesn't have it. Let me know if you have any preference/want me to assign an icon for it.

Testing

  • Intended functionality testing. Done--works as intended.
  • Integration. Done, undisturbed. e.g. my screenies above show what happens if the file already exist.
  • Existing functionality testing. Done, also undisturbed.

@kwekmaster kwekmaster linked an issue Dec 6, 2022 that may be closed by this pull request
Copy link
Member

@rfuzzo rfuzzo left a comment

Choose a reason for hiding this comment

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

lgtm thanks

@rfuzzo rfuzzo merged commit 44cd96b into WolvenKit:main Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue: Add a "New File" button for script users
2 participants