using drawTextBox for editor info and spawn info
adjustement of keybinds
This commit is contained in:
parent
f62ec3ea32
commit
222f4478ca
@ -140,10 +140,12 @@ function drawEditor()
|
|||||||
drawGridDisplay()
|
drawGridDisplay()
|
||||||
drawGameworldForeground()
|
drawGameworldForeground()
|
||||||
endGameworldDraw()
|
endGameworldDraw()
|
||||||
doEditorEdit()
|
|
||||||
drawSpawns()
|
|
||||||
|
|
||||||
drawEditorRooms()
|
drawEditorRooms()
|
||||||
|
drawSpawns()
|
||||||
|
|
||||||
|
doEditorEdit()
|
||||||
|
|
||||||
drawSelectingPaletteTile()
|
drawSelectingPaletteTile()
|
||||||
|
|
||||||
if editor.palette_mode then
|
if editor.palette_mode then
|
||||||
@ -172,8 +174,14 @@ function doEditorEdit()
|
|||||||
expand_v = vertical
|
expand_v = vertical
|
||||||
end
|
end
|
||||||
love.graphics.setColor(100, 100, 100, 0.8)
|
love.graphics.setColor(100, 100, 100, 0.8)
|
||||||
love.graphics.print("> " .. horizontal .. ", " .. vertical .. "; " .. math.floor(mouse_x / game.scale + Camera.pos.x) .. ", " .. math.floor(mouse_y / game.scale + Camera.pos.y))
|
drawTextBox(
|
||||||
love.graphics.print("> " .. level_width .. "(" .. expand_h .. "), " .. level_height .. "(".. expand_v .. ")", 0, 10)
|
"Coords: [" ..
|
||||||
|
horizontal .. "," .. vertical .. "] (tile)\t[" ..
|
||||||
|
math.floor(mouse_x / game.scale + Camera.pos.x) .. "," .. math.floor(mouse_y / game.scale + Camera.pos.y).."] (pixel)\n" ..
|
||||||
|
"Level size: [" .. level_width .. ", " .. level_height .. "] +(" .. expand_h .. "," .. expand_v .. ")",
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
|
||||||
if editor.room_mode then
|
if editor.room_mode then
|
||||||
local rx = horizontal * tile_properties.width
|
local rx = horizontal * tile_properties.width
|
||||||
|
@ -128,7 +128,7 @@ function Keybind:default()
|
|||||||
Keybind.editor.entity_select = { keys = {1}}
|
Keybind.editor.entity_select = { keys = {1}}
|
||||||
Keybind.editor.entity_move = { keys = {2}}
|
Keybind.editor.entity_move = { keys = {2}}
|
||||||
Keybind.editor.entity_modify_archetype = { keys = {"t"}}
|
Keybind.editor.entity_modify_archetype = { keys = {"t"}}
|
||||||
Keybind.editor.entity_modify_data = { keys = {"d"}}
|
Keybind.editor.entity_modify_data = { keys = {"g"}}
|
||||||
-- Generic
|
-- Generic
|
||||||
Keybind.generic.lclick = { keys = {1}}
|
Keybind.generic.lclick = { keys = {1}}
|
||||||
Keybind.generic.rclick = { keys = {2}}
|
Keybind.generic.rclick = { keys = {2}}
|
||||||
|
@ -170,12 +170,15 @@ function drawSpawns()
|
|||||||
)
|
)
|
||||||
|
|
||||||
if spawn.selected then
|
if spawn.selected then
|
||||||
local text = spawn.archetype.type.."\n["..spawn.args[1]..","..spawn.args[2].."]\n"
|
local text = spawn.archetype.type.."\n---\nPosition\n["..spawn.args[1]..","..spawn.args[2].."]"
|
||||||
for i=3, #spawn.args do
|
if #spawn.args > 2 then
|
||||||
if i > 3 then text = text .. ", " end
|
text = text .. "\n---\nData:\n"
|
||||||
text = text .. tostring(spawn.args[i])
|
for i=3, #spawn.args do
|
||||||
|
if i > 3 then text = text .. ", " end
|
||||||
|
text = text .. tostring(spawn.args[i])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
love.graphics.print(
|
drawTextBox(
|
||||||
text,
|
text,
|
||||||
spawn.args[1] - Camera.pos.x + 20,
|
spawn.args[1] - Camera.pos.x + 20,
|
||||||
spawn.args[2] - Camera.pos.y
|
spawn.args[2] - Camera.pos.y
|
||||||
|
Loading…
Reference in New Issue
Block a user