diff --git a/gui/gui_main.py b/gui/gui_main.py index 6dcded1bb..161451b23 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -168,176 +168,6 @@ class wx_python_gui: ) ) self.return_button.Centre(wx.HORIZONTAL) - - def walkthrough_main_menu(self, event=None): - # Define Menu - # - Header: OpenCore Legacy Patcher v{self.constants.patcher_version} - # - Subheader: Model: {self.constants.custom_model or self.computer.real_model} - # - Options: - # - First Time Setup - # - Post-Install Setup - # - Advanced Menu - - self.frame.DestroyChildren() - self.walkthrough_mode = False - - # Header - self.header = wx.StaticText(self.frame, label=f"OpenCore Legacy Patcher v{self.constants.patcher_version}") - self.header.SetFont(wx.Font(18, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) - self.header.Centre(wx.HORIZONTAL) - - # Subheader - self.subheader = wx.StaticText(self.frame, label=f"Model: {self.constants.custom_model or self.computer.real_model}") - self.subheader.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) - self.subheader.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.header.GetPosition().y + self.header.GetSize().height + 5 - ) - ) - self.subheader.Centre(wx.HORIZONTAL) - - # Button: First Time Setup - self.first_time_setup = wx.Button(self.frame, label="First Time Setup", size=(200,30)) - self.first_time_setup.Bind(wx.EVT_BUTTON, self.first_time_setup_menu) - self.first_time_setup.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.subheader.GetPosition().y + self.subheader.GetSize().height + 5 - ) - ) - self.first_time_setup.Centre(wx.HORIZONTAL) - - # Button: Post-Install Setup - self.post_install_setup = wx.Button(self.frame, label="Post-Install Setup", size=(200,30)) - self.post_install_setup.Bind(wx.EVT_BUTTON, self.not_yet_implemented_menu) - self.post_install_setup.SetPosition( - wx.Point( - -1, - self.first_time_setup.GetPosition().y + self.first_time_setup.GetSize().height - ) - ) - self.post_install_setup.Centre(wx.HORIZONTAL) - - # Button: Advanced Menu - self.advanced_menu = wx.Button(self.frame, label="Advanced Menu", size=(200,30)) - self.advanced_menu.Bind(wx.EVT_BUTTON, self.advanced_main_menu) - self.advanced_menu.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.post_install_setup.GetPosition().y + self.post_install_setup.GetSize().height - ) - ) - self.advanced_menu.Centre(wx.HORIZONTAL) - - # Help Button - self.help_button = wx.Button(self.frame, label="Help", size=(200,30)) - self.help_button.SetPosition( - wx.Point( - self.advanced_menu.GetPosition().x, - self.advanced_menu.GetPosition().y + self.advanced_menu.GetSize().height - ) - ) - self.help_button.Bind(wx.EVT_BUTTON, self.help_menu) - self.help_button.Centre(wx.HORIZONTAL) - - # Set the window size below help button - self.frame.SetSize( - self.WINDOW_WIDTH_MAIN, - self.help_button.GetPosition().y + self.help_button.GetSize().height + 40 - ) - - self.app.MainLoop() - - def first_time_setup_menu(self, event=None): - # Define Menu - # - Header: First Time Setup - # - Subheader: Model: {self.constants.custom_model or self.computer.real_model} - # - Label: Here we'll be downloading and create a macOS installer - # - Label: Then, install OpenCore onto the installer's drive (or any other bootable drive) - # - Button: Create macOS Installer - # - Button: Return to Main Menu - - self.frame.DestroyChildren() - self.walkthrough_mode = True - - # Header - self.header = wx.StaticText(self.frame, label="First Time Setup") - self.header.SetFont(wx.Font(18, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) - self.header.Centre(wx.HORIZONTAL) - - # Subheader - self.subheader = wx.StaticText(self.frame, label=f"Model: {self.constants.custom_model or self.computer.real_model}") - self.subheader.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) - self.subheader.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.header.GetPosition().y + self.header.GetSize().height + 5 - ) - ) - self.subheader.Centre(wx.HORIZONTAL) - - # Label: Here we'll be downloading and create a macOS installer - self.label_1 = wx.StaticText(self.frame, label="Here we'll download and create a macOS installer") - self.label_1.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) - self.label_1.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.subheader.GetPosition().y + self.subheader.GetSize().height + 5 - ) - ) - self.label_1.Centre(wx.HORIZONTAL) - - # Label: Then, install OpenCore onto the installer's drive (or any other bootable drive) - self.label_2 = wx.StaticText(self.frame, label="Then, install OpenCore onto the installer's drive") - self.label_2.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) - self.label_2.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.label_1.GetPosition().y + self.label_1.GetSize().height + 5 - ) - ) - self.label_2.Centre(wx.HORIZONTAL) - - # Label: Once finished, we can reboot and install macOS! - self.label_3 = wx.StaticText(self.frame, label="Once finished, we can reboot and install macOS!") - self.label_3.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) - self.label_3.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.label_2.GetPosition().y + self.label_2.GetSize().height + 5 - ) - ) - self.label_3.Centre(wx.HORIZONTAL) - - # Button: Create macOS Installer - self.create_macos_installer = wx.Button(self.frame, label="Create macOS Installer", size=(200,30)) - self.create_macos_installer.Bind(wx.EVT_BUTTON, self.not_yet_implemented_menu) - self.create_macos_installer.SetPosition( - wx.Point( - self.header.GetPosition().x, - self.label_3.GetPosition().y + self.label_3.GetSize().height + 5 - ) - ) - self.create_macos_installer.Centre(wx.HORIZONTAL) - - # Button: Return to Main Menu - self.return_to_main_menu = wx.Button(self.frame, label="Return to Main Menu", size=(200,30)) - self.return_to_main_menu.Bind(wx.EVT_BUTTON, self.main_menu) - self.return_to_main_menu.SetPosition( - - wx.Point( - self.create_macos_installer.GetPosition().x, - self.create_macos_installer.GetPosition().y + self.create_macos_installer.GetSize().height - ) - ) - self.return_to_main_menu.Centre(wx.HORIZONTAL) - - # Set the window size below return to main menu button - self.frame.SetSize( - -1, - self.return_to_main_menu.GetPosition().y + self.return_to_main_menu.GetSize().height + 40 - ) def main_menu(self, event=None): # Define Menu