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

Release Step sequencing (replace mode) v1.1.4 #1463

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions MIDI Editor/cfillion_Step sequencing (replace mode).lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- @description Step sequencing (replace mode)
-- @author cfillion
-- @version 1.1.3
-- @changelog Internal code cleanup
-- @version 1.1.4
-- @changelog Fix toggling "Skip unselected notes" in the fallback (non-ReaImGui) options menu [p=2823664]
-- @provides
-- .
-- [main] . > cfillion_Step sequencing (options).lua
Expand Down Expand Up @@ -422,21 +422,22 @@ local function optionsMenu(mode, items)
end

local function legacyOptionsMenu(mode, items)
local menu = {}
local menu, values = {}, {}

for id, item in ipairs(items) do
if type(item) == 'table' then
local checkbox = mode & item[1] ~= 0 and '!' or ''
table.insert(values, item[1])
table.insert(menu, checkbox .. item[2])
else
table.insert(menu, item)
end
end

local choice = gfx.showmenu(table.concat(menu, '|'))
if not items[choice] then return end
if not values[choice] then return end

mode = mode ~ items[choice][1]
mode = mode ~ values[choice]
reaper.SetExtState(EXT_SECTION, EXT_MODE_KEY, mode, true)
end

Expand All @@ -454,6 +455,7 @@ if scriptName:match('%(options%)') then
else
gfxdo(function() legacyOptionsMenu(mode, items) end)
end

return
end

Expand Down