Beispiel #1
0
    def __init__(self, app, parent):
        self.name = "EXIT"
        self.app = app
        tk.Frame.__init__(self, parent, background=style.primary_color)

        self.usertext = themedLabel.ThemedLabel(self,
                                                text="Exit?",
                                                font=style.hugeboldtext,
                                                anchor="center",
                                                background=style.primary_color,
                                                foreground="white")
        self.usertext.place(relwidth=1,
                            relheight=1,
                            height=-(style.buttonsize + 2 * style.offset))

        self.yesnobuttonframe = tk.Frame(self,
                                         background=style.primary_color,
                                         borderwidth=0,
                                         highlightthickness=0)
        self.yesnobuttonframe.place(relx=0.5,
                                    rely=1,
                                    y=-(style.buttonsize + style.offset),
                                    width=300,
                                    x=-150,
                                    height=style.buttonsize)

        self.yesbutton = button.Button(self.yesnobuttonframe,
                                       callback=self.on_yes,
                                       text_string="Yes",
                                       background=style.secondary_color)
        self.yesbutton.place(relx=0.33, relwidth=0.34, relheight=1)
    def __init__(self, app, container, handler):
        categoryPage.CategoryPage.__init__(self, app, container, handler,
                                           "PLUGINS", handler.all)
        self.warning_acknowledged = False

        self.warningframe = themedFrame.ThemedFrame(self)
        self.warningframe.place(relwidth=1, relheight=1)
        self.warning_label = tk.Label(self.warningframe,
                                      text=WARNING,
                                      background=style.primary_color,
                                      font=style.smalltext,
                                      foreground=style.primary_text_color)
        self.warning_label.place(relx=0.5,
                                 rely=0.5,
                                 width=500,
                                 height=50,
                                 y=-25,
                                 x=-250)
        self.ack_button = button.Button(self.warningframe,
                                        self.ack,
                                        text_string="OK")
        self.ack_button.place(relx=0.5,
                              rely=0.5,
                              width=100,
                              height=30,
                              y=50,
                              x=-50)

        self.bind("<Configure>", self.configure)
Beispiel #3
0
    def __init__(self, parent):
        tk.Frame.__init__(self, parent, background=style.primary_color)
        self.yes_command = None
        self.follow_up = False

        self.usertext = scrollingWidgets.ScrolledText(
            self,
            font=style.hugeboldtext,
            wrap="word",
            padx=4 * style.offset,
            pady=4 * style.offset,
            background=style.primary_color,
            foreground="white")
        self.usertext.place(relwidth=1,
                            relheight=1,
                            height=-(style.buttonsize + 2 * style.offset))

        self.yesnobuttonframe = tk.Frame(self,
                                         background=style.primary_color,
                                         borderwidth=0,
                                         highlightthickness=0)
        self.yesnobuttonframe.place(relx=0.5,
                                    rely=1,
                                    y=-(style.buttonsize + style.offset),
                                    width=300,
                                    x=-150,
                                    height=style.buttonsize)

        self.yesbutton = button.Button(self.yesnobuttonframe,
                                       callback=self.on_yes,
                                       text_string="Yes",
                                       background=style.secondary_color)
        self.yesbutton.place(relx=0, relwidth=0.33, relheight=1)

        self.nobutton = button.Button(self.yesnobuttonframe,
                                      callback=self.on_no,
                                      text_string="No",
                                      background=style.secondary_color)
        self.nobutton.place(relx=0.67, relwidth=0.33, relheight=1)
Beispiel #4
0
	def __init__(self, app, container, plugin):
		basePage.BasePage.__init__(self, app, container, "UPDATER")
		self.plugin = plugin

		self.label = tk.Label(self, background = style.secondary_color, font = style.smalltext, foreground = style.primary_text_color)
		self.label.place(relx = 0.5, rely = 0.5, width = 500, height = 400, y = - 200, x = - 250)

		self.yesbutton = button.Button(self, callback=self.plugin.update,text_string="Yes",background=style.secondary_color)

		if self.plugin.has_update:
			self.label.configure(text = "An update is available, would you like to update Appstore Workbench?")
			self.yesbutton.place(relx=0.5,rely=0.5,y=100,width=100,x=-50,height=style.buttonsize)
		else:
			self.label.configure(text = "No update for Appstore Workbench found.")
Beispiel #5
0
    def __init__(self, app, container, plugin):
        basePage.BasePage.__init__(self, app, container, "Switch ~ DigiSE")
        self.plugin = plugin
        
        self.about_label = tk.Label(self, text = ABOUT, background = style.secondary_color, font = style.smalltext, foreground = "#888888")
        self.about_label.place(relwidth = 1, x = style.offset, width = - 2 * style.offset, rely = 0.5, height = 90, y = - 180)

        self.entry_label = tk.Label(self, text = "Save file path -", foreground = "white", background = style.secondary_color)
        self.entry_label.place(x = style.offset, width = LABELWIDTH, rely = 0.5, height = 20, y = - 70)
        self.entry_box = tk.Entry(self, foreground = "white", background = style.primary_color, justify = "center", font = style.mediumtext)
        self.entry_box.place(relwidth = 1, x = 2 * style.offset + LABELWIDTH, width = - (3 * style.offset + LABELWIDTH), rely = 0.5, height = 20, y = - 70)

        self.selected_save_edit_label = tk.Label(self, text = "Cheats -", foreground = "white", background = style.secondary_color)
        self.selected_save_edit_label.place(x = style.offset, width = LABELWIDTH, rely = 0.5, height = 20, y = - 40 )
        self.selected_save_edit = tk.StringVar()
        self.selected_save_edit.set(CHEATS[0])
        self.selected_save_edit_dropdown = tk.OptionMenu(self,self.selected_save_edit,*CHEATS)
        self.selected_save_edit_dropdown.configure(foreground = "white")
        self.selected_save_edit_dropdown.configure(background = style.primary_color)
        self.selected_save_edit_dropdown.configure(highlightthickness = 0)
        self.selected_save_edit_dropdown.configure(borderwidth = 0)
        self.selected_save_edit_dropdown.place(relwidth = 1, x = 2 * style.offset + LABELWIDTH, width = - (3 * style.offset + LABELWIDTH), rely = 0.5, height = 20, y = - 40)

        self.selected_game_label = tk.Label(self, text = "Game -", foreground = "white", background = style.secondary_color)
        self.selected_game_label.place(x = style.offset, width = LABELWIDTH, rely = 0.5, height = 20, y = - 10 )
        self.selected_game = tk.StringVar()
        self.selected_game.set(GAMES[0])
        self.selected_game_dropdown = tk.OptionMenu(self,self.selected_game,*GAMES)
        self.selected_game_dropdown.configure(foreground = "white")
        self.selected_game_dropdown.configure(background = style.primary_color)
        self.selected_game_dropdown.configure(highlightthickness = 0)
        self.selected_game_dropdown.configure(borderwidth = 0)
        self.selected_game_dropdown.place(relwidth = 1, x = 2 * style.offset + LABELWIDTH, width = - (3 * style.offset + LABELWIDTH), rely = 0.5, height = 20, y = - 10)

        self.run_button = button.Button(self, text_string = "run script", background = style.primary_color, callback = self.run)
        self.run_button.place(relwidth = 1, x = style.offset, width = - 2 * style.offset, rely = 0.5, height = 20, y = 20)

        self.console_label = tk.Label(self, text = "CONSOLE:", foreground = "white", background = style.secondary_color)
        self.console_label.place(relwidth = 1, x = - 0.5 * LABELWIDTH, width = LABELWIDTH, rely = 0.5, height = 20, y = 40 + style.offset)

        self.console = scrollingWidgets.ScrolledText(self, background = "black", foreground = "white")
        self.console.place(relwidth = 1, width = - (2 * style.offset), relheight = 0.5, height = - (2 * style.offset + 60), rely = 0.5, y = 60 + style.offset, x = + style.offset)
Beispiel #6
0
    def __init__(self, app, container, plugin):
        basePage.BasePage.__init__(self, app, container, "Switch ~ Edizip")
        self.plugin = plugin
        
        self.about_label = tk.Label(self, text = ABOUT, background = style.secondary_color, font = style.smalltext, foreground = style.primary_text_color)
        self.about_label.place(relwidth = 1, x = style.offset, width = - 2 * style.offset, rely = 0.5, height = 90, y = - 180)

        self.target_entry_label = tk.Label(self, text = "Target -", foreground = "white", background = style.secondary_color)
        self.target_entry_label.place(x = style.offset, width = LABELWIDTH, rely = 0.5, height = 20, y = - 100)
        self.target_entry_box = themedPathEntry.ThemedPathEntry(self, foreground = "white", background = style.primary_color, justify = "center", font = style.mediumtext)
        self.target_entry_box.place(relwidth = 1, x = 2 * style.offset + LABELWIDTH, width = - (3 * style.offset + LABELWIDTH), rely = 0.5, height = 20, y = - 100)

        self.target_output_entry_label = tk.Label(self, text = "Output (Optional) -", foreground = "white", background = style.secondary_color)
        self.target_output_entry_label.place(x = style.offset, width = LABELWIDTH, rely = 0.5, height = 20, y = - 70)
        self.target_output_entry_box = themedPathEntry.ThemedPathEntry(self, foreground = "white", background = style.primary_color, justify = "center", font = style.mediumtext)
        self.target_output_entry_box.place(relwidth = 1, x = 2 * style.offset + LABELWIDTH, width = - (3 * style.offset + LABELWIDTH), rely = 0.5, height = 20, y = - 70)

        self.tid_entry_label = tk.Label(self, text = "TitleID (Optional) -", foreground = "white", background = style.secondary_color)
        self.tid_entry_label.place(x = style.offset, width = LABELWIDTH, rely = 0.5, height = 20, y = - 40)
        self.tid_entry_box = tk.Entry(self, foreground = "white", background = style.primary_color, justify = "center", font = style.mediumtext)
        self.tid_entry_box.place(relwidth = 1, x = 2 * style.offset + LABELWIDTH, width = - (3 * style.offset + LABELWIDTH), rely = 0.5, height = 20, y = - 40)

        self.selected_option_label = tk.Label(self, text = "Mode -", foreground = "white", background = style.secondary_color)
        self.selected_option_label.place(x = style.offset, width = LABELWIDTH, rely = 0.5, height = 20, y = - 10 )
        self.selected_option = tk.StringVar()
        self.selected_option.set(OPTIONS[0])
        self.selected_option_dropdown = tk.OptionMenu(self,self.selected_option,*OPTIONS)
        self.selected_option_dropdown.configure(foreground = "white")
        self.selected_option_dropdown.configure(background = style.primary_color)
        self.selected_option_dropdown.configure(highlightthickness = 0)
        self.selected_option_dropdown.configure(borderwidth = 0)
        self.selected_option_dropdown.place(relwidth = 1, x = 2 * style.offset + LABELWIDTH, width = - (3 * style.offset + LABELWIDTH), rely = 0.5, height = 20, y = - 10)

        self.run_button = button.Button(self, text_string = "run script", background = style.primary_color, callback = self.run)
        self.run_button.place(relwidth = 1, x = style.offset, width = - 2 * style.offset, rely = 0.5, height = 20, y = 20)

        self.console_label = tk.Label(self, text = "CONSOLE:", foreground = "white", background = style.secondary_color)
        self.console_label.place(relwidth = 1, x = - 0.5 * LABELWIDTH, width = LABELWIDTH, rely = 0.5, height = 20, y = 40 + style.offset)

        self.console = scrollingWidgets.ScrolledText(self, background = "black", foreground = "white")
        self.console.place(relwidth = 1, width = - (2 * style.offset), relheight = 0.5, height = - (2 * style.offset + 60), rely = 0.5, y = 60 + style.offset, x = + style.offset)
Beispiel #7
0
    def __init__(self, frame):
        DetailPage.__init__(self, frame)
        self.place(relwidth=1, relheight=1)
        #since page is dynamic, need a trash can
        self.frame = frame
        self.destroyables = []

        #Want to reuse a lot of the page but need to do some cleanup
        self.column_downloads.destroy()
        self.column_title.destroy()
        self.column_author.destroy()
        self.column_version.destroy()
        self.column_license.destroy()
        self.column_package.destroy()
        self.column_downloads.destroy()
        self.column_updated.destroy()
        self.column_uninstall_button.destroy()
        self.column_install_button.destroy()
        self.details.destroy()

        self.body.place(relwidth=1,
                        relheight=1,
                        width=-2 * style.sidecolumnwidth)
        self.column.place(relx=1,
                          rely=0,
                          width=2 * style.sidecolumnwidth,
                          relheight=1,
                          x=-2 * style.sidecolumnwidth)

        #Move buttons to be pretty
        self.column_open_url_button.place(
            rely=1,
            relwidth=1,
            x=+2 * style.offset,
            y=-2 * (style.buttonsize + 2 * style.offset),
            width=-4 * style.offset,
            height=style.buttonsize)
        self.column_backbutton.place(rely=1,
                                     relx=1,
                                     x=-(style.buttonsize + style.offset),
                                     y=-(style.buttonsize + 2 * style.offset))

        self.text_boxes_frame = themedFrame.ThemedFrame(
            self.body, background=style.secondary_color)
        self.text_boxes_frame.place(relwidth=1,
                                    relheight=1 -
                                    style.details_page_image_fraction,
                                    rely=style.details_page_image_fraction,
                                    x=2 * style.offset,
                                    width=-4 * style.offset,
                                    y=+2 * style.offset,
                                    height=-4 * style.offset)

        description_label = themedLabel.ThemedLabel(
            self.text_boxes_frame,
            "Description:",
            anchor="w",
            font=style.smallboldtext,
            foreground=style.primary_text_color,
            background=style.secondary_color)
        description_label.place(relwidth=1, height=20)
        self.description = scrollingWidgets.ScrolledThemedText(
            self.text_boxes_frame,
            font=style.smalltext,
            foreground=style.detail_page_label_color)
        self.description.place(y=20, relwidth=1, height=20)

        details_label = themedLabel.ThemedLabel(
            self.text_boxes_frame,
            "Details:",
            anchor="w",
            font=style.smallboldtext,
            foreground=style.primary_text_color,
            background=style.secondary_color)
        details_label.place(y=40 + 2 * style.offset, relwidth=1, height=20)
        self.details = scrollingWidgets.ScrolledThemedText(
            self.text_boxes_frame,
            font=style.smalltext,
            foreground=style.detail_page_label_color)
        self.details.place(relheight=0.75,
                           y=60 + 2 * style.offset,
                           relwidth=1,
                           height=-(60 + 4 * style.offset))

        changes_label = themedLabel.ThemedLabel(
            self.text_boxes_frame,
            "Changelog:",
            anchor="w",
            font=style.smallboldtext,
            foreground=style.primary_text_color,
            background=style.secondary_color)
        changes_label.place(rely=0.75, relwidth=1, height=20)
        self.changes = scrollingWidgets.ScrolledThemedText(
            self.text_boxes_frame,
            font=style.smalltext,
            foreground=style.detail_page_label_color)
        self.changes.place(relheight=0.25,
                           rely=0.75,
                           relwidth=1,
                           y=+20,
                           height=-20)

        self.column_save_button = button.Button(
            self.column_body,
            callback=self.save_json,
            text_string="SAVE",
            font=style.mediumboldtext,
            background=style.secondary_color)
        self.column_save_button.place(
            rely=1,
            relwidth=1,
            x=+2 * style.offset,
            y=-(style.buttonsize + 2 * style.offset),
            width=-(4 * style.offset + style.buttonsize),
            height=style.buttonsize)

        self.editor_button = button.Button(self.column_body,
                                           callback=self.spawn_editor,
                                           text_string="ASSET EDITOR",
                                           font=style.mediumboldtext,
                                           background=style.secondary_color)
        self.editor_button.place(rely=1,
                                 relwidth=1,
                                 x=+2 * style.offset,
                                 y=-3 * (style.buttonsize + 2 * style.offset),
                                 width=-(4 * style.offset),
                                 height=style.buttonsize)
Beispiel #8
0
    def __init__(self, parent):
        themedFrame.ThemedFrame.__init__(self, parent)
        self.app = parent
        self.appstore_handler = None
        self.package_parser = None
        self.selected_version = None
        self.version_index = None
        self.package = None

        self.bind("<Configure>", self.on_configure)

        self.body = themedFrame.ThemedFrame(self,
                                            background=style.secondary_color)
        self.body.place(relwidth=1, relheight=1, width=-style.sidecolumnwidth)

        self.image_frame = themedFrame.ThemedFrame(
            self.body, background=style.secondary_color)
        self.image_frame.place(relwidth=1,
                               relheight=style.details_page_image_fraction,
                               x=+2 * style.offset,
                               width=-4 * style.offset,
                               y=+2 * style.offset,
                               height=-2 * style.offset)

        self.banner_image = themedLabel.ThemedLabel(
            self.image_frame,
            "",
            background=style.secondary_color,
            anchor="center",
            wraplength=None)
        self.banner_image.place(relwidth=1, relheight=1)

        self.details = scrollingWidgets.ScrolledThemedText(
            self.body,
            font=style.smalltext,
            foreground=style.detail_page_label_color)
        self.details.place(relwidth=1,
                           relheight=1 - style.details_page_image_fraction,
                           rely=style.details_page_image_fraction,
                           x=2 * style.offset,
                           width=-4 * style.offset,
                           y=+2 * style.offset,
                           height=-4 * style.offset)

        #RIGHT COLUMN
        self.column = themedFrame.ThemedFrame(self,
                                              background=style.primary_color)
        self.column.place(relx=1,
                          rely=0,
                          width=style.sidecolumnwidth,
                          relheight=1,
                          x=-style.sidecolumnwidth)

        self.column_body = themedFrame.ThemedFrame(
            self.column, background=style.primary_color)
        self.column_body.place(relwidth=1, relheight=1)

        self.column_title = themedLabel.ThemedLabel(
            self.column_body,
            "",
            anchor="w",
            font=style.smallboldtext,
            foreground=style.primary_text_color,
            background=style.primary_color)
        self.column_title.place(x=style.offset,
                                width=-style.offset,
                                rely=0,
                                relwidth=1,
                                height=style.detais_page_title_height)

        self.column_author = themedLabel.ThemedLabel(
            self.column_body,
            "",
            anchor="w",
            font=style.smalltext,
            foreground=style.detail_page_label_color,
            background=style.primary_color)
        self.column_author.place(
            x=style.offset,
            width=-style.offset,
            y=style.detais_page_title_height + style.details_item_y_multiplier,
            relwidth=1,
            height=0.333 * style.details_item_y_multiplier)

        self.column_version = themedLabel.ThemedLabel(
            self.column_body,
            "",
            anchor="w",
            font=style.smalltext,
            foreground=style.detail_page_label_color,
            background=style.primary_color)
        self.column_version.place(x=style.offset,
                                  width=-style.offset,
                                  y=style.detais_page_title_height +
                                  0.333 * style.details_item_y_multiplier,
                                  relwidth=1,
                                  height=0.333 *
                                  style.details_item_y_multiplier)

        self.column_license = themedLabel.ThemedLabel(
            self.column_body,
            "",
            anchor="w",
            font=style.smalltext,
            foreground=style.detail_page_label_color,
            background=style.primary_color)
        self.column_license.place(x=style.offset,
                                  width=-style.offset,
                                  y=style.detais_page_title_height +
                                  0.666 * style.details_item_y_multiplier,
                                  relwidth=1,
                                  height=0.333 *
                                  style.details_item_y_multiplier)

        self.column_package = themedLabel.ThemedLabel(
            self.column_body,
            "",
            anchor="w",
            font=style.smalltext,
            foreground=style.detail_page_label_color,
            background=style.primary_color)
        self.column_package.place(x=style.offset,
                                  width=-style.offset,
                                  y=style.detais_page_title_height +
                                  1.000 * style.details_item_y_multiplier,
                                  relwidth=1,
                                  height=0.333 *
                                  style.details_item_y_multiplier)

        self.column_downloads = themedLabel.ThemedLabel(
            self.column_body,
            "",
            anchor="w",
            font=style.smalltext,
            foreground=style.detail_page_label_color,
            background=style.primary_color)
        self.column_downloads.place(x=style.offset,
                                    width=-style.offset,
                                    y=style.detais_page_title_height +
                                    1.333 * style.details_item_y_multiplier,
                                    relwidth=1,
                                    height=0.333 *
                                    style.details_item_y_multiplier)

        self.column_updated = themedLabel.ThemedLabel(
            self.column_body,
            "",
            anchor="w",
            font=style.smalltext,
            foreground=style.detail_page_label_color,
            background=style.primary_color)
        self.column_updated.place(x=style.offset,
                                  width=-style.offset,
                                  y=style.detais_page_title_height +
                                  1.666 * style.details_item_y_multiplier,
                                  relwidth=1,
                                  height=0.333 *
                                  style.details_item_y_multiplier)

        # self.column_separator_top = ThemedLabel(self.column_body, "", background=style.lg)
        # self.column_separator_top.place(rely=1,relwidth = 1, x = + style.offset, y = - 3 * (style.buttonsize + style.offset) - 3 * style.offset - style.buttonsize - 1 - 0.5 * style.buttonsize, width = - 2 * style.offset, height = 1)

        # self.column_separator_bot = ThemedLabel(self.column_body, "", background=style.lg)
        # self.column_separator_bot.place(rely=1,relwidth = 1, x = + style.offset, y = - 3 * (style.buttonsize + style.offset) - style.offset - 1, width = - 2 * style.offset, height = 1)

        self.column_open_url_button = button.Button(
            self.column_body,
            callback=self.trigger_open_tab,
            text_string="VISIT PAGE",
            font=style.mediumboldtext,
            background=style.secondary_color,
        ).place(rely=1,
                relwidth=1,
                x=+2 * style.offset,
                y=-3 * (style.buttonsize + style.offset),
                width=-4 * style.offset,
                height=style.buttonsize)

        self.column_install_button = button.Button(
            self.column_body,
            callback=self.trigger_install,
            text_string="INSTALL",
            font=style.mediumboldtext,
            background=style.secondary_color)
        self.column_install_button.place(rely=1,
                                         relwidth=1,
                                         x=+2 * style.offset,
                                         y=-2 *
                                         (style.buttonsize + style.offset),
                                         width=-4 * style.offset,
                                         height=style.buttonsize)

        self.column_uninstall_button = button.Button(
            self.column_body,
            callback=self.trigger_uninstall,
            text_string="UNINSTALL",
            font=style.mediumboldtext,
            background=style.secondary_color)

        self.back_image = ImageTk.PhotoImage(
            Image.open("gui/assets/return.png").resize(
                (style.buttonsize, style.buttonsize), Image.ANTIALIAS))
        self.column_backbutton = button.Button(self.column_body,
                                               image_object=self.back_image,
                                               callback=self.leave,
                                               background=style.primary_color)
        self.column_backbutton.place(rely=1,
                                     relx=1,
                                     x=-(style.buttonsize + style.offset),
                                     y=-(style.buttonsize + style.offset))

        self.progress_bar = progressFrame.ProgressFrame(self)

        self.yesnoPage = YesNoPage(self)