Renamed a couple buttons
This commit is contained in:
4
Gui.py
4
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)
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user