added function to cancel active prompt added function to add new spawns from editor added keybind for that
This commit is contained in:
@@ -7,39 +7,15 @@ editor = {
|
||||
function stepEditor()
|
||||
editor.palette_mode = editor.palette_mode or false
|
||||
animateTiles()
|
||||
if Keybind:checkPressed(Keybind.editor.room_mode) then
|
||||
if love.keyboard.isDown("lshift") then
|
||||
editor.room_mode = "delete"
|
||||
else
|
||||
editor.room_mode = not editor.room_mode
|
||||
if Prompt.active_prompt == nil then
|
||||
if Keybind:checkPressed(Keybind.editor.room_mode) then
|
||||
if love.keyboard.isDown("lshift") then
|
||||
editor.room_mode = "delete"
|
||||
else
|
||||
editor.room_mode = not editor.room_mode
|
||||
end
|
||||
editor.room_points = {}
|
||||
end
|
||||
editor.room_points = {}
|
||||
end
|
||||
|
||||
if Keybind:checkPressed(Keybind.editor.palette_mode) then
|
||||
if editor.palette_mode then
|
||||
editor.palette_mode = false
|
||||
palette_scroll_x = nil
|
||||
palette_scroll_y = nil
|
||||
else
|
||||
editor.palette_mode = true
|
||||
palette_scroll_x = 0
|
||||
palette_scroll_y = 0
|
||||
end
|
||||
end
|
||||
|
||||
if Keybind:checkPressed(Keybind.editor.palette_mode) then
|
||||
if editor.palette_mode then
|
||||
editor.palette_mode = false
|
||||
palette_scroll_x = nil
|
||||
palette_scroll_y = nil
|
||||
else
|
||||
editor.palette_mode = true
|
||||
palette_scroll_x = 0
|
||||
palette_scroll_y = 0
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if Keybind:checkPressed(Keybind.editor.palette_mode) then
|
||||
if editor.palette_mode then
|
||||
@@ -53,6 +29,31 @@ function stepEditor()
|
||||
end
|
||||
end
|
||||
|
||||
if Keybind:checkPressed(Keybind.editor.palette_mode) then
|
||||
if editor.palette_mode then
|
||||
editor.palette_mode = false
|
||||
palette_scroll_x = nil
|
||||
palette_scroll_y = nil
|
||||
else
|
||||
editor.palette_mode = true
|
||||
palette_scroll_x = 0
|
||||
palette_scroll_y = 0
|
||||
end
|
||||
end
|
||||
|
||||
if Keybind:checkPressed(Keybind.editor.palette_mode) then
|
||||
if editor.palette_mode then
|
||||
editor.palette_mode = false
|
||||
palette_scroll_x = nil
|
||||
palette_scroll_y = nil
|
||||
else
|
||||
editor.palette_mode = true
|
||||
palette_scroll_x = 0
|
||||
palette_scroll_y = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- TODO:
|
||||
-- i changed this but i dont know what was to do here.
|
||||
-- - made specific action keybinds
|
||||
@@ -237,6 +238,10 @@ function doEditorEdit()
|
||||
promptSpawnArchetype()
|
||||
elseif Keybind:checkDown(Keybind.editor.entity_modify_data) then
|
||||
promptSpawnArgs()
|
||||
elseif Keybind:checkDown(Keybind.editor.entity_remove) then
|
||||
deleteSpawn()
|
||||
elseif Keybind:checkDown(Keybind.editor.entity_new) then
|
||||
promptSpawnNew()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user