update cursor in search box

This commit is contained in:
Kartik K. Agaram 2022-07-25 18:17:04 -07:00
parent 94b6d04e83
commit e26470aada
1 changed files with 1 additions and 3 deletions

View File

@ -13,12 +13,10 @@ function Text.draw_search_bar(State)
love.graphics.rectangle('line', 20, y-6, App.screen.width-40, h+2, 2,2)
App.color(Text_color)
App.screen.print(State.search_term, 25,y-5)
App.color(Cursor_color)
if State.search_text == nil then
State.search_text = App.newText(love.graphics.getFont(), State.search_term)
end
love.graphics.circle('fill', 25+App.width(State.search_text),y-5+h, 2)
App.color(Text_color)
Text.draw_cursor(State, 25+App.width(State.search_text),y-5)
end
function Text.search_next(State)