feat: Add action buttons for turtle commands in control mode

This commit is contained in:
MayaTheShy
2026-02-20 01:22:51 -05:00
parent 68e21d9c82
commit 0c925036d9

View File

@@ -292,8 +292,25 @@ local function drawControl()
sendCommand(turtle.turtleID, "up")
end, colors.green)
-- Action buttons (bottom row)
local btnY = h - 3
-- Action buttons (bottom rows)
local btnY = h - 5
addButton(2, btnY, 6, 1, "EXPLR", function()
sendCommand(turtle.turtleID, "explore")
end, colors.cyan)
addButton(9, btnY, 6, 1, "MINE", function()
sendCommand(turtle.turtleID, "mine")
end, colors.orange)
addButton(16, btnY, 6, 1, "HOME", function()
sendCommand(turtle.turtleID, "returnHome")
end, colors.yellow)
addButton(23, btnY, 6, 1, "STOP", function()
sendCommand(turtle.turtleID, "stop")
end, colors.red)
btnY = h - 3
addButton(2, btnY, 6, 1, "DOWN", function()
sendCommand(turtle.turtleID, "down")
end, colors.green)
@@ -302,14 +319,6 @@ local function drawControl()
sendCommand(turtle.turtleID, "dig")
end, colors.red)
addButton(16, btnY, 6, 1, "MINE", function()
sendCommand(turtle.turtleID, "mineStart")
end, colors.orange)
addButton(23, btnY, 6, 1, "HOME", function()
sendCommand(turtle.turtleID, "returnHome")
end, colors.yellow)
for i = #buttons - 8, #buttons do
if buttons[i] then
drawButton(buttons[i], false)