Roblox backend: clear/upload only each tile's dirty region; scroll benchmark in t_drag, scrolling in t_composite
This commit is contained in:
@@ -56,6 +56,8 @@ game:GetService("RunService").Stepped:Connect(function()
|
||||
G.ImGui_ImplRoblox.NewFrame()
|
||||
io.DeltaTime = 1 / 60
|
||||
io:AddMousePosEvent(300 + (frame * 37) % 300, 100 + (frame * 53) % 500)
|
||||
local dw = ImGui.FindWindowByName("ImGui Sincerely Demo")
|
||||
if dw and frame % 3 == 0 then io:AddMousePosEvent(dw.Pos.x + 200, dw.Pos.y + 300); io:AddMouseWheelEvent(0, (frame % 30 < 18) and -1 or 1) end
|
||||
ImGui.NewFrame()
|
||||
ImGui.ShowDemoWindow(true)
|
||||
ImGui.SetNextWindowPos(ImVec2(20, 20)); ImGui.SetNextWindowSize(ImVec2(600, 700))
|
||||
|
||||
@@ -9,7 +9,7 @@ local io = ImGui.GetIO()
|
||||
local col = ImVec4(0.4, 0.7, 0.2, 0.5)
|
||||
local frame = 0
|
||||
local bx, by = 0, 0
|
||||
local MODE = ARG_OPEN == true and "picker" or "drag"
|
||||
local MODE = ARG_OPEN == true and "picker" or (type(ARG_OPEN) == "table" and "scroll" or "drag")
|
||||
game:GetService("RunService").Stepped:Connect(function()
|
||||
frame += 1
|
||||
G.ImGui_ImplRoblox.NewFrame()
|
||||
@@ -18,12 +18,15 @@ game:GetService("RunService").Stepped:Connect(function()
|
||||
local t = math.abs((frame % 200) - 100) -- triangle wave, smooth back and forth
|
||||
if frame == 5 then local w = ImGui.FindWindowByName("ImGui Sincerely Demo"); bx, by = w.Pos.x + 80, w.Pos.y + 8; io:AddMousePosEvent(bx, by) elseif frame == 6 then io:AddMouseButtonEvent(0, true)
|
||||
elseif frame > 6 then io:AddMousePosEvent(bx - t * 5, by + t * 2) end
|
||||
elseif MODE == "scroll" then
|
||||
local w = ImGui.FindWindowByName("ImGui Sincerely Demo"); if w then io:AddMousePosEvent(w.Pos.x + w.Size.x * 0.5, w.Pos.y + w.Size.y * 0.5) end
|
||||
io:AddMouseWheelEvent(0, (frame % 20 < 10) and -1 or 1)
|
||||
else
|
||||
io:AddMousePosEvent(60 + (frame * 7) % 200, 80 + (frame * 5) % 200)
|
||||
if frame == 6 then io:AddMouseButtonEvent(0, true) end
|
||||
end
|
||||
ImGui.NewFrame()
|
||||
if MODE == "drag" then
|
||||
if MODE ~= "picker" then
|
||||
if frame < 3 then ImGui.SetNextWindowPos(ImVec2(20, 20)); ImGui.SetNextWindowSize(ImVec2(500, 650)) end
|
||||
ImGui.ShowDemoWindow(true)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user