how can im make input goes under last line of output ?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
hanicraft
Prole
Posts: 2
Joined: Tue Apr 25, 2023 5:19 pm

how can im make input goes under last line of output ?

Post by hanicraft »

im making a fantasy console but im want when user enters command it automaticly goes under output

heres what i tried so far

Code: Select all

function love.draw()
  local outputHeight = font:getHeight(output)
  love.graphics.print(output, 10, 10)
  love.graphics.print(input, 10, 20 + outputHeight)
end
User avatar
Bobble68
Party member
Posts: 162
Joined: Wed Nov 30, 2022 9:16 pm
Contact:

Re: how can im make input goes under last line of output ?

Post by Bobble68 »

Do you have any code other than this? It sounds like you also want a text input from typing, which isn't too hard but what you've shown is just a snippet.
If I'm understanding what you want exactly, my advice would be to have a string variable that you append the input to when when you press enter.
Dragon
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 13 guests