bugfix: never skip files in file navigator
This commit is contained in:
parent
b5ff0a4764
commit
b00232e01a
|
@ -61,6 +61,9 @@ function source.draw_file_navigator()
|
||||||
end
|
end
|
||||||
log(2, file)
|
log(2, file)
|
||||||
add_file_to_menu(file, i == File_navigation.index)
|
add_file_to_menu(file, i == File_navigation.index)
|
||||||
|
if Menu_cursor >= App.screen.width - 5 then
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
log_end('render file navigator')
|
log_end('render file navigator')
|
||||||
end
|
end
|
||||||
|
@ -68,10 +71,6 @@ end
|
||||||
function add_file_to_menu(s, cursor_highlight)
|
function add_file_to_menu(s, cursor_highlight)
|
||||||
local s_text = to_text(s)
|
local s_text = to_text(s)
|
||||||
local width = App.width(s_text)
|
local width = App.width(s_text)
|
||||||
if Menu_cursor + width > App.screen.width - 5 then
|
|
||||||
log(2, 'skipped')
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if cursor_highlight then
|
if cursor_highlight then
|
||||||
App.color(Menu_highlight_color)
|
App.color(Menu_highlight_color)
|
||||||
love.graphics.rectangle('fill', Menu_cursor-5,5-2, width+5*2,Editor_state.line_height+2*2)
|
love.graphics.rectangle('fill', Menu_cursor-5,5-2, width+5*2,Editor_state.line_height+2*2)
|
||||||
|
|
Loading…
Reference in New Issue