- [FIX][EDITOR] De vegades el nom de l'actor es veia mal
This commit is contained in:
@@ -53,8 +53,8 @@ actors={
|
|||||||
if v.ox then x = x + v.ox end
|
if v.ox then x = x + v.ox end
|
||||||
if v.oy then y = y + v.oy end
|
if v.oy then y = y + v.oy end
|
||||||
|
|
||||||
local mx = math.floor((mousex()-game.cam.x)/8)
|
local mx = math.floor((mousex()+game.cam.x)/8)
|
||||||
local my = math.floor((mousey()-game.cam.y)/8)
|
local my = math.floor((mousey()+game.cam.y)/8)
|
||||||
if (mx==x or mx==x+1) and (my==y or my==y-1) then
|
if (mx==x or mx==x+1) and (my==y or my==y-1) then
|
||||||
actors.under_cursor=v.name
|
actors.under_cursor=v.name
|
||||||
subpal(1,16,8)
|
subpal(1,16,8)
|
||||||
|
|||||||
@@ -126,7 +126,12 @@ game={
|
|||||||
actors.draw()
|
actors.draw()
|
||||||
subpal()
|
subpal()
|
||||||
if actors.under_cursor~="" then
|
if actors.under_cursor~="" then
|
||||||
text(actors.under_cursor,mousex()+8,mousey()+8,9)
|
if (mousex()<=80) then
|
||||||
|
text(actors.under_cursor,mousex()+game.cam.x+4,mousey()+game.cam.y+4,9)
|
||||||
|
else
|
||||||
|
local size = #actors.under_cursor
|
||||||
|
text(actors.under_cursor,mousex()+game.cam.x-size*4,mousey()+game.cam.y+4,9)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if mapa.front_layer then
|
if mapa.front_layer then
|
||||||
setsource(tiles)
|
setsource(tiles)
|
||||||
@@ -152,8 +157,8 @@ game={
|
|||||||
|
|
||||||
game.draw()
|
game.draw()
|
||||||
|
|
||||||
local mx = math.floor((mousex()-game.cam.x)/8)
|
local mx = math.floor((mousex()+game.cam.x)/8)
|
||||||
local my = math.floor((mousey()-game.cam.y)/8)
|
local my = math.floor((mousey()+game.cam.y)/8)
|
||||||
text(mx..","..my,1,19,8)
|
text(mx..","..my,1,19,8)
|
||||||
|
|
||||||
text(game.cam.x..","..game.cam.y,1,1,8)
|
text(game.cam.x..","..game.cam.y,1,1,8)
|
||||||
|
|||||||
Reference in New Issue
Block a user