Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ English (US) release notes, mirroring CHANGELOG.md (Brazilian Portuguese). Befor

- The 2.0 alpha plays the Console Mode startup sound with every opening animation.

- Version 2.0 opens on a welcome dashboard with a session overview and a customizable background.
- The 2.0 welcome screen shows recent Steam games when enabled, a display and audio summary, and a shortcut to test your controller. The launcher row is unchanged.

- In 2.0 Alpha, Steam Big Picture, Playnite and custom apps can use the experimental Windows Full Screen Experience. Under System → Startup, you can register Console Mode, select it as Home and restore your previous Home. The button shows progress during each operation.

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Notas em português do Brasil; a versão em inglês (Estados Unidos) fica em `CH

- A alpha 2.0 usa o som de abertura do Console Mode em todos os estilos visuais.

- A 2.0 abre na tela de boas-vindas, com um resumo da sessão e um fundo personalizável.
- A tela de boas-vindas da 2.0 mostra os jogos recentes da Steam quando habilitados, um resumo de tela e áudio e um atalho para testar o controle. A fileira de iniciadores não muda.

- Na alpha 2.0, Steam Big Picture, Playnite e apps próprios podem usar a FSE experimental do Windows. Em Sistema → Inicialização, você pode registrar o Console Mode, selecioná-lo como Home e restaurar a Home anterior. A operação em andamento aparece no próprio botão.

Expand Down
15 changes: 12 additions & 3 deletions crates/cm-app/locales/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@
"Registre e selecione o Console Mode como Home em Sistema › Inicialização antes de usar FSE": "Registriere und wähle Console Mode unter System › Start als Startseite, bevor du FSE nutzt",
"Abrir pela Home do Windows": "Über die Windows-Startseite öffnen",
"Tour do aplicativo": "App-Rundgang",
"Primeiros passos": "Erste Schritte",
"Mais usado": "Am häufigsten genutzt",
"Boas-vindas": "Willkommen",
"Seu PC, pronto para jogar.": "Dein PC ist spielbereit.",
"Jogados recentemente": "Zuletzt gespielt",
"Biblioteca Steam": "Steam-Bibliothek",
"Jogos recentes": "Letzte Spiele",
"Nenhum jogo recente para mostrar": "Keine letzten Spiele vorhanden",
"Os jogos da Steam aparecem aqui quando há histórico disponível.": "Hier erscheinen Steam-Spiele, sobald ein Spielverlauf vorliegt.",
"Ative os jogos da Steam em Sistema → Aparência para ver o histórico aqui.": "Aktiviere Steam-Spiele unter System → Darstellung, um deinen Spielverlauf hier zu sehen.",
"Ajustar em Sessão": "Unter Sitzung anpassen",
"Testar controle": "Controller testen",
"Abre o teste de controle do Windows.": "Öffnet den Windows-Controller-Test.",
"Não foi possível abrir o teste de controle do Windows": "Der Windows-Controller-Test konnte nicht geöffnet werden",
"Explorar Boas-vindas": "Willkommen erkunden",
"Jogado {0}": "Zuletzt gespielt: {0}",
"Configurar sessão": "Sitzung konfigurieren",
"Fundo de boas-vindas": "Willkommenshintergrund",
"Animar fundo de boas-vindas": "Willkommenshintergrund animieren",
Expand Down
15 changes: 12 additions & 3 deletions crates/cm-app/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@
"Registre e selecione o Console Mode como Home em Sistema › Inicialização antes de usar FSE": "Register and select Console Mode as Home in System › Startup before using FSE",
"Abrir pela Home do Windows": "Open from Windows Home",
"Tour do aplicativo": "App tour",
"Primeiros passos": "Getting started",
"Mais usado": "Most used",
"Boas-vindas": "Welcome",
"Seu PC, pronto para jogar.": "Your PC, ready to play.",
"Jogados recentemente": "Recently played",
"Biblioteca Steam": "Steam library",
"Jogos recentes": "Recent games",
"Nenhum jogo recente para mostrar": "No recent games to show",
"Os jogos da Steam aparecem aqui quando há histórico disponível.": "Steam games appear here when play history is available.",
"Ative os jogos da Steam em Sistema → Aparência para ver o histórico aqui.": "Enable Steam games in System → Appearance to see your play history here.",
"Ajustar em Sessão": "Adjust in Session",
"Testar controle": "Test controller",
"Abre o teste de controle do Windows.": "Opens the Windows controller test.",
"Não foi possível abrir o teste de controle do Windows": "Couldn't open the Windows controller test",
"Explorar Boas-vindas": "Explore Welcome",
"Jogado {0}": "Played {0}",
"Configurar sessão": "Configure session",
"Fundo de boas-vindas": "Welcome background",
"Animar fundo de boas-vindas": "Animate welcome background",
Expand Down
15 changes: 12 additions & 3 deletions crates/cm-app/locales/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@
"Registre e selecione o Console Mode como Home em Sistema › Inicialização antes de usar FSE": "Registra y selecciona Console Mode como inicio en Sistema › Inicio antes de usar FSE",
"Abrir pela Home do Windows": "Abrir desde el inicio de Windows",
"Tour do aplicativo": "Guía de la aplicación",
"Primeiros passos": "Primeros pasos",
"Mais usado": "Más usado",
"Boas-vindas": "Bienvenida",
"Seu PC, pronto para jogar.": "Tu PC, listo para jugar.",
"Jogados recentemente": "Jugados recientemente",
"Biblioteca Steam": "Biblioteca de Steam",
"Jogos recentes": "Juegos recientes",
"Nenhum jogo recente para mostrar": "No hay juegos recientes para mostrar",
"Os jogos da Steam aparecem aqui quando há histórico disponível.": "Los juegos de Steam aparecen aquí cuando hay historial disponible.",
"Ative os jogos da Steam em Sistema → Aparência para ver o histórico aqui.": "Activa los juegos de Steam en Sistema → Apariencia para ver el historial aquí.",
"Ajustar em Sessão": "Ajustar en Sesión",
"Testar controle": "Probar mando",
"Abre o teste de controle do Windows.": "Abre la prueba de mandos de Windows.",
"Não foi possível abrir o teste de controle do Windows": "No se pudo abrir la prueba de mandos de Windows",
"Explorar Boas-vindas": "Explorar Bienvenida",
"Jogado {0}": "Jugado {0}",
"Configurar sessão": "Configurar sesión",
"Fundo de boas-vindas": "Fondo de bienvenida",
"Animar fundo de boas-vindas": "Animar fondo de bienvenida",
Expand Down
15 changes: 12 additions & 3 deletions crates/cm-app/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@
"Registre e selecione o Console Mode como Home em Sistema › Inicialização antes de usar FSE": "Enregistrez et sélectionnez Console Mode comme accueil dans Système › Démarrage avant d’utiliser le mode plein écran",
"Abrir pela Home do Windows": "Ouvrir depuis l’accueil Windows",
"Tour do aplicativo": "Visite de l’application",
"Primeiros passos": "Premiers pas",
"Mais usado": "Le plus utilisé",
"Boas-vindas": "Bienvenue",
"Seu PC, pronto para jogar.": "Votre PC est prêt à jouer.",
"Jogados recentemente": "Joués récemment",
"Biblioteca Steam": "Bibliothèque Steam",
"Jogos recentes": "Jeux récents",
"Nenhum jogo recente para mostrar": "Aucun jeu récent à afficher",
"Os jogos da Steam aparecem aqui quando há histórico disponível.": "Les jeux Steam s’affichent ici quand un historique est disponible.",
"Ative os jogos da Steam em Sistema → Aparência para ver o histórico aqui.": "Activez les jeux Steam dans Système → Apparence pour voir votre historique ici.",
"Ajustar em Sessão": "Modifier dans Session",
"Testar controle": "Tester la manette",
"Abre o teste de controle do Windows.": "Ouvre le test des manettes de Windows.",
"Não foi possível abrir o teste de controle do Windows": "Impossible d’ouvrir le test des manettes de Windows",
"Explorar Boas-vindas": "Explorer l’accueil",
"Jogado {0}": "Joué {0}",
"Configurar sessão": "Configurer la session",
"Fundo de boas-vindas": "Arrière-plan de bienvenue",
"Animar fundo de boas-vindas": "Animer le fond de bienvenue",
Expand Down
15 changes: 12 additions & 3 deletions crates/cm-app/locales/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@
"Registre e selecione o Console Mode como Home em Sistema › Inicialização antes de usar FSE": "Зарегистрируйте и выберите Console Mode как главный экран в разделе «Система › Запуск» перед использованием FSE",
"Abrir pela Home do Windows": "Открывать с главного экрана Windows",
"Tour do aplicativo": "Обзор приложения",
"Primeiros passos": "Первые шаги",
"Mais usado": "Чаще всего",
"Boas-vindas": "Добро пожаловать",
"Seu PC, pronto para jogar.": "Ваш ПК готов к игре.",
"Jogados recentemente": "Недавно запущенные игры",
"Biblioteca Steam": "Библиотека Steam",
"Jogos recentes": "Недавние игры",
"Nenhum jogo recente para mostrar": "Нет недавних игр для показа",
"Os jogos da Steam aparecem aqui quando há histórico disponível.": "Игры Steam появятся здесь, когда будет доступна история запусков.",
"Ative os jogos da Steam em Sistema → Aparência para ver o histórico aqui.": "Включите отображение игр Steam в разделе «Система → Внешний вид», чтобы увидеть здесь историю запусков.",
"Ajustar em Sessão": "Настроить в разделе «Сеанс»",
"Testar controle": "Проверить геймпад",
"Abre o teste de controle do Windows.": "Открывает средство проверки геймпада в Windows.",
"Não foi possível abrir o teste de controle do Windows": "Не удалось открыть средство проверки геймпада в Windows",
"Explorar Boas-vindas": "Открыть раздел приветствия",
"Jogado {0}": "Последний запуск: {0}",
"Configurar sessão": "Настроить сеанс",
"Fundo de boas-vindas": "Фон приветствия",
"Animar fundo de boas-vindas": "Анимировать фон приветствия",
Expand Down
65 changes: 31 additions & 34 deletions crates/cm-app/src/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use gpui::{
use cm_core::config::{Config, Paths};

use crate::{i18n::{n, shown, t, tn}, input::Pad, settings::{self, Category, Nav, Section, Value}, sound::{Sound, Sounds}};
use crate::welcome::WelcomeTarget;

/// What is on screen besides the tabs.
#[derive(Clone, Copy, PartialEq)]
Expand Down Expand Up @@ -148,6 +149,8 @@ pub struct Console {
pub(crate) hidden_games: Vec<Item>,
pub steam_icon: Option<Arc<RenderImage>>,
pub focus: usize,
pub(crate) welcome_target: Option<WelcomeTarget>,
pub(crate) welcome_scroll: gpui::ScrollHandle,
pub tab: usize,
pub controller: Option<String>,
/// Batteries of the connected pads and the low-battery warnings already given (battery.rs).
Expand Down Expand Up @@ -267,6 +270,7 @@ impl Console {
Self {
custom_editor: None, picking_app: false, running: None, return_to_pc_pending: false, toast: None, window: None, app_in_front: true, hardware,
config, paths, items, hidden_games: games, steam_icon, focus: 0, tab: 0, controller: None, batteries: Vec::new(), battery_alarms: HashMap::new(), guide_tour: None, tour_on_open: false, guide_from_tray: false, intro: None, intro_run: 0, wake: Default::default(), report_busy: false, tv_testing: false, helper_rows: Default::default(), shortcut_capture: None, pads: None, pending_whats_new: None, whats_new: None, clock: cm_platform::local_time(), now: unix_now(),
welcome_target: None, welcome_scroll: Default::default(),
view: View::Home, session, system, nav: Nav::default(),
game_opts, pinned, volume: 60, launch_task: None, guide_row: 0, guide_windows: Vec::new(), live_thumbs: Default::default(), session_vrr: None, session_fps: 0, session_hdr: None,
prev_focus: 0, prev_tab: 0, tab_anim: 0, tab_dir: 1., menu_anim: 0, exiting: None, exit_anim: 0, exit_task: None,
Expand All @@ -290,8 +294,13 @@ impl Console {
match p {
Pad::LB | Pad::RB => return self.set_tab(if p == Pad::LB { (self.tab + 2) % 3 } else { (self.tab + 1) % 3 }, cx),
_ if self.tab != 0 => return self.settings_press(p, cx),
_ if self.items[self.focus].is_welcome() && self.view == View::Home && self.welcome_press(p, cx) => return,
Pad::A if self.items[self.focus].is_welcome() => return self.launch_welcome_pick(cx),
Pad::Y if self.items[self.focus].is_welcome() => return self.start_tour(cx),
Pad::Y if self.items[self.focus].is_welcome() => {
self.welcome_target = None;
self.welcome_scroll.scroll_to_item(0);
return self.start_tour(cx);
}
Pad::X if self.items[self.focus].is_welcome() => return self.set_tab(1, cx),
Pad::Menu | Pad::Y => return self.open_card_menu(cx),
Pad::A => return self.start_launch(cx),
Expand Down Expand Up @@ -337,6 +346,8 @@ impl Console {

fn set_focus(&mut self, next: usize, cx: &mut Context<Self>) {
if next == self.focus || next >= self.items.len() { return; }
self.welcome_target = None;
self.welcome_scroll.scroll_to_item(0);
self.backdrop_transition = if motion::reduced() {
None
} else {
Expand Down Expand Up @@ -377,7 +388,11 @@ impl Console {
/// Mouse: a click focuses a card; the row only moves if that card is cut at an edge.
fn click_card(&mut self, i: usize, cx: &mut Context<Self>) {
if matches!(self.items[i], Item::Add) { self.click_card_focus(i, cx); return self.press(Pad::A, cx); }
if self.focus == i { return self.press(Pad::A, cx); }
if self.focus == i {
self.welcome_target = None;
self.welcome_scroll.scroll_to_item(0);
return self.press(Pad::A, cx);
}
self.click_card_focus(i, cx);
}

Expand All @@ -388,7 +403,7 @@ impl Console {
self.open_card_menu(cx);
}

fn click_card_focus(&mut self, i: usize, cx: &mut Context<Self>) {
pub(crate) fn click_card_focus(&mut self, i: usize, cx: &mut Context<Self>) {
self.set_focus(i, cx);
let (l, r) = (self.card_left(i, i) - 24., self.card_left(i, i) + TILE_F + RING + 24.);
if l < self.scroll { self.set_scroll(l, cx); } else if r > self.scroll + self.row_view { self.set_scroll(r - self.row_view, cx); }
Expand All @@ -405,6 +420,8 @@ impl Console {
return;
}
self.dropdown = None;
self.welcome_target = None;
self.welcome_scroll.scroll_to_item(0);
// the new tab slides in from the side it sits on (LB/left tabs from the left)
self.tab_dir = if tab > self.tab { 1. } else { -1. };
self.prev_tab = self.tab;
Expand Down Expand Up @@ -733,35 +750,6 @@ impl Console {
}
}

fn welcome(&self, ui: &Ui, cx: &mut Context<Self>) -> Div {
let card = |id: &'static str, pad, icon, action, label: SharedString, cx: &mut Context<Self>| {
div().id(id).flex_1().min_w_0().flex().items_center().gap(ui.u(16.))
.px(ui.u(20.)).py(ui.u(22.)).rounded(ui.u(18.))
.bg(color::white(0.065)).border(ui.u(1.)).border_color(color::white(0.16))
.hover(|s| s.bg(color::white(0.13))).cursor_pointer()
.child(div().flex_none().size(ui.u(54.)).rounded(ui.u(14.)).bg(hex(0x72e5b5, 0.14))
.flex().items_center().justify_center().child(ui.icon(icon, 27., hex(0xa2f5cd, 1.))))
.child(div().flex_1().min_w_0().flex().flex_col().gap(ui.u(4.))
.child(div().text_size(ui.u(18.)).text_color(color::mute()).child(action))
.child(div().text_size(ui.u(26.)).font_weight(FontWeight::SEMIBOLD).truncate().child(label)))
.child(ui.icon(glyph::CHEVRON_RIGHT, 24., color::mute()))
.on_click(cx.listener(move |this, _, _, cx| this.press(pad, cx)))
};
let mut cards = div().flex().w_full().gap(ui.u(16.));
if let Some((_, launcher, count)) = self.welcome_pick() {
cards = cards.child(card("welcome-play", Pad::A, glyph::PLAY_ARROW,
if count == 0 { t("Jogar") } else { t("Mais usado") }, launcher.shown_name(), cx));
}
cards = cards
.child(card("welcome-tour", Pad::Y, glyph::INFO, t("Primeiros passos"), t("Tour do aplicativo").into(), cx))
.child(card("welcome-session", Pad::X, glyph::TUNE, t("Configurar sessão"), self.setup_text(0, 0).into(), cx));
div().absolute().left(ui.u(ROW_X)).right(ui.u(96.)).top(ui.u(448.))
.max_w(ui.u(1480.)).flex().flex_col().items_start().gap(ui.u(24.))
.child(div().text_size(ui.u(56.)).line_height(ui.u(66.)).font_family(cm_ui::LAUNCHER_TITLE_FONT)
.font_weight(FontWeight::BOLD).child(t("Seu PC, pronto para jogar.")))
.child(cards)
}

fn hero(&self, ui: &Ui, cx: &mut Context<Self>) -> Div {
let logo_box = div().h(ui.u(170.)).flex().items_end().mb(ui.u(30.));
let word = |text: &str| div().whitespace_nowrap().text_size(ui.u(86.)).font_family(cm_ui::LAUNCHER_TITLE_FONT).font_weight(FontWeight::BOLD).line_height(ui.u(92.)).child(ui.lifted(text.to_string()));
Expand Down Expand Up @@ -958,10 +946,19 @@ impl Console {
(mk(l), mk(r))
} else if self.tab == 0 {
if matches!(self.items[self.focus], Item::Welcome) {
(vec![], mk(vec![
let left = if self.welcome_target.is_some() {
mk(vec![(Pad::B, Glyph::Text("B"), t("Voltar"))])
} else {
mk(vec![(Pad::Down, Glyph::Text("↓"), t("Explorar Boas-vindas"))])
};
let primary = match self.welcome_target {
Some(WelcomeTarget::Session | WelcomeTarget::Controller) => t("Abrir"),
_ => t("Jogar"),
};
(left, mk(vec![
(Pad::Y, Glyph::Text("Y"), t("Tour do aplicativo")),
(Pad::X, Glyph::Text("X"), t("Configurar sessão")),
(Pad::A, Glyph::Text("A"), t("Jogar")),
(Pad::A, Glyph::Text("A"), primary),
]))
} else if self.has_card_menu(self.focus) {
(vec![(Pad::Menu, ui.hint(Glyph::Icon(glyph::MENU), t("Menu"), None))],
Expand Down
1 change: 1 addition & 0 deletions crates/cm-app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ mod tv;
mod shell;
mod updates;
mod wake;
mod welcome;
mod video;
mod whats_new;

Expand Down
Loading
Loading