Esempio n. 1
0
    def __init__(self, parent):
        super().__init__(parent)
        self.layout = fsui.VerticalLayout()

        header = WizardHeader(self, fsui.Icon("fs-uae-launcher",
                                              "pkg:launcher"), "Welcome")
        self.layout.add(header, fill=True, margin_bottom=20)

        v_layout = fsui.VerticalLayout()
        self.layout.add(v_layout, margin=20)

        label = fsui.MultiLineLabel(
            self,
            gettext("Welcome to the setup wizard for FS-UAE Launcher!"),
            SetupWizardPage.WIDTH,
        )
        v_layout.add(label, fill=True, margin_top=0)

        label = fsui.MultiLineLabel(
            self,
            gettext(
                "You can close this wizard at any time if you do not want to "
                "use it, and you can also run it again later."),
            SetupWizardPage.WIDTH,
        )
        v_layout.add(label, fill=True, margin_top=20)
Esempio n. 2
0
    def __init__(self, parent=None):
        title = gettext("Log Out from Your OAGD.net Account")
        super().__init__(parent, title, minimizable=False, maximizable=False)
        self.set_icon(fsui.Icon("password", "pkg:workspace"))

        self.layout = fsui.VerticalLayout()
        self.layout.set_padding(20, 20, 20, 20)

        heading_layout = fsui.HorizontalLayout()
        self.layout.add(heading_layout)
        heading_layout.add(fsui.ImageView(
            self, fsui.Image("workspace:res/48/password.png")))
        heading_layout.add_spacer(20)
        heading_layout_2 = fsui.VerticalLayout()
        heading_layout.add(
            heading_layout_2, expand=True, fill=False, valign=0.5)
        heading_layout_2.add(fsui.HeadingLabel(
            self, gettext("Log Out from Your OAGD.net Account")))
        heading_layout_2.add_spacer(2)
        heading_layout_2.add(fsui.Label(
            self, gettext("While logged out you will not get "
                          "database updates")))

        self.layout.add_spacer(20)
        hori_layout = fsui.HorizontalLayout()
        self.layout.add(hori_layout, fill=True)
        self.created_label = fsui.Label(self, "")
        hori_layout.add(self.created_label, expand=True)
        hori_layout.add_spacer(20)

        self.logout_button = fsui.Button(self, gettext("Log Out"))
        # self.logout_button.disable()
        self.logout_button.activated.connect(self.on_logout_activated)
        hori_layout.add(self.logout_button)
    def __init__(self, parent):
        fsui.Group.__init__(self, parent)

        self.layout = fsui.VerticalLayout()
        label = fsui.HeadingLabel(self,
                                  gettext("Available Kickstart Versions"))
        self.layout.add(label, margin_bottom=10)

        icon_layout = fsui.HorizontalLayout()
        self.layout.add(icon_layout, fill=True)

        icon_layout.add_spacer(20)
        image = fsui.Image("launcher:/data/kickstart.png")
        self.image_view = fsui.ImageView(self, image)
        icon_layout.add(self.image_view, valign=0.0, margin_right=10)

        vert_layout = fsui.VerticalLayout()
        icon_layout.add(vert_layout, fill=True, expand=True)

        vert_layout.add_spacer(0)

        label = fsui.Label(
            self,
            gettext("You should have kickstart files for "
                    "each Amiga model you want to use:"),
        )
        vert_layout.add(label, margin_bottom=0)

        hori_layout = fsui.HorizontalLayout()
        vert_layout.add(hori_layout, fill=True)

        self.kickstart_groups = []

        column_layout = fsui.VerticalLayout()
        hori_layout.add(column_layout, expand=True, fill=True, margin=10)

        self.add_kickstart_group(column_layout, "Amiga 1000", "A1000")
        column_layout.add_spacer(10)
        self.add_kickstart_group(column_layout, "Amiga 500", "A500")
        column_layout.add_spacer(10)
        self.add_kickstart_group(column_layout, "Amiga 500+", "A500+")

        column_layout = fsui.VerticalLayout()
        hori_layout.add(column_layout, expand=True, fill=True, margin=10)

        self.add_kickstart_group(column_layout, "Amiga 600", "A600")
        column_layout.add_spacer(10)
        self.add_kickstart_group(column_layout, "Amiga 1200", "A1200")
        column_layout.add_spacer(10)
        self.add_kickstart_group(column_layout, "Amiga 3000", "A3000")

        column_layout = fsui.VerticalLayout()
        hori_layout.add(column_layout, expand=True, fill=True, margin=10)

        self.add_kickstart_group(column_layout, "Amiga 4000", "A4000/040")
        column_layout.add_spacer(10)
        self.add_kickstart_group(column_layout, "Amiga CD32", "CD32")
        column_layout.add_spacer(10)
        self.add_kickstart_group(column_layout, "Commodore CDTV", "CDTV")
Esempio n. 4
0
    def __init__(self, parent, title, task, *, gscontext):
        print("LaunchDialog parent =", parent)
        self.gscontext = gscontext

        self.has_parent = parent is not None
        self.no_gui = "--no-gui" in sys.argv
        super().__init__(parent, title, maximizable=False)
        self.layout = fsui.VerticalLayout()

        self.layout.add_spacer(400, 20)

        hor_layout = fsui.HorizontalLayout()
        self.layout.add(hor_layout, fill=True)

        hor_layout.padding_right = 20
        hor_layout.add_spacer(20)

        image = fsui.Image("launcher:/data/fs_uae_group.png")
        self.image_view = fsui.ImageView(self, image)
        hor_layout.add(self.image_view, valign=0.0)
        hor_layout.add_spacer(20)

        ver_layout = fsui.VerticalLayout()
        hor_layout.add(ver_layout, fill=True, expand=True)
        self.title_label = fsui.HeadingLabel(self, title)
        ver_layout.add(self.title_label, fill=True)

        ver_layout.add_spacer(6)
        self.sub_title_label = fsui.Label(self, gettext("Preparing..."))
        ver_layout.add(self.sub_title_label, fill=True)

        self.layout.add_spacer(20)

        hor_layout = fsui.HorizontalLayout()
        self.layout.add(hor_layout, fill=True)

        hor_layout.add_spacer(20, expand=True)
        self.cancel_button = fsui.Button(self, gettext("Cancel"))
        self.cancel_button.activated.connect(self.on_cancel_button)
        hor_layout.add(self.cancel_button)
        hor_layout.add_spacer(20)

        self.layout.add_spacer(20)
        self.set_size(self.layout.get_min_size())
        self.center_on_parent()

        self.was_closed = False
        self.task = task
        self.task.progressed.connect(self.on_progress)
        self.task.finished.connect(self.on_complete)
        self.task.failed.connect(self.on_error)

        self.closed.connect(self.__closed)
Esempio n. 5
0
    def __init__(
        self,
        parent,
        icon: fsui.Icon,
        title,
        subtitle="",
        icon_position=ICON_LEFT,
    ):
        Group.__init__(self, parent)
        self.layout = fsui.HorizontalLayout()

        image = icon.image(48)
        self.image_view = fsui.ImageView(self, image)
        if icon_position == self.ICON_LEFT:
            self.layout.add(self.image_view)
            self.layout.add_spacer(20)
        vert_layout = fsui.VerticalLayout()
        self.layout.add(vert_layout, expand=True, fill=False, valign=0.5)
        self.title_label = fsui.HeadingLabel(self, title)
        vert_layout.add(self.title_label)
        vert_layout.add_spacer(2)
        self.subtitle_label = fsui.Label(self, subtitle)
        vert_layout.add(self.subtitle_label, fill=True)
        if icon_position == self.ICON_RIGHT:
            self.layout.add_spacer(20)
            self.layout.add(self.image_view)
Esempio n. 6
0
 def __init__(self, parent, gsc):
     super().__init__(parent)
     self.layout = fsui.VerticalLayout()
     self.hori_layout = fsui.HorizontalLayout()
     self.layout.add(self.hori_layout, fill=True, expand=True)
     self.progress_label = fsui.Label(self, "")
     self.progress_label.set_visible(False)
     self.hori_layout.add(self.progress_label, fill=True, expand=True)
     # self.progress_2_label = fsui.Label(self, "")
     # self.progress_2_label.set_visible(False)
     # self.hori_layout.add(self.progress_2_label, fill=True, expand=True)
     self.fullscreen_mode_button = FullscreenModeButton(self)
     self.hori_layout.add(
         self.fullscreen_mode_button, fill=True, margin_right=10)
     self.monitor_button = MonitorButton(self)
     self.hori_layout.add(
         self.monitor_button, fill=True, margin_right=10)
     self.screen_info_label = ScreenInfoLabel(self)
     self.hori_layout.add(self.screen_info_label, fill=True,
                          expand=True, margin_right=10)
     self.video_sync_checkbox = VideoSyncCheckBox(self)
     self.hori_layout.add(self.video_sync_checkbox, margin_right=10)
     self.override_warning = OverrideWarning(self, Option.FULLSCREEN)
     self.hori_layout.add(self.override_warning, margin_right=10)
     self.fullscreen_button = FullscreenToggleButton(self)
     self.hori_layout.add(self.fullscreen_button, fill=True)
     start_button = StartButton(self, gsc)
     self.hori_layout.add(start_button, fill=True, margin_left=10)
     # ConfigBehavior(self, [Option.FULLSCREEN])
     gsc.config.add_behavior(
         self, [Option.FULLSCREEN, "__running", "__progress"])
Esempio n. 7
0
    def __init__(self):
        fsui.LegacyDialog.__init__(self, None, "Create/Join Game")
        self.layout = fsui.VerticalLayout()

        self.layout.add_spacer(20)

        hor_layout = fsui.HorizontalLayout()
        self.layout.add(hor_layout, fill=True)

        hor_layout.add_spacer(20)
        self.text = fsui.TextField(self)
        self.text.activated.connect(self.on_ok_button)
        hor_layout.add(self.text, expand=True)
        hor_layout.add_spacer(20)

        self.layout.add_spacer(20)

        hor_layout = fsui.HorizontalLayout()
        self.layout.add(hor_layout, fill=True)

        hor_layout.add_spacer(20, expand=True)
        self.cancel_button = fsui.Button(self, "    Cancel    ")
        self.cancel_button.activated.connect(self.on_cancel_button)
        hor_layout.add(self.cancel_button)
        hor_layout.add_spacer(10)
        self.ok_button = fsui.Button(self, "    Create/Join    ")
        self.ok_button.activated.connect(self.on_ok_button)
        hor_layout.add(self.ok_button)
        hor_layout.add_spacer(20)

        self.layout.add_spacer(20)
        self.set_size(self.layout.get_min_size())

        self.text.focus()
    def __init__(self, parent):
        title = gettext("About {name}").format(name="FS-UAE Launcher")
        title = "{} - FS-UAE Launcher".format(gettext("About"))
        super().__init__(parent, title, minimizable=False, maximizable=False)
        # buttons, layout = fsui.DialogButtons.create_with_layout(self)
        # buttons.create_close_button()
        self.layout = fsui.VerticalLayout()
        self.layout.set_padding(20)
        layout = self.layout

        self.icon_header = IconHeader(
            self, fsui.Icon("fs-uae-launcher", "pkg:launcher"),
            "{name} {version}".format(name="FS-UAE Launcher",
                                      version=app.version),
            "Copyright © 2012-2015 Frode Solheim")
        layout.add(self.icon_header, fill=True, margin_bottom=20)

        self.text_area = fsui.TextArea(self,
                                       about_message,
                                       read_only=True,
                                       font_family="monospace")
        self.text_area.scroll_to_start()
        self.text_area.set_min_width(760)
        self.text_area.set_min_height(340)
        layout.add(self.text_area, fill=True, expand=True)
Esempio n. 9
0
    def __init__(self, parent):
        fsui.Panel.__init__(self, parent)
        self.layout = fsui.VerticalLayout()

        self.page_titles = []
        self.pages = []
        self.current_page = None
Esempio n. 10
0
    def __init__(self, parent, new_button=True):
        super().__init__(parent)
        self.layout = fsui.VerticalLayout()
        hori_layout = fsui.HorizontalLayout()
        self.layout.add(hori_layout, fill=True)
        if new_button:
            label_stand_in = fsui.Panel(self)
            _, th = label_stand_in.measure_text(gettext("Configuration"))
            label_stand_in.set_min_height(th)
            hori_layout.add(label_stand_in, margin_top=10, margin_bottom=10)

            hori_layout.add(NewConfigButton(self),
                            margin_left=10,
                            margin_right=10)
        self.config_name_field = fsui.TextField(self)
        hori_layout.add(
            self.config_name_field,
            expand=True,
            margin=10,
            margin_top=0,
            margin_bottom=0,
        )
        hori_layout.add(SaveButton(self), margin_left=10, margin_right=10)
        self.config_name_field.on_changed = self.on_config_name_changed
        SettingsBehavior(self, ["config_name"])
Esempio n. 11
0
    def __init__(self, parent):
        if fsgs.product == "OpenRetro":
            app_name = "OpenRetro Launcher"
        else:
            app_name = "FS-UAE Launcher"
        title = "{} - {}".format(gettext("About"), app_name)
        super().__init__(parent, title, minimizable=False, maximizable=False)
        self.theme = LauncherTheme.get()
        self.layout = fsui.VerticalLayout()
        self.layout.set_padding(20)

        self.icon_header = IconHeader(
            self,
            fsui.Icon("fs-uae-launcher", "pkg:launcher"),
            "{name} {version}".format(name=app_name, version=app.version),
            "Copyright © 2012-2017 Frode Solheim",
        )
        self.layout.add(self.icon_header, fill=True, margin_bottom=20)

        self.text_area = fsui.TextArea(self,
                                       about_message,
                                       read_only=True,
                                       font_family="monospace")
        self.text_area.scroll_to_start()
        self.text_area.set_min_width(760)
        self.text_area.set_min_height(340)
        self.layout.add(self.text_area, fill=True, expand=True)

        CloseButton.add_to_layout(self, self.layout, margin_top=20)
Esempio n. 12
0
    def __init__(self, parent):
        fsui.LegacyDialog.__init__(self, parent, "Choose Game")
        self.info = {}
        self.layout = fsui.VerticalLayout(padding=20)
        self.text = fsui.TextField(self)
        self.text.on_changed = self.on_text
        self.layout.add(self.text, fill=True)
        self.layout.add_spacer(20)
        self.view = GameListView(self)
        self.view.set_game_info = self.set_game_info
        self.view.set_min_width(600)
        self.view.set_min_height(300)
        self.layout.add(self.view, expand=True, fill=True)
        self.layout.add_spacer(20)

        self.link_field = fsui.TextField(self)
        self.layout.add(self.link_field, fill=True)
        self.layout.add_spacer(20)

        hlayout = fsui.HorizontalLayout()
        self.layout.add(hlayout, fill=True)
        hlayout.add_spacer(0, expand=True)
        self.cancel_button = fsui.Button(self, gettext("Cancel"))
        self.cancel_button.activated.connect(self.on_cancel_button)
        hlayout.add(self.cancel_button)
        hlayout.add_spacer(10)
        self.ok_button = fsui.Button(self, gettext("OK"))
        self.ok_button.activated.connect(self.on_ok_button)
        hlayout.add(self.ok_button)

        self.text.focus()
        self.set_size(self.layout.get_min_size())
        self.center_on_parent()
Esempio n. 13
0
    def __init__(self, parent, path, import_type):
        if import_type == self.AMIGA_FOREVER:
            title = gettext("Import From Amiga Forever CD/DVD")
        else:
            title = gettext("Import Kickstarts and ROMs")
        super().__init__(parent, title, maximizable=False)
        self.layout = fsui.VerticalLayout()
        self.layout.padding_left = 20
        self.layout.padding_top = 20
        self.layout.padding_right = 20
        self.layout.padding_bottom = 20

        self.text_area = fsui.TextArea(self, read_only=True)
        self.text_area.set_min_width(600)
        self.text_area.set_min_height(300)
        self.layout.add(self.text_area)

        hori_layout = fsui.HorizontalLayout()
        self.layout.add(hori_layout, fill=True, margin_top=20)
        hori_layout.add_spacer(0, expand=True)
        self.close_button = fsui.Button(self, gettext("Close"))
        self.close_button.activated.connect(self.on_close_button)
        self.close_button.disable()
        hori_layout.add(self.close_button)

        self.line_count = 0
        self.task = ImportTask(path, import_type)
        self.task.start()

        self.set_size(self.layout.get_min_size())
        self.center_on_parent()
        fsui.call_later(TIMER_INTERVAL, self.on_timer)
    def __init__(self, parent, path, import_type):
        if import_type == self.AMIGA_FOREVER:
            title = gettext("Import From Amiga Forever CD/DVD")
        else:
            title = gettext("Import Kickstarts and ROMs")
        super().__init__(parent, title, maximizable=False)
        self.theme = LauncherTheme.get()
        self.layout = fsui.VerticalLayout()
        self.layout.padding_left = 20
        self.layout.padding_top = 20
        self.layout.padding_right = 20
        self.layout.padding_bottom = 20

        self.text_area = fsui.TextArea(self, read_only=True)
        self.text_area.set_min_width(600)
        self.text_area.set_min_height(300)
        self.layout.add(self.text_area)

        self.close_button = CloseButton.add_to_layout(self,
                                                      self.layout,
                                                      margin_top=20)
        if self.close_button:
            self.close_button.set_enabled(False)

        self.line_count = 0
        self.task = ImportTask(path, import_type)
        self.task.start()

        self.set_size(self.layout.get_min_size())
        self.center_on_parent()
        fsui.call_later(TIMER_INTERVAL, self.on_timer)
Esempio n. 15
0
    def __init__(self, parent, title="", maximizable=True):
        if isinstance(parent, Application):
            parent.add_window(self)
            # parent = None
        self.__border = WindowBorder(None, title, self)
        super().__init__(self.__border)
        self.set_background_color(fsui.Color(0xF2, 0xF2, 0xF2))

        self.layout = fsui.VerticalLayout()
        self.__title_layout = fsui.HorizontalLayout()
        self.layout.add(self.__title_layout, fill=True)

        self.__menu_button = WindowMenuButton(self)
        self.__title_layout.add(self.__menu_button)

        self.__title_panel = WindowTitlePanel(self)
        self.__title_layout.add(self.__title_panel, expand=True)

        self.__minimize_button = WindowMinimizeButton(self)
        self.__title_layout.add(self.__minimize_button)

        self._maximize_button = WindowMaximizeButton(self)
        self.__title_layout.add(self._maximize_button)
        if not maximizable:
            print("hiding")
            self._maximize_button.hide()

        self.__close_button = WindowCloseButton(self)
        self.__title_layout.add(self.__close_button)

        self.__content_added = False
        self.__menu = None
Esempio n. 16
0
    def __init__(self, parent):
        fsui.Panel.__init__(self, parent)
        self.layout = fsui.VerticalLayout()

        label = fsui.MultiLineLabel(
            self,
            gettext(
                "You can write key = value pairs here to set FS-UAE options "
                "not currently supported by the user interface. This is only a "
                "temporary feature until the GUI supports all options "
                "directly."), 760)
        self.layout.add(label, fill=True, margin_bottom=10)
        label = fsui.MultiLineLabel(
            self,
            gettext(
                "The options specified here will apply to this configuration "
                "only."), 760)
        self.layout.add(label, fill=True, margin_bottom=10)

        hor_layout = fsui.HorizontalLayout()
        self.layout.add(hor_layout, fill=True, expand=True)

        # hor_layout.add_spacer(20)
        self.text_area = fsui.TextArea(self, font_family="monospace")
        self.text_area.set_min_width(760)
        self.text_area.set_min_height(400)
        self.text_area.set_text(initial_text())
        hor_layout.add(self.text_area, fill=True, expand=True)
        # hor_layout.add_spacer(20)

        # self.layout.add_spacer(20)

        self.get_window().add_close_listener(self.on_close_window)
 def __init__(self, parent):
     super().__init__(parent, gettext("Import Kickstarts"))
     self.theme = LauncherTheme.get()
     self.layout = fsui.VerticalLayout(padding=20)
     self.panel = SetupPanel(self)
     self.panel.set_min_width(620)
     self.layout.add(self.panel)
Esempio n. 18
0
    def __init__(self, parent, task):
        fsui.Window.__init__(
            self, parent, task.get_task_name())
        self.set_icon(fsui.Icon("tools", "pkg:workspace"))

        self.layout = fsui.VerticalLayout()
        self.layout.min_width = 500
        self.layout.set_padding(20, 20, 20, 20)

        self.icon_header = IconHeader(
            self, fsui.Icon("tools", "pkg:workspace"),
            task.get_task_name(), "")
        self.layout.add(self.icon_header, fill=True, margin_bottom=20)

        hori_layout = fsui.HorizontalLayout()
        self.layout.add(hori_layout, fill=True)
        self.created_label = fsui.Label(self, "")
        hori_layout.add(self.created_label, expand=True)
        hori_layout.add_spacer(20)
        self.abort_button = fsui.Button(self, gettext("Stop"))
        self.abort_button.activated.connect(self.on_abort_activated)
        hori_layout.add(self.abort_button)

        self.set_size(self.layout.get_min_size())
        self.center_on_parent()

        self.task = task
        self.task.progressed.connect(self.on_progress)
        self.task.failed.connect(self.on_failure)
        self.task.succeeded.connect(self.close)
        self.task.stopped.connect(self.close)
        self.task.start()
Esempio n. 19
0
    def __init__(self, parent=None):
        print("RefreshWindow parent =", parent)
        title = gettext("Updating Database")
        super().__init__(parent, title, maximizable=False)
        self.set_icon(fsui.Icon("refresh", "pkg:workspace"))

        self.layout = fsui.VerticalLayout()
        self.layout.min_width = 500
        self.layout.set_padding(20, 20, 20, 20)

        self.icon_header = IconHeader(self,
                                      fsui.Icon("refresh", "pkg:workspace"),
                                      gettext("Updating Database"), "")
        self.layout.add(self.icon_header, fill=True, margin_bottom=20)

        hori_layout = fsui.HorizontalLayout()
        self.layout.add(hori_layout, fill=True)
        self.created_label = fsui.Label(self, "")
        hori_layout.add(self.created_label, expand=True)
        hori_layout.add_spacer(20)
        self.stop_button = fsui.Button(self, gettext("Stop"))
        self.stop_button.activated.connect(self.on_abort_activated)
        hori_layout.add(self.stop_button)

        self.set_size(self.layout.get_min_size())
        self.center_on_parent()

        self.task = DatabaseRefreshTask()
        self.task.progressed.connect(self.on_progress)
        self.task.failed.connect(self.on_failure)
        self.task.succeeded.connect(self.close)
        self.task.stopped.connect(self.close)
        self.task.start()
    def __init__(self, parent):
        fsui.Group.__init__(self, parent)
        self.layout = fsui.HorizontalLayout()
        # self.layout.padding_left = 10
        # self.layout.padding_right = 10

        # image = fsui.Image("launcher:res/joystick.png")
        # self.image_view = fsui.ImageView(self, image)
        # self.layout.add(self.image_view, valign=0.0)

        # self.layout.add_spacer(20)

        self.layout2 = fsui.VerticalLayout()
        self.layout.add(self.layout2, fill=True, expand=True)

        heading = gettext("Preferred Controllers")
        label = fsui.HeadingLabel(self, heading)
        self.layout2.add(label)

        self.layout2.add_spacer(20)
        label = fsui.Label(self, gettext("Preferred controller (if present):"))
        self.layout2.add(label)

        self.layout2.add_spacer(6)
        selector = PreferredJoystickSelector(self, 0)
        self.layout2.add(selector, fill=True)

        self.layout2.add_spacer(20)
        label = fsui.Label(
            self, gettext("Preferred device for secondary controller:"))
        self.layout2.add(label)

        self.layout2.add_spacer(6)
        selector = PreferredJoystickSelector(self, 1)
        self.layout2.add(selector, fill=True)
Esempio n. 21
0
 def __init__(self, parent):
     fsui.Panel.__init__(self, parent)
     Skin.set_background_color(self)
     self.layout = fsui.VerticalLayout()
     self.floppies_group = FloppiesGroup(self, 4)
     self.layout.add(self.floppies_group, fill=True)
     self.media_list_group = MediaListGroup(self, False)
     self.layout.add(self.media_list_group, expand=True, fill=True)
Esempio n. 22
0
    def __init__(self, parent=None):
        title = gettext("Log Out from Your OpenRetro Account")
        super().__init__(parent, title, minimizable=False, maximizable=False)
        self.theme = WorkspaceTheme.instance()
        self.layout = fsui.VerticalLayout()
        self.set_icon(fsui.Icon("password", "pkg:workspace"))

        self.layout.set_padding(20, 20, 20, 20)

        heading_layout = fsui.HorizontalLayout()
        self.layout.add(heading_layout)
        heading_layout.add(
            fsui.ImageView(self,
                           fsui.Image("workspace:/data/48/password.png")))
        heading_layout.add_spacer(20)
        heading_layout_2 = fsui.VerticalLayout()
        heading_layout.add(heading_layout_2,
                           expand=True,
                           fill=False,
                           valign=0.5)
        heading_layout_2.add(
            fsui.HeadingLabel(self,
                              gettext("Log Out from Your OpenRetro Account")))
        heading_layout_2.add_spacer(2)
        heading_layout_2.add(
            fsui.Label(
                self,
                gettext("While logged out you will not get "
                        "database updates"),
            ))

        self.layout.add_spacer(20)
        hori_layout = fsui.HorizontalLayout()
        self.layout.add(hori_layout, fill=True)
        self.created_label = fsui.Label(self, "")
        hori_layout.add(self.created_label, expand=True)
        hori_layout.add_spacer(20)

        self.logout_button = fsui.Button(self, gettext("Log Out"))
        # self.logout_button.set_enabled(False)
        self.logout_button.activated.connect(self.__logout_activated)
        hori_layout.add(self.logout_button)

        if self.window().theme.has_close_buttons:
            self.close_button = CloseButton(self)
            hori_layout.add(self.close_button, fill=True, margin_left=10)
Esempio n. 23
0
 def __init__(self, parent):
     super().__init__(parent, gettext("Import Kickstarts"))
     self.layout = fsui.VerticalLayout(padding=20)
     # buttons, layout = fsui.DialogButtons.create_with_layout(self)
     # buttons.create_close_button()
     self.panel = SetupPanel(self)
     self.panel.set_min_width(620)
     self.layout.add(self.panel)
    def __init__(self, parent, import_type=0):
        fsui.Group.__init__(self, parent)
        self.type = import_type
        self.path = ""

        self.layout = fsui.VerticalLayout()
        if self.type == self.AMIGA_FOREVER:
            title = gettext("Import From Amiga Forever CD/DVD")
        else:
            title = gettext("Import Kickstarts and ROMs")
        label = fsui.HeadingLabel(self, title)
        self.layout.add(label, margin_bottom=10)

        icon_layout = fsui.HorizontalLayout()
        self.layout.add(icon_layout, fill=True)
        icon_layout.add_spacer(20)
        if self.type == self.AMIGA_FOREVER:
            image = fsui.Image("launcher:/data/amiga_forever_group.png")
        else:
            image = fsui.Image("launcher:/data/kickstart.png")
        self.image_view = fsui.ImageView(self, image)
        icon_layout.add(self.image_view, valign=0.0, margin_right=10)

        vert_layout = fsui.VerticalLayout()
        icon_layout.add(vert_layout, fill=True, expand=True)

        if self.type == self.AMIGA_FOREVER:
            text = gettext("If you own Amiga Forever, select the drive/folder "
                           'and click "{0}"').format(gettext("Import"))
        else:
            text = gettext("Select a folder containing Amiga kickstart files "
                           'and click "{0}"').format(gettext("Import"))
        label = fsui.Label(self, text)
        vert_layout.add(label, margin_bottom=10)

        hori_layout = fsui.HorizontalLayout()
        vert_layout.add(hori_layout, fill=True, margin=0)
        self.text_field = fsui.TextField(self, "", read_only=True)
        hori_layout.add(self.text_field, expand=True)
        self.browse_button = fsui.Button(self, gettext("Browse"))
        self.browse_button.activated.connect(self.on_browse)
        hori_layout.add(self.browse_button, margin_left=10)
        self.import_button = fsui.Button(self, gettext("Import"))
        self.import_button.activated.connect(self.on_import)
        self.import_button.set_enabled(False)
        hori_layout.add(self.import_button, margin_left=10)
Esempio n. 25
0
    def __init__(self, parent, path):
        unused(path)
        fsui.Window.__init__(self, parent, gettext("Checksumming"))
        self.layout = fsui.VerticalLayout()

        label = fsui.HeadingLabel(self, gettext("Checksumming file..."))
        self.layout.add(label, fill=True)
        self.layout.add_spacer(6)
Esempio n. 26
0
    def __init__(self, parent=None):
        super().__init__(parent,
                         "{} - FS-UAE Launcher".format(gettext("Net Play")))
        self.layout = fsui.VerticalLayout()
        self.panel = NetplayPanel(self, header=False)
        self.layout.add(self.panel, expand=True, fill=True)

        self.panel.set_min_size((800, 500))
        self.panel.on_show()
Esempio n. 27
0
 def __init__(self, parent):
     super().__init__(parent)
     self.layout = fsui.VerticalLayout()
     self.layout.padding_top = 20
     self.layout.padding_bottom = 20
     self.layout.padding_left = 20
     self.layout.padding_right = 20
     self.icon_header = None
     self.options_on_page = set()
Esempio n. 28
0
 def __init__(self, parent):
     title = gettext("Custom Configuration")
     super().__init__(parent, title=title, minimizable=False,
                      maximizable=False)
     self.layout = fsui.VerticalLayout()
     self.layout.set_padding(20)
     # buttons, layout = fsui.DialogButtons.create_with_layout(self)
     # buttons.create_close_button()
     self.layout.add(CustomOptionsPage(self), fill=True, expand=True)
Esempio n. 29
0
    def __init__(
        self,
        parent,
        title="",
        menu=False,
        minimizable=True,
        maximizable=True,
        separator=True,
        closable=True,
        background=None,
    ):
        super().__init__(parent)

        if background is None:
            background = (0xFF, 0xFF, 0xFF)
        background_color = fsui.Color(background)
        if background_color.to_hsl().l >= 0.6:
            self.foreground_color = (0x00, 0x00, 0x00)
        else:
            self.foreground_color = (0xFF, 0xFF, 0xFF)
        self.background_color = background_color
        self.set_background_color(background_color)

        self.set_normal_cursor()

        self.layout = fsui.VerticalLayout()
        hor_layout = fsui.HorizontalLayout()
        self.layout.add(hor_layout, fill=True)

        self.menu_button = WindowMenuButton(self)
        hor_layout.add(self.menu_button)
        if not menu:
            self.menu_button.hide()
            hor_layout.add_spacer(20 - TEXT_SPACING)

        self.title_panel = WindowTitlePanel(self)
        hor_layout.add(self.title_panel, expand=True)

        self.minimize_button = WindowMinimizeButton(self)
        hor_layout.add(self.minimize_button)
        if not minimizable:
            self.minimize_button.hide()

        self.maximize_button = WindowMaximizeButton(self)
        hor_layout.add(self.maximize_button)
        if not maximizable:
            self.maximize_button.hide()

        self.close_button = WindowCloseButton(self)
        hor_layout.add(self.close_button)
        if not closable:
            self.close_button.hide()

        if separator:
            self.separator = TitleSeparator(self)
            self.layout.add(self.separator, fill=True)
 def add_option(self, layout, option, platforms=None, text=""):
     panel = fsui.Panel(self)
     panel.layout = fsui.VerticalLayout()
     panel.layout.add(OptionUI.create_group(panel,
                                            option,
                                            text,
                                            thin=False,
                                            help_button=True),
                      fill=True)
     layout.add(panel, fill=True, margin_bottom=10)