Created
June 18, 2024 01:08
-
-
Save gamingoninsulin/18a654022f249bee235904f536efb690 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################### | |
# made with gemini ai # | |
# author GamingOnInsulin # | |
# lisence MIT # | |
# date tueday 18 january 2024 # | |
############################### | |
# imports | |
import tkinter as tk | |
# import buttons | |
from Buttons.B_vanilla import B_vanilla | |
from Buttons.B_paper import B_paper | |
from Buttons.B_velocity import B_velocity | |
# import download logic | |
from Downloads.D_vanilla import D_vanilla | |
from Downloads.D_paper import D_paper | |
from Downloads.D_velocity import D_velocity | |
# main class | |
class ServerDownloader: | |
def __init__(self): | |
# make main window | |
self.root = tk.Tk() | |
self.root.title("Minecraft Server Downloader") | |
# Make frames for the button and the console output | |
self.button_frame = tk.Frame(self.root) | |
self.console_frame = tk.Frame(self.root) | |
# Place the frames in main window | |
self.button_frame.pack(side=tk.TOP) | |
self.console_frame.pack(side=tk.TOP, fill=tk.BOTH, expand=True) | |
# Make the buttons | |
self.paper_button = B_paper(self.button_frame, download_function=D_paper) | |
self.spigot_button = B_paper(self.button_frame, download_function=D_paper) | |
self.velocity_button = B_paper(self.button_frame, download_function=D_paper) | |
self.download_button = tk.Button(self.button_frame, text="Download", command=self.download_selected_server) | |
# Place the buttons in the buttonframe | |
self.paper_button.grid(row=0, column=0) | |
self.spigot_button.grid(row=0, column=1) | |
self.velocity_button.grid(row=0, column=2) | |
self.download_button.grid(row=1, column=0, columnspan=3) | |
# Makenthebconsole outpu field | |
self.console_output = tk.Text(self.console_frame) | |
self.console_output.pack(fill=tk.BOTH, expand=True) | |
# calling the logic base on the buttons and a version | |
def download_selected_server(self): | |
# TODO: Implementeer logica om te bepalen welke server geselecteerd is en download deze | |
pass | |
def start(self): | |
# Start the GUI-loop | |
self.root.mainloop() | |
if __name__ == "__main__": | |
server_downloader = ServerDownloader() | |
server_downloader.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just boilerplate