From 0c925036d9f1077bd03c50f3169dfd04169eccc4 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Fri, 20 Feb 2026 01:22:51 -0500 Subject: [PATCH] feat: Add action buttons for turtle commands in control mode --- pocketcontrol.lua | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pocketcontrol.lua b/pocketcontrol.lua index 33fa2a8..ed90cb3 100644 --- a/pocketcontrol.lua +++ b/pocketcontrol.lua @@ -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)