我尝试使用 CE Lua 脚本在 Cheat Engine 中的表单上制作几个面板对象。如何以正确的方式做到这一点?
local bricks = {}
local brickWidth = 70
local brickHeight = 25
local brickRows = 6
local brickColumns = 6
local rleft = 5
local rtop = 5
local cleft = 5
local ctop = 10
for row = 0, brickRows do
for column = 0, brickColumns do
bricks[row] = createPanel(gameMain)
bricks[row].Width = brickWidth
bricks[row].Height = brickHeight
bricks[row].Top = rtop
bricks[row].Left = rleft
bricks[row].Color = math.random(10,65255)
rleft = rleft + brickWidth + 5
bricks[column] = createPanel(gameMain)
bricks[column].Width = brickWidth
bricks[column].Height = brickHeight
bricks[column].Left = cleft
bricks[column].Top = brickHeight + 5
bricks[column].Color = math.random(10,65255)
ctop = ctop + brickHeight + 5
end
end
但它失败了。我想要的是每行和每列将包含 6 个面板。如何编写正确的脚本?谢谢