Merge branch 'DoorDevUnstable' of https://github.com/miketrethewey/ALttPDoorRandomizer into MikeQoL
This commit is contained in:
@@ -43,7 +43,7 @@ class SpriteSelector(object):
|
|||||||
|
|
||||||
# Open SpriteSomething directory for Link sprites
|
# Open SpriteSomething directory for Link sprites
|
||||||
def open_spritesomething_listing(_evt):
|
def open_spritesomething_listing(_evt):
|
||||||
webbrowser.open("https://artheau.github.io/SpriteSomething/resources/app/snes/zelda3/link/sprites.html")
|
webbrowser.open("https://miketrethewey.github.io/SpriteSomething-collections/snes/zelda3/link/")
|
||||||
|
|
||||||
official_frametitle = Frame(self.window)
|
official_frametitle = Frame(self.window)
|
||||||
official_title_text = Label(official_frametitle, text="Official Sprites")
|
official_title_text = Label(official_frametitle, text="Official Sprites")
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
from tkinter import ttk, filedialog, StringVar, Button, Entry, Frame, Label, E, W, LEFT, X
|
from tkinter import ttk, filedialog, StringVar, Button, Entry, Frame, Label, E, W, LEFT, X, Text, Tk, INSERT
|
||||||
|
import source.classes.diags as diagnostics
|
||||||
import source.gui.widgets as widgets
|
import source.gui.widgets as widgets
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from functools import partial
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
|
from Main import __version__
|
||||||
|
|
||||||
def generation_page(parent,settings):
|
def generation_page(parent,settings):
|
||||||
# Generation Setup
|
# Generation Setup
|
||||||
@@ -76,4 +79,45 @@ def generation_page(parent,settings):
|
|||||||
# frame: pack
|
# frame: pack
|
||||||
self.widgets[widget].pieces["frame"].pack(fill=X)
|
self.widgets[widget].pieces["frame"].pack(fill=X)
|
||||||
|
|
||||||
|
## Run Diagnostics
|
||||||
|
# This one's more-complicated, build it and stuff it
|
||||||
|
# widget ID
|
||||||
|
widget = "diags"
|
||||||
|
|
||||||
|
# Empty object
|
||||||
|
self.widgets[widget] = Empty()
|
||||||
|
# pieces
|
||||||
|
self.widgets[widget].pieces = {}
|
||||||
|
|
||||||
|
# frame
|
||||||
|
self.frames["diags"] = Frame(self)
|
||||||
|
self.frames["diags"].pack()
|
||||||
|
self.widgets[widget].pieces["frame"] = Frame(self.frames["diags"])
|
||||||
|
|
||||||
|
|
||||||
|
def diags():
|
||||||
|
# Debugging purposes
|
||||||
|
dims = {
|
||||||
|
"window": {
|
||||||
|
"width": 800,
|
||||||
|
"height": 500
|
||||||
|
},
|
||||||
|
"textarea.characters": {
|
||||||
|
"width": 120,
|
||||||
|
"height": 50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diag = Tk()
|
||||||
|
diag.title("Door Shuffle " + __version__)
|
||||||
|
diag.geometry(str(dims["window"]["width"]) + 'x' + str(dims["window"]["height"]))
|
||||||
|
text = Text(diag, width=dims["textarea.characters"]["width"], height=dims["textarea.characters"]["height"])
|
||||||
|
text.pack()
|
||||||
|
text.insert(INSERT,"\n".join(diagnostics.output(__version__)))
|
||||||
|
# dialog button
|
||||||
|
self.widgets[widget].pieces["button"] = Button(self.widgets[widget].pieces["frame"], text='Run Diagnostics', command=partial(diags))
|
||||||
|
|
||||||
|
# button: pack
|
||||||
|
self.widgets[widget].pieces["button"].pack(side=LEFT)
|
||||||
|
# frame: pack
|
||||||
|
self.widgets[widget].pieces["frame"].pack(fill=X)
|
||||||
return self,settings
|
return self,settings
|
||||||
|
|||||||
Reference in New Issue
Block a user