Swipe between Practice's tabs and give Astral Projection How to and Customize

A swipe across a practice's card moves through every practice in the tabs'
order: past a tab's last practice it goes on to the next tab, and from
Workout back to Meditation, so Yoga, Martial arts and Workout, with one
practice each, change tab with each swipe. The arrows under the card still
page within the tab.

Astral Projection's card now has Start, How to and Customize, as the other
meditation practices do. How to is a two-page guide to the 40-minute
session and its settings, in every language. Customize chooses the
background music and its volume, and turns the voice narration on or off
with the language it speaks, remembered and backed up as
astral_projection_narration_language. A practice recorded in one voice,
such as Astral Projection, offers no female or male choice.
This commit is contained in:
waozi committed 2026-10-20 01:48:10 -03:00
1 parent 2bb0042bf4
commit ce885ae2d8
26 files changed
+380 -6

No files matched your search

+224
View File
@@ -0,0 +1,224 @@
// Astral Projection's How to and Customize pages, laid out as the other
// meditation practices' are: a two-page guide, and the music and voice
// narration it plays with.
manual_host :: #system_library "c";
app_start_practice_from_ui :: (app: *InnerBreeze, id: s32) -> bool #foreign manual_host "practice_actions_app_start_practice_from_ui";
#import "geometry"
#import "guide_pager"
#import "drawing_props"
#import "image_props"
#import "image_widget"
#import "layout"
#import "paint_queue"
#import "scroll"
#import "scroll_props"
#import "scroll_widget"
#import "session"
#import "style"
#import "style_sheet"
#import "surface"
#import "text_align"
#import "text_props"
#import "text_widget"
#import "tree"
#import, file "../../src/app/app.zi";
#import, file "../../src/app/app_modal_state.zi";
#import, file "../../src/app/app_route_state.zi";
#import, file "../../src/app/app_settings.zi";
#import, file "../../src/app/app_types.zi";
#import, file "../../src/app/current_app.zi";
#import, file "../../src/app/exercise_types.zi";
#import, file "../../src/app/locale.zi";
#import, file "../../src/app/manual_seen_actions.zi";
#import, file "../../src/app/metrics.zi";
#import, file "../../src/app/modal_rules.zi";
#import, file "../../src/app/route_types.zi";
#import, file "../../src/app/widgets.zi";
#import, file "../../src/core/types.zi";
#import, file "../../src/practices/meditation/meditation_music.zi";
#import, file "../../src/practices/practice_voice_settings.zi";
#import, file "../../src/screens/manual_screen.zi";
#import, file "../../src/screens/practice_manual_layout.zi";
#import, file "../../src/screens/practice_screen_calls.zi";
#import, file "../../src/screens/practice_subscreen_layout.zi";
using AppThemeMode;
using ImageFit;
using ExerciseType;
using ModalType;
using TextAlign;
using TextWrap;
ASTRAL_MANUAL_PAGES :: 2
AstralManualStart :: (app: *InnerBreeze) {
if app == null { return }
app.tutorial_step = 0
app.manual_scroll = 0
app.practice_tab = PRACTICE_TAB_PLAY
unused app_start_practice_from_ui(app, EXERCISE_ASTRAL_PROJECTION)
}
AstralManualClose :: (app: *InnerBreeze, mark_seen: s32) {
if app == null { return }
if mark_seen != 0 {
mark_exercise_manual_seen(app, EXERCISE_ASTRAL_PROJECTION)
}
if app.modal.active != 0 && app.modal.type == cast(ModalType)ModalPracticeManual {
app_close_modal(app)
return
}
app.tutorial_step = 0
app.manual_scroll = 0
app.practice_tab = PRACTICE_TAB_PLAY
app_switch_screen(app, ScreenStart)
}
AstralManualParagraph :: (step: s32, content_w: s32) -> ManualParagraphSpec {
key := ifx step == 0 then "astral_manual_intro_text" else "astral_manual_customize_text"
return manual_screen_tutorial_paragraph(LocaleText(key), content_w)
}
AstralManualContentHeight :: (step: s32, content_w: s32) -> s32 {
paragraph := AstralManualParagraph(step, content_w)
return content_w * 222 / 394 + AppScale(24) + manual_screen_guide_header_height() +
AppParagraphHeight(paragraph.text, paragraph.width, paragraph.font, paragraph.line_gap)
}
// The first page shows the practice's own picture; the second the ring the
// other meditation guides draw for Customize.
AstralManualDrawPage :: (app: *InnerBreeze, content_x: s32, content_w: s32, step: s32, y: *s32) {
hero_h := content_w * 222 / 394
hero := manual_screen_hero_bounds(content_x, content_w, y.*, hero_h)
if step == 0 {
dark := app.theme_mode == APP_THEME_DARK || (app.theme_mode != APP_THEME_LIGHT && app.dark_mode != 0)
picture: ImageProps
picture.asset_path = "assets/practices/astral_projection/banner-light.png"
if dark {
picture.asset_path = "assets/practices/astral_projection/banner-dark.png"
}
picture.alt_text = LocaleText("exercise_astral_projection")
picture.bounds = hero
picture.fit = cast(ImageFit)ImageFitCover
Image(app.ui.session, picture)
} else {
center_x := content_x + content_w / 2
center_y := y.* + hero_h / 2
face := GuideFace(2)
PaintRoundedFill(app.ui.session, -1, hero, cast(float32)AppScale(14), 10,
ColorFromPacked(face.value.background))
outer_radius := AppScale(68)
inner_radius := AppScale(48)
outer := Rectangle.{cast(float32)(center_x - outer_radius), cast(float32)(center_y - outer_radius),
cast(float32)(outer_radius * 2), cast(float32)(outer_radius * 2)}
inner := Rectangle.{cast(float32)(center_x - inner_radius), cast(float32)(center_y - inner_radius),
cast(float32)(inner_radius * 2), cast(float32)(inner_radius * 2)}
PaintRoundedFill(app.ui.session, -1, outer, cast(float32)outer_radius, 16,
ColorFromPacked(Opacity(face.value.foreground, 0.24)))
PaintRoundedFill(app.ui.session, -1, inner, cast(float32)inner_radius, 16,
ColorFromPacked(face.value.background))
title: TextProps
title.bounds = inner
title.text = LocaleText("practice_configure_button")
title.wrap = cast(TextWrap)TextWrapNone
title.align = cast(TextAlign)TextAlignCenter
title.vertical_align = cast(TextAlign)TextAlignCenter
Text(app.ui.session, title)
}
manual_screen_draw_hero_progress(hero, step, ASTRAL_MANUAL_PAGES)
y.* += hero_h + AppScale(24)
manual_screen_draw_guide_header(LocaleText(ifx step == 0 then "exercise_astral_projection" else
"practice_configure_button"), step, ASTRAL_MANUAL_PAGES, content_x, y, content_w)
ManualParagraph(app, AstralManualParagraph(step, content_w), content_x, y)
}
AstralManualDraw :: (app: *InnerBreeze) {
if app == null || !SessionValid(app.ui.session) { return }
step := app.tutorial_step
if step < 0 { step = 0 }
if step >= ASTRAL_MANUAL_PAGES {
step = ASTRAL_MANUAL_PAGES - 1
}
app.tutorial_step = step
responsive_max_w := cast(s32)(cast(float32)app.ui.view_width * 0.96)
if responsive_max_w > manual_screen_tutorial_max_width() {
responsive_max_w = manual_screen_tutorial_max_width()
}
if responsive_max_w < AppScale(200) {
responsive_max_w = AppScale(200)
}
layout := practice_screen_manual_layout(app, cast(ModalType)ModalPracticeManual,
ASTRAL_MANUAL_PAGES, manual_screen_tutorial_top_gap(), 0, AppScale(120))
if manual_screen_draw_title_bar(app, LocaleText("exercise_astral_projection"), layout.title_h) != 0 {
AstralManualClose(app, 0)
return
}
column := CenteredColumnFor(app.ui.view_width, responsive_max_w, manual_screen_tutorial_side_padding())
props: ScrollProps
props.key = KeyHash("astral/manual/scroll")
props.bounds = Rectangle.{0.0, cast(float32)layout.content_y, cast(float32)app.ui.view_width,
cast(float32)layout.content_h}
props.content_height = AstralManualContentHeight(step, column.width)
props.scroll_offset = app.manual_scroll
props.scale = MetricsScale()
result := Scroll(app.ui.session, props)
app.manual_scroll = result.scroll_offset
if result.opened {
y := cast(s32)result.content.y
AstralManualDrawPage(app, column.x, column.width, step, *y)
unused End(app.ui.session)
}
nav: ManualGuideNav
nav.page = step
nav.page_count = ASTRAL_MANUAL_PAGES
nav.y = layout.nav_y
nav.h = layout.nav_h
nav.content_y = layout.content_y
nav.content_h = layout.content_h
nav.focus_id = 425
decision := manual_screen_guide_controls(app, nav)
if decision.closed {
AstralManualClose(app, 0)
} else if decision.finished {
AstralManualStart(app)
}
}
// Customize: the music that plays, and the voice narration with its language.
AstralConfigDraw :: (app: *InnerBreeze) {
if app == null {
return
}
layout := PracticeSubscreenLayout.{0}
app.practice_config_tab = 0
PracticeConfigLayout(app, ModalPracticeConfig, AppScale(14), *layout)
if PracticeConfigTitle(app, LocaleText("practice_configure_button"), cast(s32)ModalPracticeConfig, 0) != 0 {
return
}
side_padding := GetPageSidePadding()
max_content_w := AppScale(CONTENT_MAX_W)
if max_content_w > app.ui.view_width - side_padding * 2 {
max_content_w = app.ui.view_width - side_padding * 2
}
if max_content_w < AppScale(320) {
max_content_w = AppScale(320)
}
content_x: s32 = 0
content_w: s32 = 0
GetCenteredColumn(max_content_w, side_padding, *content_x, *content_w)
content_h := AppScale(320) + PracticeNarrationSettingsHeight(app, EXERCISE_ASTRAL_PROJECTION, false, content_w)
props: ScrollProps
props.key = KeyHash("astral/customize/scroll")
props.bounds = Rectangle.{0.0, cast(float32)layout.scroll_y, cast(float32)app.ui.view_width,
cast(float32)layout.scroll_h}
props.content_height = content_h
props.scroll_offset = app.settings_scroll
result := Scroll(CurrentApp().ui.session, props)
app.settings_scroll = result.scroll_offset
y := cast(s32)result.content.y
meditation_music_draw_practice_settings(app, EXERCISE_ASTRAL_PROJECTION, content_x, content_w, *y, 0, 1)
y += AppScale(12)
unused PracticeNarrationSettings(app, EXERCISE_ASTRAL_PROJECTION, false,
app.astral_projection_narration_language[:], content_x, content_w, *y)
End(CurrentApp().ui.session)
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8
View File
@@ -7399,3 +7399,11 @@ Vyměň strany
[practice_kind_workout]
Trénink
---
[astral_manual_intro_text]
Lehni si na klidné místo, nejlépe před spaním, klidně se sluchátky. 40 minut tě klidný hlas provází hlubokým uvolněním, pomalým sestupem, pocitem vznášení a jemným návratem. Pokud usneš, nevadí to.
---
[astral_manual_customize_text]
V nabídce Přizpůsobit vybereš hudbu v pozadí a její hlasitost, zapneš nebo vypneš hlasový doprovod a zvolíš jeho jazyk. Bez hlasového doprovodu se pokyny zobrazí jako text.
---
+8
View File
@@ -7393,3 +7393,11 @@ Seite wechseln
[practice_kind_workout]
Training
---
[astral_manual_intro_text]
Leg dich an einen ruhigen Ort, am besten vor dem Schlafen, gern mit Kopfhörern. 40 Minuten lang führt dich eine ruhige Stimme durch tiefe Entspannung, einen langsamen Abstieg, das Gefühl des Schwebens und eine sanfte Rückkehr. Wenn du dabei einschläfst, ist das in Ordnung.
---
[astral_manual_customize_text]
Unter „Anpassen“ wählst du die Hintergrundmusik und ihre Lautstärke, schaltest die Sprachausgabe ein oder aus und wählst ihre Sprache. Ohne Sprachausgabe erscheint die Anleitung als Text.
---
+8
View File
@@ -7417,3 +7417,11 @@ Switch sides
[practice_kind_workout]
Workout
---
[astral_manual_intro_text]
Lie down somewhere quiet, ideally before sleep, with headphones if you like. For 40 minutes a calm voice guides you through deep relaxation, a slow descent, the feeling of floating and a gentle return. If you drift off to sleep, that is fine.
---
[astral_manual_customize_text]
In Customize, choose the background music and its volume, turn the voice narration on or off and pick its language. Without narration the guidance shows as text.
---
+8
View File
@@ -7393,3 +7393,11 @@ Cambia de lado
[practice_kind_workout]
Entrenamiento
---
[astral_manual_intro_text]
Túmbate en un lugar tranquilo, mejor antes de dormir, con auriculares si quieres. Durante 40 minutos una voz serena te guía por una relajación profunda, un descenso lento, la sensación de flotar y un regreso suave. Si te quedas dormido, no pasa nada.
---
[astral_manual_customize_text]
En Personalizar eliges la música de fondo y su volumen, activas o desactivas la narración de voz y eliges su idioma. Sin narración, la guía aparece como texto.
---
+8
View File
@@ -7381,3 +7381,11 @@ Change de côté
[practice_kind_workout]
Entraînement
---
[astral_manual_intro_text]
Allonge-toi dans un endroit calme, idéalement avant de dormir, avec un casque si tu veux. Pendant 40 minutes, une voix douce te guide vers une relaxation profonde, une lente descente, la sensation de flotter et un retour en douceur. Si tu t’endors, ce n’est pas grave.
---
[astral_manual_customize_text]
Dans Personnaliser, choisis la musique de fond et son volume, active ou coupe la narration vocale et choisis sa langue. Sans narration, les consignes s’affichent en texte.
---
+8
View File
@@ -7382,3 +7382,11 @@ Ganti sisi
[practice_kind_workout]
Latihan fisik
---
[astral_manual_intro_text]
Berbaringlah di tempat yang tenang, sebaiknya sebelum tidur, pakai headphone jika mau. Selama 40 menit suara yang tenang memandumu melalui relaksasi dalam, turun perlahan, rasa melayang, dan kembali dengan lembut. Kalau kamu tertidur, tidak apa-apa.
---
[astral_manual_customize_text]
Di Sesuaikan, pilih musik latar dan volumenya, nyalakan atau matikan narasi suara, dan pilih bahasanya. Tanpa narasi, panduannya tampil sebagai teks.
---
+8
View File
@@ -7382,3 +7382,11 @@ Cambia lato
[practice_kind_workout]
Allenamento
---
[astral_manual_intro_text]
Sdraiati in un posto tranquillo, meglio prima di dormire, con le cuffie se vuoi. Per 40 minuti una voce calma ti guida in un rilassamento profondo, una lenta discesa, la sensazione di fluttuare e un dolce ritorno. Se ti addormenti, va bene così.
---
[astral_manual_customize_text]
In Personalizza scegli la musica di sottofondo e il suo volume, attivi o disattivi la narrazione vocale e ne scegli la lingua. Senza narrazione, la guida appare come testo.
---
+8
View File
@@ -7378,3 +7378,11 @@ Inner Breeze がバージョン %s に更新されました。
[practice_kind_workout]
ワークアウト
---
[astral_manual_intro_text]
静かな場所で横になりましょう。眠る前がおすすめで、ヘッドホンを使ってもかまいません。40分間、穏やかな声が深いリラックス、ゆっくりとした下降、浮かぶ感覚、そしてやさしい帰還へと導きます。途中で眠ってしまっても大丈夫です。
---
[astral_manual_customize_text]
「カスタマイズ」では、背景音楽と音量を選び、音声ガイドのオン・オフと言語を設定できます。音声ガイドがオフのときは、案内が文字で表示されます。
---
+8
View File
@@ -7388,3 +7388,11 @@ Inner Breeze가 %s 버전으로 업데이트되었어요.
[practice_kind_workout]
운동
---
[astral_manual_intro_text]
조용한 곳에 누우세요. 잠들기 전이 가장 좋고, 원하면 헤드폰을 써도 돼요. 40분 동안 차분한 목소리가 깊은 이완, 천천히 내려가기, 떠오르는 느낌, 그리고 부드러운 돌아오기로 안내해요. 도중에 잠들어도 괜찮아요.
---
[astral_manual_customize_text]
맞춤 설정에서 배경 음악과 음량을 고르고, 음성 안내를 켜거나 끄고 언어를 선택하세요. 음성 안내가 꺼져 있으면 안내가 글로 표시돼요.
---
+8
View File
@@ -7391,3 +7391,11 @@ Troque de lado
[practice_kind_workout]
Treino
---
[astral_manual_intro_text]
Deite-se num lugar tranquilo, de preferência antes de dormir, com fones de ouvido se quiser. Durante 40 minutos uma voz calma guia você por um relaxamento profundo, uma descida lenta, a sensação de flutuar e um retorno suave. Se adormecer, tudo bem.
---
[astral_manual_customize_text]
Em Personalizar você escolhe a música de fundo e o volume, liga ou desliga a narração por voz e escolhe o idioma. Sem narração, a orientação aparece como texto.
---
+8
View File
@@ -7387,3 +7387,11 @@ Inner Breeze обновлён до версии %s.
[practice_kind_workout]
Тренировка
---
[astral_manual_intro_text]
Ляг в тихом месте, лучше перед сном, можно в наушниках. 40 минут спокойный голос ведёт тебя через глубокое расслабление, медленное погружение, ощущение парения и мягкое возвращение. Если уснёшь, ничего страшного.
---
[astral_manual_customize_text]
В разделе «Настроить» выбери фоновую музыку и её громкость, включи или выключи голосовое сопровождение и выбери его язык. Без сопровождения инструкции показываются текстом.
---
+8
View File
@@ -7393,3 +7393,11 @@ Inner Breeze 已更新至 %s 版本。
[practice_kind_workout]
健身
---
[astral_manual_intro_text]
找个安静的地方躺下,最好在睡前,也可以戴上耳机。在40分钟里,平静的声音会带你经历深度放松、缓慢下沉、漂浮的感觉,然后温和地回来。如果中途睡着了也没关系。
---
[astral_manual_customize_text]
在“自定义”中选择背景音乐和音量,开启或关闭语音讲解并选择语言。关闭语音讲解时,引导会以文字显示。
---
+2
View File
@@ -333,6 +333,7 @@ save_settings :: (app: *InnerBreeze) {
save_setting_int("sun_salutation_breath_tempo", 1)
save_setting_int("sun_salutation_voice", app.sun_salutation_voice)
unused SettingsStoreText("sun_salutation_narration_language", app.sun_salutation_narration_language[:])
unused SettingsStoreText("astral_projection_narration_language", app.astral_projection_narration_language[:])
unused SettingsStoreText("tai_chi_narration_language", app.tai_chi_narration_language[:])
save_setting_int("tai_chi_character", app.tai_chi.character)
save_setting_int("tai_chi_view", app.tai_chi.view)
@@ -720,6 +721,7 @@ app_load_settings :: (app: *InnerBreeze) -> s32 {
}
load_clamped_setting(*app.sun_salutation_voice, "sun_salutation_voice", -1, -1, 1)
unused SettingsCacheCopyText("sun_salutation_narration_language", app.sun_salutation_narration_language[:])
unused SettingsCacheCopyText("astral_projection_narration_language", app.astral_projection_narration_language[:])
unused SettingsCacheCopyText("tai_chi_narration_language", app.tai_chi_narration_language[:])
load_clamped_setting(*app.tai_chi.character,
"tai_chi_character", 0, 0, TAI_CHI_CHARACTER_COUNT - 1)
+1
View File
@@ -501,6 +501,7 @@ InnerBreeze :: struct {
// The language each narrated practice speaks, chosen in its Customize;
// empty follows the app's language.
sun_salutation_narration_language: [8]u8
astral_projection_narration_language: [8]u8
tai_chi_narration_language: [8]u8
audio_cue_selected: [AUDIO_CUE_COUNT] s32
audio_custom_sound_count: s32
+2
View File
@@ -398,6 +398,8 @@ app_update_draw :: (vapp: *void, viewport: Rectangle) {
PracticeVoiceSelect(EXERCISE_SUN_SALUTATION, ifx salutation_male then "male" else "")
PracticeNarrationPrefer(EXERCISE_TAI_CHI, AppTextFromCString(*app.tai_chi_narration_language[0], 8))
PracticeNarrationPrefer(EXERCISE_SUN_SALUTATION, AppTextFromCString(*app.sun_salutation_narration_language[0], 8))
PracticeNarrationPrefer(EXERCISE_ASTRAL_PROJECTION,
AppTextFromCString(*app.astral_projection_narration_language[0], 8))
if practice_paid_allowed {
UnlockSync()
}
+4
View File
@@ -7,6 +7,7 @@ c :: #system_library "c";
#import, file "../app/app.zi";
#import, file "../app/locale.zi";
#import, file "../../apps/practice/astral_projection.zi";
#import, file "../../apps/practice/astral_projection_pages.zi";
#import, file "../../apps/practice/workout.zi";
#import, file "meditation/meditation_practice.zi";
#import, file "meditation/meditation_session.zi";
@@ -211,6 +212,9 @@ practice_initialize_definitions :: () {
astral.label_key = "exercise_astral_projection"
astral.kind = PRACTICE_KIND_MEDITATION
astral.start = AstralStart
astral.draw_manual = AstralManualDraw
astral.close_manual = AstralManualClose
astral.draw_config = AstralConfigDraw
astral.update = AstralUpdate
astral.draw_active_session = AstralDraw
astral.request_exit = AstralRequestExit
+9 -1
View File
@@ -70,8 +70,11 @@ PracticeNarrationStatusHeight :: (app: *InnerBreeze, practice: s32, voice: strin
PracticeNarrationSettingsHeight :: (app: *InnerBreeze, practice: s32, male: bool, width: s32) -> s32 {
height := AppScale(36 + 56)
if app.voice_narration_enabled != 0 {
height += AppScale(42 + 12 + 44 + 16) +
height += AppScale(44 + 16) +
PracticeNarrationStatusHeight(app, practice, ifx male then "male" else "", width)
if PracticeVoiceRecorded(practice, "male") {
height += AppScale(42 + 12)
}
}
return height
}
@@ -171,6 +174,11 @@ PracticeNarrationSettings :: (app: *InnerBreeze, practice: s32, male: bool, choi
}
PracticeContentReviewNext()
picked: s32 = -1
// A practice recorded in one voice offers no choice of voice.
if !PracticeVoiceRecorded(practice, "male") {
PracticeNarrationLanguages(app, practice, "", choice, x, width, y)
return picked
}
options: [2]SegmentOption = .[SegmentOption.{.label = LocaleText("practice_voice_female")},
SegmentOption.{.label = LocaleText("practice_voice_male")}]
props: SegmentedControlProps
+5
View File
@@ -4,6 +4,7 @@
#import, file "../practices/sun_salutation/sun_salutation_manual.zi";
#import, file "../practices/patterns/patterns_manual.zi";
#import, file "../practices/whm/whm_manual.zi";
#import, file "../../apps/practice/astral_projection_pages.zi";
using ExerciseType;
@@ -19,6 +20,8 @@ manual_screen_close_tutorial :: (app: *InnerBreeze, mark_seen: s32) {
sun_manual_close(app, mark_seen)
case EXERCISE_PATTERNS;
patterns_manual_close(app, mark_seen)
case EXERCISE_ASTRAL_PROJECTION;
AstralManualClose(app, mark_seen)
case;
whm_manual_close(app, mark_seen)
}
@@ -36,6 +39,8 @@ manual_screen_draw :: (app: *InnerBreeze) {
sun_manual_draw(app)
case EXERCISE_PATTERNS;
patterns_manual_draw(app)
case EXERCISE_ASTRAL_PROJECTION;
AstralManualDraw(app)
case;
whm_manual_draw(app)
}
+14 -3
View File
@@ -357,18 +357,29 @@ practice_screen_draw_home_tabs :: (app: *InnerBreeze, bounds: Rectangle) {
practice_select_home_card(app, choice)
}
// A swipe moves through every listed practice in the tabs' order: past a
// tab's last practice it goes on to the next tab, and from the last tab back
// to the first.
practice_next_ordered :: (app: *InnerBreeze, dir: s32) -> s32 {
if app == null {
return EXERCISE_WIM_HOF
}
current := practice_clamp_id(app.exercise_type)
ids: [EXERCISE_COUNT]s32
total := practice_home_ids(ids[:])
total: s32 = 0
for slot: cast(s32)0..PRACTICE_HOME_KIND_COUNT - 1 {
total += practice_kind_ids(practice_home_kinds[slot], ids[total:])
}
if total <= 0 {
return current
}
next_index := (practice_ordered_index(app, current) + dir + total * 2) % total
return ids[next_index]
at: s32 = 0
for index: cast(s32)0..total - 1 {
if ids[index] == current {
at = index
}
}
return ids[(at + dir + total * 2) % total]
}
practice_home_count :: (app: *InnerBreeze) -> s32 {
+2 -2
View File
@@ -187,7 +187,7 @@ setting_key_importable :: (key: string) -> s32 {
import_custom_audio_key(key, "audio_custom_music_") {
return 1
}
keys: [107]string = .[
keys: [108]string = .[
"launcher_favorite_count", "launcher_favorite_0", "launcher_favorite_1",
"speed", "max_rounds", "max_breaths", "pause_seconds",
"sound_volume", "music_volume", "voice_narration_enabled", "guide_narration_enabled", "guide_narration_muted", "audio_cue_breath_in",
@@ -202,7 +202,7 @@ setting_key_importable :: (key: string) -> s32 {
"double_tap_to_breathe", "advanced_session_controls", "exercise_type", "practice_order",
"sun_salutation_character", "sun_salutation_repetitions", "sun_salutation_start_seconds",
"sun_salutation_end_seconds", "sun_salutation_voice", "tai_chi_character", "tai_chi_view", "tai_chi_voice", "tai_chi_item", "tai_chi_progress", "tai_chi_habit_made",
"sun_salutation_narration_language", "tai_chi_narration_language",
"sun_salutation_narration_language", "tai_chi_narration_language", "astral_projection_narration_language",
"meditation_duration_mode", "meditation_custom_minutes",
"meditation_show_extend_controls", "meditation_interval_bell",
"meditation_music_track", "practice_music_mask",
+21
View File
@@ -188,6 +188,27 @@ with tempfile.TemporaryDirectory(prefix='inbe-downloads-ui-') as temporary:
next_card()
driver.wait(contains=name)
assert buttons('Start Practice') and not buttons('Install'), (name, screen_text())
# Every meditation practice has How to and Customize.
assert buttons('How to') and buttons('Customize'), (name, screen_text())
# Astral Projection's Customize offers its music and narration, in its
# one voice, and How to explains the session.
driver.press(label='Customize', role='button')
driver.wait(label='Background music')
assert driver.find(label='Voice narration'), screen_text()
assert not driver.find(label='Male voice', role='button'), screen_text()
driver.press(label='Back', role='button')
driver.wait(label='Start Practice', role='button')
driver.press(label='How to', role='button')
driver.wait(contains='Lie down somewhere quiet')
driver.press(label='Back', role='button')
driver.wait(label='Start Practice', role='button')
# A swipe past a tab's last practice goes on to the next tab.
title = driver.find(contains='Astral Projection', visible=True)[0]
x, y = UiDriver.center(title)
driver.drag((x + 120, y - 140), (x - 120, y - 140), steps=8)
driver.wait_idle(frames=3)
driver.wait(contains='Sun Salutation')
assert selected_tab() == 'Yoga', home_tabs()
# Yoga offers Sun Salutation to install, with its size, and no Start.
select_tab('Yoga')
driver.wait(contains='Sun Salutation')