diff --git a/Gui.py b/Gui.py index 11ba1383..a0aac7af 100755 --- a/Gui.py +++ b/Gui.py @@ -175,8 +175,8 @@ def guiMain(args=None): self.pages["bottom"].pages = {} self.pages["bottom"].pages["content"] = bottom_frame(self, self, None) ## Save Settings Button - savesettingsButton = Button(self.pages["bottom"].pages["content"], text='Save Settings to File', command=lambda: save_settings_from_gui(True)) - savesettingsButton.pack(side=RIGHT) + savesettingsButton = self.pages["bottom"].pages["content"].widgets["savesettings"].pieces["button"] + savesettingsButton.configure(command=lambda: save_settings_from_gui(True)) # set bottom frame to main window self.pages["bottom"].pages["content"].pack(side=BOTTOM, fill=X, padx=5, pady=5) diff --git a/resources/app/gui/lang/en.json b/resources/app/gui/lang/en.json index 5d082636..cc33e73f 100644 --- a/resources/app/gui/lang/en.json +++ b/resources/app/gui/lang/en.json @@ -390,10 +390,11 @@ "bottom.content.names": "Player names", "bottom.content.seed": "Seed #", "bottom.content.generationcount": "Count", - "bottom.content.go": "Generate Patched Rom", + "bottom.content.go": "Generate Game", "bottom.content.dialog.error": "Error while creating seed", "bottom.content.dialog.success": "Success", "bottom.content.dialog.success.message": "Rom created successfully.", + "bottom.content.savesettings": "Save Settings", "bottom.content.outputdir": "Select Destination", "bottom.content.docs": "Open Documentation" } diff --git a/source/gui/bottom.py b/source/gui/bottom.py index 3d37908e..9cc05d23 100644 --- a/source/gui/bottom.py +++ b/source/gui/bottom.py @@ -150,9 +150,10 @@ def bottom_frame(self, parent, args=None): # button self.widgets[widget].type = "button" - self.widgets[widget].pieces["button"] = Button(self, text='Generate Patched Rom', command=generateRom) + self.widgets[widget].pieces["button"] = Button(self, command=generateRom) # button: pack self.widgets[widget].pieces["button"].pack(side=LEFT) + self.widgets[widget].pieces["button"].configure(bg="#CCCCCC") def open_output(): if output_path.cached_path is None: @@ -170,12 +171,8 @@ def bottom_frame(self, parent, args=None): args.outputpath = parent.settings["outputpath"] = folder_selected ## Output Button - # widget ID widget = "outputdir" - - # Empty object self.widgets[widget] = Empty() - # pieces self.widgets[widget].pieces = {} # storagevar @@ -183,8 +180,16 @@ def bottom_frame(self, parent, args=None): # button self.widgets[widget].type = "button" - self.widgets[widget].pieces["button"] = Button(self, text='Open Output Directory', command=select_output) - # button: pack + self.widgets[widget].pieces["button"] = Button(self, command=select_output) + self.widgets[widget].pieces["button"].pack(side=RIGHT) + + ## Save Settings Button + widget = "savesettings" + self.widgets[widget] = Empty() + self.widgets[widget].pieces = {} + # button + self.widgets[widget].type = "button" + self.widgets[widget].pieces["button"] = Button(self) self.widgets[widget].pieces["button"].pack(side=RIGHT) ## Documentation Button diff --git a/source/gui/loadcliargs.py b/source/gui/loadcliargs.py index 069b1fbd..e7e217b9 100644 --- a/source/gui/loadcliargs.py +++ b/source/gui/loadcliargs.py @@ -158,6 +158,14 @@ def loadcliargs(gui, args, settings=None): label = fish.translate("gui","gui",mainpage + '.' + subpage + '.' + widget) gui.pages[mainpage].pages[subpage].widgets[widget].pieces["button"].configure(text=label) + # Set Save Settings button + mainpage = "bottom" + subpage = "content" + widget = "savesettings" + # set textbox/frame label + label = fish.translate("gui","gui",mainpage + '.' + subpage + '.' + widget) + gui.pages[mainpage].pages[subpage].widgets[widget].pieces["button"].configure(text=label) + # Set Output Directory button mainpage = "bottom" subpage = "content"