-
Notifications
You must be signed in to change notification settings - Fork 153
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
Release Floating Solo Toolbar v1.0 #1489
Release Floating Solo Toolbar v1.0 #1489
Conversation
Suggestion: it might be a good idea to save the settings in the same folder as the script's file rather than hard-coded to the resource path's root. |
To enable backward compatibility, it's: package.path = reaper.ImGui_GetBuiltinPath() .. '/?.lua'
require 'imgui' '0.X.Y' Since the script uses the now-removed DestroyContext function, it looks like it was written for an older version of ReaImGui? Specify which one in the |
-- ReaImGui: API version 0.8 or later | ||
-- @requires | ||
-- REAPER 6.0 or 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.
It is better to use something like:
app_vrs = tonumber(reaper.GetAppVersion():match('[%d%.]+'))
check_vrs = 6.0
if app_vrs < check_vrs then return reaper.MB('This script require REAPER '..check_vrs..'+','',0) end
local ImGui
if not reaper.ImGui_GetBuiltinPath then return reaper.MB('This script require ReaImGui extension','',0) end
package.path = reaper.ImGui_GetBuiltinPath() .. '/?.lua'
ImGui = require 'imgui' '0.9.3.2'
window_open = false | ||
end | ||
else | ||
reaper.ImGui_DestroyContext(imgui) |
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.
DestroyContext is not required for 0.9.3.2
end | ||
|
||
local function SaveSettings() | ||
local file = io.open(save_file_path, "w") |
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.
This is really bad idea. At the you have NeftToolbarSettings.lua, which kinda "wtf is that", because it is not a script, while it is marked as a script. I would recommend to use Get(Set)ExtState() for things like that. It is better to use base64 encoding/decoding if you store multiline strings (very close to your case because you store serialized table).
I'm sorry for this mess. This is the first time I've posted something here. And anyway, this is my first script. I'm writing it with GPT. See the latest fix |
The action filename still wasn't in sentence case: fixed via #1495. |
No description provided.