Merge branch 'DoorDevUnstable' of https://github.com/miketrethewey/ALttPDoorRandomizer into MikeQoL

This commit is contained in:
aerinon
2021-02-16 13:59:24 -07:00
2 changed files with 46 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ class SpriteSelector(object):
# Open SpriteSomething directory for Link sprites
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_title_text = Label(official_frametitle, text="Official Sprites")

View File

@@ -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 json
import os
from functools import partial
from source.classes.Empty import Empty
from Main import __version__
def generation_page(parent,settings):
# Generation Setup
@@ -76,4 +79,45 @@ def generation_page(parent,settings):
# frame: pack
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