Fix StyleCopy for named-field vectors (Style Editor assert)
This commit is contained in:
+1
-1
@@ -21982,7 +21982,7 @@ local function StyleCopy(dst, src)
|
||||
elseif type(v) == "table" and getmetatable(v) ~= nil and type(v[1]) == "number" then
|
||||
local c = dst[k]
|
||||
if type(c) ~= "table" then c = setmetatable({}, getmetatable(v)); dst[k] = c end
|
||||
for _, key in ipairs({ "x", "y", "z", "w" }) do if rawget(v, key) ~= nil then c[key] = v[key] end end
|
||||
for _, key in ipairs({ "x", "y", "z", "w" }) do if rawget(v, key) ~= nil then rawset(c, key, rawget(v, key)) end end
|
||||
else
|
||||
dst[k] = v
|
||||
end
|
||||
|
||||
@@ -1629,7 +1629,7 @@ local function StyleCopy(dst, src)
|
||||
elseif type(v) == "table" and getmetatable(v) ~= nil and type(v[1]) == "number" then
|
||||
local c = dst[k]
|
||||
if type(c) ~= "table" then c = setmetatable({}, getmetatable(v)); dst[k] = c end
|
||||
for _, key in ipairs({ "x", "y", "z", "w" }) do if rawget(v, key) ~= nil then c[key] = v[key] end end
|
||||
for _, key in ipairs({ "x", "y", "z", "w" }) do if rawget(v, key) ~= nil then rawset(c, key, rawget(v, key)) end end
|
||||
else
|
||||
dst[k] = v
|
||||
end
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
local G = require(game:GetService("ReplicatedStorage"):WaitForChild("ImGui"))
|
||||
local ImGui = G.ImGui
|
||||
ImGui.CreateContext(); G.ImGui_ImplRoblox.Init()
|
||||
local f = 0
|
||||
game:GetService("RunService").Stepped:Connect(function()
|
||||
f += 1
|
||||
G.ImGui_ImplRoblox.NewFrame(); ImGui.NewFrame()
|
||||
ImGui.Begin("SE"); ImGui.ShowStyleEditor(); ImGui.End()
|
||||
ImGui.Render(); G.ImGui_ImplRoblox.RenderDrawData(ImGui.GetDrawData())
|
||||
if f == 10 then print("SE OK") end
|
||||
end)
|
||||
Reference in New Issue
Block a user