Skip to content

Commit

Permalink
Merge pull request #204 from ylme/master
Browse files Browse the repository at this point in the history
Modify editor file menu
  • Loading branch information
cloudwu authored Oct 27, 2024
2 parents fade971 + ad51882 commit c3cc65e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/editor/pkg/tools.editor/widget/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ function m.show()
local camera_setting
if ImGui.BeginMainMenuBar() then
if ImGui.BeginMenu "File" then
if ImGui.MenuItemEx(faicons.ICON_FA_FILE_PEN.." New", "Ctrl+N") then
if ImGui.MenuItemEx(faicons.ICON_FA_FILE.." New", "Ctrl+N") then
world:pub {"ResetPrefab"}
end
if ImGui.MenuItemEx(faicons.ICON_FA_FOLDER_OPEN.." Open", "Ctrl+O") then
world:pub{"OpenProject"}
if ImGui.MenuItemEx(faicons.ICON_FA_FILE_PEN.." Open File", "Ctrl+O") then
local filepath = uiutils.get_open_file_path("Select Prefab", "prefab")
if lfs.exists(filepath) then
world:pub{"OpenFile", filepath, lfs.path(filepath):extension() == ".prefab"}
end
end
ImGui.Separator()
if ImGui.BeginMenu(faicons.ICON_FA_LIST.." Recent Files") then
Expand Down

0 comments on commit c3cc65e

Please sign in to comment.