This commit is contained in:
Your Name 2026-08-06 23:54:49 -04:00
parent 7c7f76b188
commit a9af97925e
12 changed files with 329 additions and 30 deletions

View file

@ -360,6 +360,11 @@ function editorMouseHandler(x, y, button)
end
end
end
else
-- click landed on the grid (game area): place the selected asset
if editorView == "room" and button == 1 and selectedAsset then
currentRoom:attemptPlace(selectedAsset, gameAssets[selectedAsset], x, y, selectedColor)
end
end
end

View file

@ -117,9 +117,9 @@ function GUI:onClic(button)
print(button)
print("hey!!! u cliced on me. my name is ", self.name, self.text)
GUI.pressSound:play()
if button == "l" then
if button == 1 then
self.clic:left()
elseif button == "r" then
elseif button == 2 then
self.clic:right()
end
end