make it look more like a dialog

This commit is contained in:
Kartik K. Agaram 2023-11-26 09:21:09 -08:00
parent b517a75eb9
commit dc4cf14d28
2 changed files with 11 additions and 3 deletions

View File

@ -1,11 +1,19 @@
draw_file_dialog = function()
draw_file_dialog_input()
App.color{r=0.6, g=0.7, b=0.6}
love.graphics.rectangle('line',
Menu_left+5,
Menu_top+5,
Safe_width-Menu_left-10,
Safe_height-Menu_top-10,
5,5)
App.color(Menu_background)
love.graphics.rectangle('fill',
Menu_left+5,
Menu_bottom+5,
Safe_width-Menu_left-10,
Safe_height-Menu_bottom-10)
Safe_height-Menu_bottom-10,
5,5)
if Directory_contents == nil then
-- on the first frame after dialog is enabled
refresh_directory_contents()

View File

@ -1,7 +1,7 @@
draw_file_dialog_input = function()
-- draw a suffix to ensure the cursor is visible
App.color(Normal_color)
love.graphics.print(File_dialog_input_draw_suffix, Menu_left+15, Menu_top+5)
love.graphics.print(File_dialog_input_draw_suffix, Menu_left+15, Menu_top+10)
local w = App.width(File_dialog_input_draw_suffix)
draw_cursor(Menu_left+15+w, Menu_top+5, Current_pane.editor_state.line_height)
draw_cursor(Menu_left+15+w, Menu_top+10, Current_pane.editor_state.line_height)
end