Updated: Expand-contract nodes factorization

This commit is contained in:
dvdvideo1234 2024-07-29 23:29:57 +03:00
parent 186db54456
commit 7c5c080a14
2 changed files with 4 additions and 11 deletions

View File

@ -86,7 +86,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
------------ CONFIGURE ASMLIB ------------ ------------ CONFIGURE ASMLIB ------------
asmlib.InitBase("track","assembly") asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","8.759") asmlib.SetOpVar("TOOL_VERSION","8.760")
------------ CONFIGURE GLOBAL INIT OPVARS ------------ ------------ CONFIGURE GLOBAL INIT OPVARS ------------

View File

@ -1711,18 +1711,11 @@ function GetDirectory(pCurr, vName)
end end
function SetExpandNode(pnBase) function SetExpandNode(pnBase)
local bEx = pnBase:GetExpanded()
if(inputIsKeyDown(KEY_LSHIFT)) then if(inputIsKeyDown(KEY_LSHIFT)) then
if(pnBase:GetExpanded()) then pnBase:ExpandRecurse(not bEx)
pnBase:ExpandRecurse(false)
else
pnBase:ExpandRecurse(true)
end
else else
if(pnBase:GetExpanded()) then pnBase:SetExpanded(not bEx)
pnBase:SetExpanded(false)
else
pnBase:SetExpanded(true)
end
end end
end end