-
-
Notifications
You must be signed in to change notification settings - Fork 56
3.7.1 #118
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
Merged
Merged
3.7.1 #118
Conversation
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
Since there are two fewer menu items on the key edit mode, the actions following 'Decrease key' were all incorrect. The code now makes up for that by adding 2 to 'sel' (the number of the menu item clicked) when it is greater than that value and when editing the key.
When layer panning is mono, note panning does not average.
Due to the sandbox, using the built-in functions won't work in most of these cases (e.g. the song and pattern folders were always reported as non-existing). Fixes part of #106
It was loading the value from the 'Show key numbers' entry instead. Fixes #106
If the selection was cleared between clicking a macro and its window opening, the window and title would be drawn, but not the rest, leaving you locked in it. Fixes part of #107
Also fixed: data pack export and stereo drag were using the same window ID
Previously, clicking 'Select all note blocks in this layer' would always clear the selection prior to the operation
- Layer volume and stereo can now be changed in increments of 1, not only 10 - Made normal control (without holding Shift) a bit less sensitive
The MIDI import code was passing a `true` parameter as the note pitch, which should be the value for something else. Since true = 1, all notes generated by it were receiving that pitch. Also fixed descriptions of some functions missing parameters. Discovered while testing #108
The function which previously only checked if an update was available (control_http) was split into two different functions, check_updates (previous functionality) and get_update, which will attempt to download the file. draw_loading, an obsolete function to draw a loading bar to the screen, was repurposed and now shows, in MB, how much is left for the download to complete (as well as the percentage). The program version was temporarily changed to 3.6.0 in order for it to detect updates (remember to revert this later, lol). Currently, if the connection is interrupted during the download, the program will still think the download was successful, even though the file was only partially downloaded. This happens because both the download status and HTTP status return the same value (0 and 200, respectively) both when the file is downloaded completely, and when it fails. A way for detecting if the download didn't complete is being investigated.
The update system now detects if the download failed by comparing the file size against the total size sent by the server. This is done as soon as the "success" status is received and triggers either the success message, which closes the program and opens the installer, or an error message which asks if the user wants to open the website to update manually. Renamed the installer to 'Minecraft Note Block Studio Installer.exe' (more user-friendly in the User Account Control popup).
Restored the original loading bar drawing code for historical reasons (despite unused, it's still mentioned in a few places in the code). Moved the download progress bar drawing code to a new script called draw_downloadprogress().
- Add quotation marks to the shell command to allow spaces in the filename - Draw a placeholder in the download progress bar while the file size isn't retrieved (-.-- instead of 0.00) - Restore original draw_loading() code (for sure this time) - Change "Setup" to "Installer" in the filename - Delete old installers on startup - Shift some stuff in the startup code - Restore version number to current version
Auto-updater/Download new versions automatically
On undo/redo, add_block was passing a wrong argument that was causing the program to crash. Fixes #115
- Add a new string_truncate function that automatically adds ellipses (...) when necessary - Replace in-place check for the string width in three different places of the code (datapack preview, song/pattern folder) - Truncate recent file names in the greeting window + menu (the latter is still not fixed, there's something wrong with the menu width calculation) - Width of the 'Song info' window now adapts to the MIDI file name as well
- Layers without a name now display the default text in gray (as in light mode) - Changed link colors in greeting window to a lighter blue (better contrast in dark mode and still readable in light mode) - Changed green text to be lime in dark mode. Affects: up to date text in greeting window, "Compatible" indicator, reports in the Compatibility window.
In ec445fe, the variable song_midi wasn't initialized properly when the greeting window was disabled, causing the program to crash. It's now defined both on startup and in the reset code. What caused this whole business is the fact that MIDI import happens in two steps: open_midi (parses all the info in the file) and import_midi (converts the data into note blocks after you've picked instruments, etc.) Before the latter occurs, all the song data is reset, which also resets the MIDI filename that was stored on the first step. That made it necessary to remove it from the reset script and, instead, reset the name on unusual places, like in the greeting window and in the call for creating a new song. Applied solution: The first variable, midifile, stores the name on the first step. Every reset copies its value to a second variable, song_midi, used only for display. midifile is then set to "". With that, song_midi holds the song name for that session and displays it properly. When a song is created or loaded, a reset will occur and "" will be copied into song_midi, effectively clearing the display. This also fixes an unintended side effect of how the name was being handled: if you loaded a MIDI but clicked 'Cancel' in the MIDI settings window, the name would still be displayed in song info. To prevent that from happening, the first variable (midifile) is reset when the user clicks 'Cancel', to prevent it from being copied over to the display variable (song_midi) on the next reset.
The height was being defined inside the Preferences window, once the 'Show piano' toggle was changed. Moved that to the drawing code, which updates in real time.
Also made the hover text for the stereo icon a bit more centered
This is for a future addition in the Compatibility window to transpose notes inside the ±100 pitch range.
Updated to be compatible with all NBS versions up to date, which no longer crashes the program.
The time that each emitter will remain active for now depends on the pitch of the sound -- lower sounds will remain for longer, and vice-versa.
No longer per-song, it's now a global setting.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.