Skip to content

Commit

Permalink
Added version and Launch button update
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Pavlíček committed Mar 27, 2024
1 parent 96bb41d commit c7f92ca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion DefaultConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Server": "\"{executable}\" \"{uproject_path}\" {map_path} -server -log",
"Client": "\"{executable}\" \"{uproject_path}\" {map_path}?listen -game -WINDOWED -ResX=1200 -ResY=800 -log",
"Standalone": "\"{executable}\" \"{uproject_path}\" {map_path} -game -WINDOWED -ResX=1200 -ResY=800 -log"
}
},
"version": "0.0.0.3"
}

18 changes: 16 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ def initialize_ui(self):
self.detect_unreal_versions()
self.load_project_uproject_file()

self.setup_version_label()

def setup_version_label(self):
version_text = config.get("version")
self.version_label = tk.Label(self.root, text=f"Version: {version_text}", fg="grey")
self.version_label.pack(side=tk.TOP, fill=tk.X)


def has_uproject_file(self):
"""Checks if the project directory contains a .uproject file."""
Expand Down Expand Up @@ -246,8 +253,15 @@ def setup_main_page(self):
self.copy_command_button = Button(bottom_frame, text="Copy Command", command=self.copy_text_to_clipboard)
self.copy_command_button.pack(side=tk.LEFT, padx=5)

self.launch_button = Button(bottom_frame, text="Launch", state='disabled', command=self.launch_project)
self.launch_button.pack(side=tk.LEFT, padx=5)
# New bottom frame for the Launch button
launch_button_frame = tk.Frame(self.root) # Create the frame
launch_button_frame.pack(side=tk.BOTTOM, fill=tk.X)

# Configure the Launch button to fill the X-axis in its frame
self.launch_button = tk.Button(launch_button_frame, text="Launch", state='disabled', command=self.launch_project)
self.launch_button.pack(fill=tk.X, padx=10, pady=10)

version_label = tk.Label(bottom_frame, text=config.get("version"))


def copy_text_to_clipboard(self, event=None):
Expand Down

0 comments on commit c7f92ca

Please sign in to comment.