From 7313d9dba639e7f399604e4f6c079a28a0668717 Mon Sep 17 00:00:00 2001 From: Christian Fillion Date: Wed, 18 Sep 2024 23:52:56 -0400 Subject: [PATCH] commit packaging fixes + reaimgui check + docking flag + context name --- ...lua => reapertips_Track icon selector.lua} | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) rename Tracks/{reapertips_Track-Icon-Selector.lua => reapertips_Track icon selector.lua} (96%) diff --git a/Tracks/reapertips_Track-Icon-Selector.lua b/Tracks/reapertips_Track icon selector.lua similarity index 96% rename from Tracks/reapertips_Track-Icon-Selector.lua rename to Tracks/reapertips_Track icon selector.lua index 66fe2e5ae..7f3227105 100644 --- a/Tracks/reapertips_Track-Icon-Selector.lua +++ b/Tracks/reapertips_Track icon selector.lua @@ -1,4 +1,4 @@ --- @description Track Icon Selector +-- @description Track icon selector -- @author Reapertips & Sexan -- @version 1.0 -- @screenshot @@ -27,34 +27,20 @@ -- REAPER Folder > Data > track_icons -- Within this folder, create or modify folders to represent your desired categories. The script will automatically recognize these folders as categories in the sidebar, allowing you to filter icons based on their assigned categories. --- @description Track Icon Selector --- @author Sexan -- @license GPL v3 --- @version 1.0 --- @changelog --- Initial release + +if not reaper.ImGui_GetBuiltinPath then + reaper.ShowMessageBox("Script needs ReaImGui.\nPlease Install it in next window", "MISSING DEPENDENCIES", 0) + reaper.ReaPack_BrowsePackages('^ReaImGui:') + return +end local r = reaper package.path = r.ImGui_GetBuiltinPath() .. '/?.lua' local os_separator = package.config:sub(1, 1) - local imgui = require "imgui" "0.9.1" local reaper_path = r.GetResourcePath() -local function NeedDeps() - local deps = {} - - if not r.ImGui_GetVersion then - deps[#deps + 1] = '"Dear Imgui"' - end - if #deps ~= 0 then - r.ShowMessageBox("Script needs ReaImGui.\nPlease Install it in next window", "MISSING DEPENDENCIES", 0) - r.ReaPack_BrowsePackages(table.concat(deps, " OR ")) - return true - end -end -if NeedDeps() then return end - local COLORS = { ["win_bg"] = 0x282828ff, ["sidebar_col"] = 0x2c2c2cff, @@ -104,7 +90,7 @@ local icon_size = 32 r.set_action_options(1) -local ctx = imgui.CreateContext('Track Icons', imgui.ConfigFlags_DockingEnable) +local ctx = imgui.CreateContext('Track icon selector') local WND_W, WND_H = 500, 500 local FLT_MIN, FLT_MAX = imgui.NumericLimits_Float()