Skip to content

Commit

Permalink
Fix test_cmd_blueprint_line for headless.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurtron committed Dec 21, 2024
1 parent 055ca0a commit 175dfd5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions luaui/Widgets/Tests/cmd_blueprint/test_cmd_blueprint_line.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ function setup()

initialCameraState = Spring.GetCameraState()

Spring.SetCameraState({
mode = 5,
})
--Spring.SetCameraState({
-- mode = 5,
--})
end

function cleanup()
Expand Down Expand Up @@ -112,11 +112,13 @@ function test()
end)

local sx, sy = Spring.WorldToScreenCoords(x, y, z)
Spring.SetCameraTarget(x, y, z)
Spring.WarpMouse(sx, sy)

Script.LuaUI.MousePress(sx, sy, 1)

sx, sy = Spring.WorldToScreenCoords(x, y, z + bpH * (bpCount - 1))
Spring.SetCameraTarget(x, y, z + bpH * (bpCount - 1))
Spring.WarpMouse(sx, sy)

Test.waitFrames(delay)
Expand Down

0 comments on commit 175dfd5

Please sign in to comment.