Untitled

 avatar
unknown
plain_text
5 months ago
1.5 kB
4
Indexable
class SettingsOverlay(ctk.CTkFrame):
    def __init__(self, master, close_callback):
        super().__init__(master, width=800, height=600)
        self.grid_propagate(False)  # Fixed frame size
        self.place(relx=0.5, rely=0.5, anchor="center")  # Center the overlay on the screen
        self.configure(fg_color="gray15")  # Dark background for the settings menu

        # Title label
        self.label = ctk.CTkLabel(self, text="Settings", font=("Arial", 24), text_color="white")
        self.label.grid(row=0, column=0, padx=20, pady=20, sticky="w")

        # Close button
        self.close_button = ctk.CTkButton(self, text="Close", command=close_callback, fg_color="#333333")
        self.close_button.grid(row=0, column=1, padx=20, pady=20, sticky="e")

        # Example buttons for settings sections
        self.display_button = ctk.CTkButton(self, text="Display Settings", fg_color="gray25")
        self.display_button.grid(row=1, column=0, padx=20, pady=20, sticky="w")

        self.sound_button = ctk.CTkButton(self, text="Sound Settings", fg_color="gray25")
        self.sound_button.grid(row=2, column=0, padx=20, pady=20, sticky="w")

        self.network_button = ctk.CTkButton(self, text="Network Settings", fg_color="gray25")
        self.network_button.grid(row=3, column=0, padx=20, pady=20, sticky="w")

        self.system_button = ctk.CTkButton(self, text="System Settings", fg_color="gray25")
        self.system_button.grid(row=4, column=0, padx=20, pady=20, sticky="w")
Editor is loading...
Leave a Comment