def __init__(self, parent): super().__init__(parent) # icon = fsui.Icon("language-settings", "pkg:workspace") # title = gettext("Language") # subtitle = gettext("Set language for FS-UAE applications") # self.add_header(icon, title, subtitle) PrefsNotWorkingWarningPanel(parent=self) self.layout.add_spacer(20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) # hori_layout.add(fsui.Label(self, gettext("Language:"))) hori_layout.add(fsui.Label(self, gettext("Language:"))) hori_layout.add_spacer(0, expand=True) self.language_choice = LanguageSettingChoice(self) hori_layout.add(self.language_choice) self.layout.add_spacer(20) information = "" # information = gettext( # "A change of language will only affect applications " # "which are restarted after the change.") # information += "\n\n" information += gettext( "When Automatic is specified, your preferred language is set " "based on information from the operating system (or English, " "if a supported language is not detected)." ) self.layout.add(fsui.MultiLineLabel(self, information, 500)) label = fsui.Label( self, "You can help translate FS-UAE on crowdin.net:" ) self.layout.add(label, margin_top=20) label = fsui.URLLabel( self, "https://crowdin.com/project/fs-uae", "https://crowdin.com/project/fs-uae", ) self.layout.add(label, margin_top=5)
def __init__(self, parent): super().__init__(parent) icon = fsui.Icon("video-settings", "pkg:workspace") gettext("Video Synchronization Settings") title = gettext("Synchronization") subtitle = gettext("Synchronize FS-UAE with your display for " "smooth video") self.add_header(icon, title, subtitle) label = fsui.MultiLineLabel( self, gettext( "Enabling the following option will synchronize the emulation " "to the display when the emulation refresh rate matches the" "screen refresh rate."), 640) self.layout.add(label, fill=True, margin_top=0) self.video_sync_group = self.add_option("video_sync") self.low_latency_group = self.add_option("low_latency_vsync") # label = fsui.MultiLineLabel(self, gettext( # "Enabling the following option will prevent tearing from " # "occurring, but will also use more CPU. Input latency " # "may become slightly higher."), 640) # self.layout.add(label, fill=True, margin_top=0) # self.vblank_checkbox = fsui.HeadingCheckBox(self, gettext( # "Synchronize buffer swaps with display (prevents tearing)")) # self.layout.add(self.vblank_checkbox, margin_top=20) self.sync_method_label = fsui.MultiLineLabel( self, gettext("Depending on your OS and OpenGL drivers, synchronizing " "can use needlessly much CPU (esp. applies to " "Linux). You can experiment with different sync methods " "to improve performance."), 640) self.layout.add(self.sync_method_label, fill=True, margin_top=20) self.sync_method_group = self.add_option("video_sync_method") # self.smooth_label = fsui.MultiLineLabel(self, gettext( # "In order to get really smooth Amiga graphics, you need to " # "enable the following option, and also make sure your display " # "is running at 50Hz (for PAL) or 60Hz (for NTSC)."), 640) # self.layout.add(self.smooth_label, fill=True, margin_top=20) # self.full_sync_checkbox = fsui.HeadingCheckBox(self, gettext( # "Also synchronize emulation with display when possible " # "(smooth scrolling)")) # self.layout.add(self.full_sync_checkbox, margin_top=20) self.layout.add_spacer(0, expand=True) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=10) hori_layout.add( fsui.ImageView(self, fsui.Image("launcher:res/16x16/world_link.png"))) label = fsui.URLLabel( self, gettext("How to achieve perfectly smooth scrolling"), "https://fs-uae.net/perfectly-smooth-scrolling") hori_layout.add(label, margin_left=6) text = gettext( "Synchronizing with the display can in some cases cause " "increased stuttering and low frame rates (esp. in some Linux " "desktop environments with compositing enabled).") link = (" <a href='https://fs-uae.net/video-synchronization-issues'>" "{0}</a>.".format(gettext("Read more"))) label = fsui.MultiLineLabel(self, text + link, min_width=640) self.layout.add(label, fill=True, margin_top=20) LauncherSettings.add_listener(self) for key in ["video_sync"]: self.on_setting(key, LauncherSettings.get(key))
def __init__(self, parent=None): print("LoginWindow, parent =", parent) super().__init__(parent, gettext("Log In to Your OAGD.net Account")) self.set_icon(fsui.Icon("password", "pkg:workspace")) self.theme = WorkspaceTheme.instance() 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 In to Your OAGD.net Account"))) heading_layout_2.add_spacer(2) heading_layout_2.add( fsui.Label( self, gettext("Logging in will enable the online game database " "and more"))) self.username_field = fsui.TextField( self, app.settings["database_email"].strip()) self.password_field = fsui.PasswordField(self) if self.username_field.get_text(): self.password_field.focus() self.layout.add_spacer(20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) label = fsui.Label(self, gettext("E-mail:")) label.set_min_width(100) hori_layout.add(label) hori_layout.add_spacer(20) # self.username_field.select_all() self.username_field.changed.connect(self.on_text_field_changed) self.username_field.activated.connect(self.on_username_activated) hori_layout.add(self.username_field, expand=True) self.layout.add_spacer(10) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) label = fsui.Label(self, gettext("Password:"******"Don't have an account already?")) hori_layout.add(label) hori_layout.add_spacer(20) label = fsui.URLLabel( self, gettext("Create an account now"), "https://oagd.net/user/register?referrer=fs-uae-launcher") hori_layout.add(label, expand=True) self.layout.add_spacer(6) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) label = fsui.Label(self, gettext("Forgot your password?")) hori_layout.add(label) hori_layout.add_spacer(20) self.reset_label = fsui.URLLabel( self, gettext("Reset password via e-mail"), "https://oagd.net/user/reset?referrer=fs-uae-launcher") hori_layout.add(self.reset_label, expand=True) 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.login_button = fsui.Button(self, gettext("Log In")) self.login_button.disable() self.login_button.activated.connect(self.on_login_activated) hori_layout.add(self.login_button) if self.window.theme.has_close_buttons: self.close_button = CloseButton(self) hori_layout.add(self.close_button, fill=True, margin_left=10) self.set_size(self.layout.get_min_size()) self.center_on_parent() if len(self.username_field.text()) == 0: self.username_field.focus() else: self.password_field.focus()
def __init__(self, parent, fsgs): fsui.Window.__init__(self, parent, gettext("Download Game Manually")) self.fsgs = fsgs self.download_page = fsgs.config.get("download_page") self.download_notice = fsgs.config.get("download_notice") self.task = None self.layout = fsui.VerticalLayout() self.layout.set_padding(20, 20, 20, 20) self.icon_header = IconHeader( self, fsui.Icon("web-browser", "pkg:workspace"), gettext("Download Game Manually"), gettext("This game must be downloaded before you can play it")) self.layout.add(self.icon_header, fill=True, margin_bottom=20) label = fsui.HeadingLabel( self, gettext("Please open the following web page and download the " "game from there:")) label.set_min_width(500) self.layout.add(label) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=10) hori_layout.add( fsui.ImageView(self, fsui.Image("launcher:res/16x16/world_link.png"))) label = fsui.URLLabel(self, self.download_page, self.download_page) hori_layout.add(label, margin_left=6) if self.download_notice: label = fsui.MultiLineLabel(self, self.download_notice) label.set_min_width(500) self.layout.add(label, margin_top=20) label = fsui.HeadingLabel( self, gettext("Download to the following directory, and then " "click '{0}':".format(gettext("Scan Downloads")))) label.set_min_width(500) self.layout.add(label, margin_top=20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=10) hori_layout.add( fsui.ImageView(self, fsui.Image("launcher:res/16x16/folder.png"))) label = fsui.Label(self, FSGSDirectories.ensure_downloads_dir()) hori_layout.add(label, margin_left=6) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=20) self.status_label = fsui.Label(self, "") hori_layout.add(self.status_label, expand=True) self.scan_button = fsui.Button(self, gettext("Scan Downloads")) self.scan_button.activated.connect(self.on_scan_files) hori_layout.add(self.scan_button, margin_left=20) self.close_button = fsui.Button(self, gettext("Close")) self.close_button.activated.connect(self.on_close) hori_layout.add(self.close_button, margin_left=10) self.set_size(self.layout.get_min_size()) self.center_on_parent()