diff --git a/nim/src/ui/mainmenu.nim b/nim/src/ui/mainmenu.nim index 626fa73d5..7dcfed6a0 100644 --- a/nim/src/ui/mainmenu.nim +++ b/nim/src/ui/mainmenu.nim @@ -55,7 +55,7 @@ proc createMainMenu*() = uiDirectory = dataDirectory & "ui" & DirSep iconPath = uiDirectory & "images" & DirSep & "icon.png" mainWindow = "." - if not dirExists(iconPath): + if not fileExists(iconPath): tclEval(script = "wm withdraw " & mainWindow) tclEval(script = "tk_messageBox -message {Couldn't not find the game data files and the game have to stop. Are you sure that directory \"" & dataDirectory & "\" is the proper place where the game data files exists?} -icon error -type ok") diff --git a/src/ui/mainmenu.adb b/src/ui/mainmenu.adb index 272f0c899..6a5c3fc1d 100644 --- a/src/ui/mainmenu.adb +++ b/src/ui/mainmenu.adb @@ -49,12 +49,12 @@ with Config; use Config; with Dialogs; use Dialogs; -- with Factions; with Game; use Game; --- with Goals.UI; --- with MainMenu.Commands; +with Goals.UI; +with MainMenu.Commands; -- with Maps.UI; --- with Table; +with Table; -- with Themes; --- with Utils.UI; +with Utils.UI; package body MainMenu is @@ -132,7 +132,6 @@ package body MainMenu is Import => True, External_Name => "createAdaMainMenu"; begin - Create_Ada_Main_Menu; -- if not Exists(Name => Icon_Path) then -- Wm_Set(Widgt => Main_Window, Action => "withdraw"); -- if MessageBox @@ -147,11 +146,12 @@ package body MainMenu is -- end if; -- Icon := -- Create(pathName => "logo", options => "-file {" & Icon_Path & "}"); --- MainMenu.Commands.Add_Commands; --- Dialogs.Add_Commands; --- Utils.UI.Add_Commands; --- Goals.UI.Add_Commands; --- Table.Add_Commands; + MainMenu.Commands.Add_Commands; + Dialogs.Add_Commands; + Utils.UI.Add_Commands; + Goals.UI.Add_Commands; + Table.Add_Commands; + Create_Ada_Main_Menu; -- Wm_Set -- (Widgt => Main_Window, Action => "iconphoto", -- Options => "-default " & Icon);