- [FIX] Encara que es tinga un item seleccionat, es pot treballar amb els items en pantalla
This commit is contained in:
@@ -105,7 +105,7 @@ editor = {
|
||||
editor.modified = true
|
||||
end
|
||||
if mouse.press(mouse.LEFT) then
|
||||
if editor.item_selected then
|
||||
if not editor.item_hovered and not editor.item_dragged and editor.item_selected then
|
||||
map.surf(rooms.surf_items)
|
||||
--print(editor.item_selected)
|
||||
map.tile(tx,ty,editor.item_selected)
|
||||
@@ -118,7 +118,7 @@ editor = {
|
||||
if mouse.press(mouse.RIGHT) then
|
||||
editor.item_selected = nil
|
||||
end
|
||||
if editor.item_selected then
|
||||
if not editor.item_hovered and not editor.item_dragged and editor.item_selected then
|
||||
local k = items[editor.item_selected]
|
||||
surf.source(surf_sprites)
|
||||
draw.surf(k.visual.x, k.visual.y, k.visual.w, k.visual.h, mx, my, k.visual.w, k.visual.h, editor.flip)
|
||||
@@ -161,7 +161,7 @@ editor = {
|
||||
|
||||
if editor.layer==LAYER_ITEMS then
|
||||
if key.press(key.F) then
|
||||
if editor.item_selected then
|
||||
if not editor.item_hovered and editor.item_selected then
|
||||
editor.flip = not editor.flip
|
||||
elseif editor.item_hovered then
|
||||
local sprite = sprites.list[editor.item_hovered]
|
||||
|
||||
Reference in New Issue
Block a user