Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0912d29f0 | ||
|
|
a6648a51d1 | ||
|
|
37cee8b105 | ||
|
|
c766b84796 | ||
|
|
663ad10fba | ||
|
|
1072d38690 | ||
|
|
fd1ac9403b | ||
|
|
43286f23c9 | ||
|
|
c2f63faee6 | ||
|
|
081357578b | ||
|
|
a047d036f3 | ||
|
|
cdd14267f2 | ||
|
|
6ab4bd6e61 | ||
|
|
376c2ee40b | ||
|
|
779699ac43 | ||
|
|
ce01d33aac | ||
|
|
807aa54166 | ||
|
|
96de9c2492 | ||
|
|
117e75c158 | ||
|
|
8f556fd5a5 | ||
|
|
2807328b00 | ||
|
|
77c4078b9f | ||
|
|
ed4f1f4d82 | ||
|
|
41aab988cb | ||
|
|
04c8ea1e82 | ||
|
|
ef325ed4af | ||
|
|
0ce5f1ecd5 | ||
|
|
57a93fb1a2 | ||
|
|
3fac68a0c5 | ||
|
|
194c98327e | ||
|
|
1ece2a38f4 | ||
|
|
8d5fa97bc4 | ||
|
|
f5488096d4 | ||
|
|
200be33406 | ||
|
|
c83544e512 | ||
|
|
26b3845a01 | ||
|
|
6928984362 | ||
|
|
bebdbbbd38 | ||
|
|
f5e643b096 | ||
|
|
513c2822ae | ||
|
|
7170bdef0b | ||
|
|
75e01ce333 | ||
|
|
92dc51e7a8 | ||
|
|
a8c3ec5166 | ||
|
|
bd42b9f151 | ||
|
|
22e7a9eafc | ||
|
|
4b90c5a079 | ||
|
|
9f08f2ad4b | ||
|
|
e9e2862b13 | ||
|
|
d50369a777 | ||
|
|
896b122c9f | ||
|
|
5feb0c44fe | ||
|
|
95b6553a6f | ||
|
|
c4d2a92448 | ||
|
|
61bd0a9ea4 | ||
|
|
89de246311 | ||
|
|
c169a4c6ad | ||
|
|
861ca9ad2e | ||
|
|
cda90a0617 | ||
|
|
9d49f9ce57 | ||
|
|
30fc4584c3 | ||
|
|
cf593bf554 | ||
|
|
c0f2939c9f | ||
|
|
ea800cd672 | ||
|
|
76ea43832c | ||
|
|
c50d857cba | ||
|
|
09c87a8d9a | ||
|
|
ea8604392b | ||
|
|
c02d6ae02a | ||
|
|
12637cc7ef | ||
|
|
f4c753b2f4 | ||
|
|
9a231007f1 | ||
|
|
1ad4e8ee78 | ||
|
|
ed1993bff8 | ||
|
|
7ff89fd78b | ||
|
|
801f49d470 | ||
|
|
7bf9c1859d | ||
|
|
689d08eefa | ||
|
|
60eb87f5f1 | ||
|
|
784d14ac2e | ||
|
|
4db5c1dcf7 | ||
|
|
4eb7b5f19b | ||
|
|
b07aeced88 | ||
|
|
8eb52b6515 | ||
|
|
1d219ca706 | ||
|
|
6f6b7a09e1 | ||
|
|
c39d54b42a | ||
|
|
4a83138cb7 | ||
|
|
0fbd274f4d | ||
|
|
1f21d4d3af | ||
|
|
d92c06a0b4 | ||
|
|
e416d9419a | ||
|
|
5157746aca | ||
|
|
4993ad48e4 | ||
|
|
efd8de98cd | ||
|
|
a5729306ae | ||
|
|
d6373dab29 | ||
|
|
91a250a9be | ||
|
|
22d2b0916d | ||
|
|
6a1d83f8f8 | ||
|
|
ced92152e1 | ||
|
|
22c309e5e6 | ||
|
|
b4922b5c35 | ||
|
|
e455f5c40c | ||
|
|
7fbdfc5c49 | ||
|
|
d78af1d5b9 | ||
|
|
9d3844820f | ||
|
|
1d01a8aa32 | ||
|
|
e5af624e3d | ||
|
|
fe2f9209c6 | ||
|
|
189227f3a1 | ||
|
|
58c33a90d6 | ||
|
|
5a38c6953e | ||
|
|
fcd134a8e1 | ||
|
|
158c66d588 | ||
|
|
14d801fb11 | ||
|
|
93941b5c6a | ||
|
|
62641a2b41 | ||
|
|
ee94071509 | ||
|
|
9770dd6b4c | ||
|
|
8c82f35493 | ||
|
|
71d0e24c39 | ||
|
|
0ceebd055e | ||
|
|
6555f85769 | ||
|
|
6b40d00b5b | ||
|
|
54cfd0e5e6 | ||
|
|
50674fefd6 | ||
|
|
f6dbfc373a | ||
|
|
f5397afcd6 | ||
|
|
47ff302a0f | ||
|
|
dbe2e2fc6a | ||
|
|
ab662be647 | ||
|
|
0341d983d1 | ||
|
|
b2a8b34df1 | ||
|
|
3b73ae0cb4 | ||
|
|
ddf4671297 | ||
|
|
83489725ed | ||
|
|
7fb258f5d5 | ||
|
|
fff3469944 | ||
|
|
731abd410b | ||
|
|
8fd4efb642 | ||
|
|
adf8352e92 | ||
|
|
706a8a0797 | ||
|
|
d068a8b8e0 | ||
|
|
024b16e36b | ||
|
|
16e4ec2711 | ||
|
|
7ce19c045f | ||
|
|
a2e5a594cd | ||
|
|
ec53dd02af | ||
|
|
8d92924849 | ||
|
|
407681fada | ||
|
|
6a3d3f3559 | ||
|
|
ab59ab6b83 | ||
|
|
321afdd465 | ||
|
|
c2f7d75258 | ||
|
|
eba69651a9 | ||
|
|
8fe47c8a32 | ||
|
|
81032a9dcc | ||
|
|
2be97ca801 | ||
|
|
324d18fdfb | ||
|
|
6889777cff | ||
|
|
ea78b73c86 | ||
|
|
1e5768f6b4 | ||
|
|
612f431376 | ||
|
|
f13a88b94e | ||
|
|
e7d9843e94 | ||
|
|
ae438d7c14 | ||
|
|
879f058d7a | ||
|
|
f208429e08 | ||
|
|
827780347b | ||
|
|
791ca2eba9 | ||
|
|
7d3d4d588b | ||
|
|
eec36173c8 | ||
|
|
a21bc16bcd | ||
|
|
79a9f92e35 | ||
|
|
fc77fa2aea | ||
|
|
e21f49cf4d | ||
|
|
a9f2cbb464 | ||
|
|
a0b86526a2 | ||
|
|
d39f908ddb | ||
|
|
cb8cbf4ca7 | ||
|
|
077e400e38 | ||
|
|
050eee00ae | ||
|
|
212160a48a | ||
|
|
96b479b99f | ||
|
|
19570e4b1c | ||
|
|
fc8c583eee | ||
|
|
2612192889 | ||
|
|
ce26a3d2a3 | ||
|
|
b8b1bc9989 | ||
|
|
16a5a33091 | ||
|
|
dac27ce0d8 | ||
|
|
44e70de7d1 | ||
|
|
7c3318ff72 | ||
|
|
170ecc851a | ||
|
|
c0a9484d7e | ||
|
|
310a822ea5 | ||
|
|
f3a437a165 | ||
|
|
f2dbd32df4 | ||
|
|
66cb62b4d3 | ||
|
|
e9c1945511 | ||
|
|
dd7d05fa28 | ||
|
|
ace95aa97c | ||
|
|
b2cca9395c | ||
|
|
548217c10d | ||
|
|
d674586fe9 | ||
|
|
7f48edf8f6 | ||
|
|
18bff54ec5 | ||
|
|
764a652e1c | ||
|
|
d41a12503e | ||
|
|
8f728d97bb | ||
|
|
e43973882e | ||
|
|
1e8976c0d4 | ||
|
|
90adc96782 | ||
|
|
4f1950c488 | ||
|
|
bc27c72034 | ||
|
|
3f7054fe40 | ||
|
|
48a3a78049 | ||
|
|
b9ee0287f5 | ||
|
|
dec0a05dd0 | ||
|
|
6ad78bd288 | ||
|
|
bb40a2822d | ||
|
|
f189300079 | ||
|
|
77f880f3ed | ||
|
|
163bbeaa8c | ||
|
|
54a6016976 | ||
|
|
11add452e2 | ||
|
|
aaf7019067 | ||
|
|
2829f237a1 |
No files matched your search
@@ -0,0 +1,12 @@
|
||||
build-essential
|
||||
ca-certificates
|
||||
curl
|
||||
libcurl4-openssl-dev
|
||||
libdrm-dev
|
||||
libegl1-mesa-dev
|
||||
libgbm-dev
|
||||
libgles2-mesa-dev
|
||||
libsdl2-dev
|
||||
patchelf
|
||||
pkg-config
|
||||
zip
|
||||
@@ -1,106 +0,0 @@
|
||||
name: Android Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build Release APK
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x droid/gradlew
|
||||
|
||||
- name: Create keystore directory
|
||||
run: mkdir -p ~/.android
|
||||
|
||||
- name: Decode Keystore
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
echo "$KEYSTORE_BASE64" | base64 -d > ~/.android/inbe-release.keystore
|
||||
echo "Keystore decoded successfully"
|
||||
|
||||
- name: Copy Assets to Android Project
|
||||
run: ./scripts/copy-android-assets.sh
|
||||
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
- name: Build Release APK
|
||||
working-directory: ./droid
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
run: |
|
||||
./gradlew assembleRelease \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
-Pkeystore.path="/home/runner/.android/inbe-release.keystore" \
|
||||
--stacktrace
|
||||
|
||||
- name: Rename APK
|
||||
run: |
|
||||
VERSION=$(grep "versionName" droid/app/build.gradle | awk '{print $2}' | tr -d '"')
|
||||
find droid/app/build/outputs/apk/release -name "*-universal-release.apk" -exec cp {} inbe-$VERSION.apk \; 2>/dev/null || true
|
||||
|
||||
- name: Upload APK to Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-apk
|
||||
path: inbe-*.apk
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Create and Push Tag (if new version)
|
||||
id: tag_version
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
VERSION=$(grep "versionName" droid/app/build.gradle | awk '{print $2}' | tr -d '"')
|
||||
TAG="v$VERSION"
|
||||
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
||||
echo "Tag $TAG exists, skipping"
|
||||
echo "tag_pushed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git tag -a "$TAG" -m "Release $VERSION"
|
||||
git push origin "$TAG"
|
||||
echo "tag_pushed=true" >> $GITHUB_OUTPUT
|
||||
echo "tag_name=$TAG" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Create GitHub Release
|
||||
if: steps.tag_version.outputs.tag_pushed == 'true'
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ steps.tag_version.outputs.tag_name }}
|
||||
files: inbe-*.apk
|
||||
generate_release_notes: true
|
||||
draft: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,72 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Test Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential zlib1g-dev
|
||||
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
build-chrome-extension:
|
||||
name: Build Chrome Extension
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Web Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential zlib1g-dev zip
|
||||
|
||||
- name: Set up Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
|
||||
"$HOME/emsdk/emsdk" install latest
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build Chrome Extension ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
make package-unpackaged-assets
|
||||
make chrome-web-store
|
||||
test -f build/dist/inbe-chrome-web-store.zip
|
||||
@@ -0,0 +1,322 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Test Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential zlib1g-dev
|
||||
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
build-web:
|
||||
name: Build Web and Chrome Extension
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Web Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential zlib1g-dev zip
|
||||
|
||||
- name: Set up Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
|
||||
"$HOME/emsdk/emsdk" install latest
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build Web ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
make package-unpackaged-assets
|
||||
make web
|
||||
make chrome-web-store
|
||||
mkdir -p build/release/web
|
||||
cp build/dist/inbe-web.zip build/release/web/
|
||||
cp build/dist/inbe-chrome-web-store.zip build/release/web/
|
||||
|
||||
- name: Upload Web Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-web
|
||||
path: build/release/web/*
|
||||
if-no-files-found: error
|
||||
|
||||
build-linux:
|
||||
name: Build Linux
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
env:
|
||||
APT_CACHE_DIR: /tmp/apt-cache
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Linux apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIR }}
|
||||
key: linux-apt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/apt/linux-packages.txt') }}
|
||||
restore-keys: |
|
||||
linux-apt-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Linux Dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t packages < .github/apt/linux-packages.txt
|
||||
mkdir -p "$APT_CACHE_DIR/partial"
|
||||
sudo apt-get update
|
||||
sudo apt-get \
|
||||
-o Dir::Cache::archives="$APT_CACHE_DIR" \
|
||||
install -y "${packages[@]}"
|
||||
sudo chown -R "$USER:$USER" "$APT_CACHE_DIR"
|
||||
|
||||
- name: Install AppImage Tools
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
curl -L -o "$HOME/.local/bin/linuxdeploy" \
|
||||
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
curl -L -o "$HOME/.local/bin/linuxdeploy-plugin-appimage" \
|
||||
https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-appimage-x86_64.AppImage
|
||||
curl -L -o "$HOME/.local/bin/appimagetool" \
|
||||
https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x "$HOME/.local/bin/linuxdeploy" "$HOME/.local/bin/linuxdeploy-plugin-appimage" "$HOME/.local/bin/appimagetool"
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build Linux AppImage
|
||||
env:
|
||||
APPIMAGE_EXTRACT_AND_RUN: "1"
|
||||
RAY_RAYLIB_CONFIG: -DSUPPORT_SCREEN_CAPTURE=0 -DSUPPORT_COMPRESSION_API=0 -DSUPPORT_AUTOMATION_EVENTS=0 -DSUPPORT_CLIPBOARD_IMAGE=0 -DSUPPORT_FILEFORMAT_BMP=0 -DSUPPORT_FILEFORMAT_GIF=0 -DSUPPORT_FILEFORMAT_QOI=0 -DSUPPORT_FILEFORMAT_DDS=0 -DSUPPORT_FILEFORMAT_TTF=0
|
||||
run: |
|
||||
set -euo pipefail
|
||||
RAY_SDL_INCLUDE_DIR="$(pkg-config --variable=includedir sdl2 | sed 's,/SDL2$,,')"
|
||||
RAY_CFLAGS="$(pkg-config --cflags sdl2 libdrm gbm egl glesv2)"
|
||||
RAY_LDLIBS="$(pkg-config --libs sdl2 libdrm gbm egl glesv2)"
|
||||
RAY_SDL_LDLIBS="$(pkg-config --libs sdl2)"
|
||||
export RAY_SDL_INCLUDE_DIR RAY_CFLAGS RAY_LDLIBS RAY_SDL_LDLIBS
|
||||
make appimage
|
||||
mkdir -p build/release/linux
|
||||
find build/dist/linux -maxdepth 1 -type f -name '*.AppImage' -exec cp {} build/release/linux/ \;
|
||||
test -n "$(find build/release/linux -type f -print -quit)"
|
||||
|
||||
- name: Upload Linux Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-linux
|
||||
path: build/release/linux/*
|
||||
if-no-files-found: error
|
||||
|
||||
build-windows:
|
||||
name: Build Windows
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Windows Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
gcc-mingw-w64-i686-win32 \
|
||||
gcc-mingw-w64-x86-64-win32 \
|
||||
zlib1g-dev \
|
||||
zip
|
||||
if [ -x /usr/bin/x86_64-w64-mingw32-gcc-win32 ]; then
|
||||
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-win32
|
||||
fi
|
||||
if [ -x /usr/bin/i686-w64-mingw32-gcc-win32 ]; then
|
||||
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-win32
|
||||
fi
|
||||
|
||||
- name: Build Windows ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
make windows
|
||||
mkdir -p build/release/windows
|
||||
find build/dist/windows -maxdepth 1 -type f -name '*.zip' -exec cp {} build/release/windows/ \;
|
||||
test -n "$(find build/release/windows -type f -print -quit)"
|
||||
|
||||
- name: Upload Windows Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-windows
|
||||
path: build/release/windows/*
|
||||
if-no-files-found: error
|
||||
|
||||
build-android:
|
||||
name: Build Android
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Install Android SDK Components
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SDKMANAGER="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
|
||||
yes | "$SDKMANAGER" --licenses >/dev/null || true
|
||||
"$SDKMANAGER" "platforms;android-35" "build-tools;34.0.0" "ndk;25.1.8937393" "cmake;3.22.1"
|
||||
|
||||
- name: Prepare Android signing key
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p ~/.android
|
||||
echo "$KEYSTORE_BASE64" | base64 -d > ~/.android/inbe-release.keystore
|
||||
|
||||
- name: Copy Android Assets
|
||||
run: ./scripts/copy-android-assets.sh
|
||||
|
||||
- name: Build Android APK
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
chmod +x droid/gradlew
|
||||
./droid/gradlew -p droid assembleRelease \
|
||||
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
|
||||
-Pkeystore.alias="$KEY_ALIAS" \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
--stacktrace
|
||||
make android-copy-release-apks
|
||||
|
||||
- name: Collect Android Release Files
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p build/release/android
|
||||
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Could not read INBE_VERSION_STRING"
|
||||
exit 1
|
||||
fi
|
||||
cp "build/android/inbe-$VERSION.apk" build/release/android/
|
||||
|
||||
- name: Upload Android Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-android
|
||||
path: build/release/android/*
|
||||
if-no-files-found: error
|
||||
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-web
|
||||
- build-linux
|
||||
- build-windows
|
||||
- build-android
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download Release Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: release-*
|
||||
path: build/release
|
||||
merge-multiple: true
|
||||
|
||||
- name: Verify Release Artifacts
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -n "$(find build/release -type f -print -quit)"
|
||||
|
||||
- name: Create and Push Tag If Version Is New
|
||||
id: tag_version
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Could not read INBE_VERSION_STRING"
|
||||
exit 1
|
||||
fi
|
||||
TAG="v$VERSION"
|
||||
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
||||
echo "Tag $TAG exists, skipping release"
|
||||
echo "tag_pushed=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git tag -a "$TAG" -m "Release $VERSION"
|
||||
git push origin "$TAG"
|
||||
echo "tag_pushed=true" >> "$GITHUB_OUTPUT"
|
||||
echo "tag_name=$TAG" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create GitHub Release
|
||||
if: steps.tag_version.outputs.tag_pushed == 'true'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ steps.tag_version.outputs.tag_name }}
|
||||
files: build/release/*
|
||||
generate_release_notes: true
|
||||
draft: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -12,12 +12,15 @@
|
||||
.cache/
|
||||
*.wasm
|
||||
build/
|
||||
tmp/
|
||||
vendor-builds/
|
||||
node_modules
|
||||
*.nix-defexpr
|
||||
*.npm
|
||||
*.nix-profile
|
||||
.claude.json
|
||||
.bash_history
|
||||
.env
|
||||
|
||||
|
||||
*.exe
|
||||
|
||||
@@ -10,3 +10,9 @@
|
||||
[submodule "vendor/sqlite"]
|
||||
path = vendor/sqlite
|
||||
url = https://github.com/sqlite/sqlite
|
||||
[submodule "vendor/liboqs"]
|
||||
path = vendor/liboqs
|
||||
url = https://github.com/open-quantum-safe/liboqs.git
|
||||
[submodule "vendor/curl"]
|
||||
path = vendor/curl
|
||||
url = https://github.com/curl/curl.git
|
||||
@@ -1,8 +1,79 @@
|
||||
# Changelog
|
||||
## [1.4.6] - 2026-06-20
|
||||
### Changed
|
||||
- Move habit weekly, monthly, statistics, and edit views into icon tabs under the habit selector.
|
||||
- Improve Flint form, modal, tab, and scrollbar widgets for measured layouts and cleaner scrolling.
|
||||
|
||||
### Fixed
|
||||
- Prevent habit info modal text from overlapping the OK button.
|
||||
|
||||
## [1.4.5] - 2026-06-20
|
||||
### Changed
|
||||
- Fix spacing issues and translations
|
||||
|
||||
## [1.4.4] - 2026-06-20
|
||||
### Added
|
||||
- Add Russian localization.
|
||||
- Add a habit stats view with streak, recent activity, weekday, and linked-practice diagrams.
|
||||
- Add optional in-session volume controls, hidden by default.
|
||||
- Add Mint and Cobalt themes.
|
||||
|
||||
### Changed
|
||||
- Use one canonical pixel font atlas with Flint-managed DPI scaling and cleaner title sizing.
|
||||
- Simplify habit counting so multiple counts are opt-in and independent of linked practices.
|
||||
- Improve habit weekly/calendar spacing, mobile calendar touch feedback, and theme picker ordering.
|
||||
- Reorganize repeated screen UI into reusable Flint helpers.
|
||||
|
||||
### Fixed
|
||||
- Build the Ubuntu Touch Click package with the OpenStore package id
|
||||
- Refactor code base
|
||||
- Sync habit multiple-count settings correctly across clients and preserve queued local habit edits.
|
||||
- Preserve linked session day behavior while hiding redundant count badges.
|
||||
|
||||
## [1.4.3] - 2026-06-20
|
||||
### Fixed
|
||||
- Refresh expired native sync auth tokens before sending queued changes.
|
||||
- Require first-time meditation users to continue through the tutorial before starting.
|
||||
|
||||
## [1.4.2] - 2026-06-20
|
||||
### Fixed
|
||||
- Improve sync auth, websocket reconnects, and queued habit/session updates.
|
||||
- Reduce SQLite-related UI flicker and speed up bulk import sync queueing.
|
||||
- Fixed dropdown menus so temporary option lists cannot crash theme/device selection.
|
||||
- Fixed Linux test and release builds to link against the vendored curl library path.
|
||||
|
||||
## [1.4.1] - 2026-06-19
|
||||
### Changed
|
||||
- Improve account management
|
||||
|
||||
## [1.4.0] - 2026-06-19
|
||||
### Added
|
||||
- optional sync client, offline account creation
|
||||
- simplify tutorial
|
||||
|
||||
## [1.3.6] - 2026-06-18
|
||||
### Fixed
|
||||
- Fixed Tickmate `.db` imports so zero-based months map correctly and long habit histories load without dropping later dates.
|
||||
|
||||
## [1.3.5] - 2026-06-18
|
||||
### Fixed
|
||||
- Improved Android data import for `.db` backups, weekly habit rows, and import conflict handling.
|
||||
|
||||
## [1.3.4] - 2026-06-18
|
||||
### Changed
|
||||
- Reorganized WHM and Meditation into practice-owned modules for cleaner code boundaries.
|
||||
- Split the meditation manual into an image intro page and a shorter music/gong setup page.
|
||||
- Expanded release automation to build Web, Linux AppImage, Windows, APK, and AAB artifacts after tests pass.
|
||||
|
||||
## [1.3.3] - 2026-06-17
|
||||
### Fixed
|
||||
- Import now restores habits, habit sync settings, and optionally app settings from Inbe SQLite exports.
|
||||
|
||||
## [1.3.2] - 2026-06-17
|
||||
### Fixed
|
||||
- Unified scroll containers so content stays out of scrollbar tracks and scroll positions clamp cleanly at the bottom.
|
||||
- Android meditation audio downloads now show a localized network-permission/connectivity modal when the host cannot be resolved.
|
||||
- Windows builds now support runtime meditation audio downloads.
|
||||
|
||||
## [1.3.1] - 2026-06-17
|
||||
### Fixed
|
||||
|
||||
@@ -6,6 +6,7 @@ ANDROID_APP_ID := xyz.waozi.inbe
|
||||
ANDROID_ACTIVITY := xyz.waozi.inbe.MainActivity
|
||||
|
||||
CC ?= gcc
|
||||
CMAKE ?= $(shell if [ -x /usr/bin/cmake ]; then echo /usr/bin/cmake; else command -v cmake; fi)
|
||||
GRADLE ?= gradle
|
||||
ARCH := $(shell uname -m)
|
||||
ANDROID_KEYSTORE ?= $(HOME)/.android/flint-release.keystore
|
||||
@@ -15,6 +16,7 @@ BUILD_DIR := build
|
||||
BUILD_OBJ_DIR := $(BUILD_DIR)/obj
|
||||
BUILD_BIN_DIR := $(BUILD_DIR)/bin
|
||||
BUILD_DIST_DIR := $(BUILD_DIR)/dist
|
||||
VENDOR_BUILD_DIR := vendor-builds
|
||||
LINUX_OBJ_DIR := $(BUILD_OBJ_DIR)/linux
|
||||
LINUX_BIN_DIR := $(BUILD_BIN_DIR)/linux
|
||||
LINUX_DIST_DIR := $(BUILD_DIST_DIR)/linux
|
||||
@@ -24,80 +26,163 @@ LINUX_APPIMAGE_DIR := packaging/linux/appimage
|
||||
LINUX_APPIMAGE_APPRUN := $(LINUX_APPIMAGE_DIR)/AppRun
|
||||
LINUX_APPIMAGE_DESKTOP := $(LINUX_APPIMAGE_DIR)/$(APP_NAME).desktop
|
||||
LINUX_APPIMAGE_ICON := $(LINUX_APPIMAGE_DIR)/$(APP_NAME).png
|
||||
LINUX_APPIMAGE_APPDATA := $(LINUX_APPIMAGE_DIR)/$(APP_NAME).appdata.xml
|
||||
CLICK_PACKAGE ?= inbe
|
||||
CLICK_TITLE ?= $(APP_TITLE)
|
||||
CLICK_MAINTAINER ?= Waozi Project <[email protected]>
|
||||
CLICK_ARCH ?= arm64
|
||||
CLICK_FRAMEWORK ?= ubuntu-sdk-20.04
|
||||
CLICK_POLICY_VERSION ?= 20.04
|
||||
CLICK_INCLUDE_METAINFO ?= 0
|
||||
CLICK_DIR := packaging/click
|
||||
CLICK_MANIFEST_TEMPLATE := $(CLICK_DIR)/manifest.json.in
|
||||
CLICK_CONTROL_TEMPLATE := $(CLICK_DIR)/control.in
|
||||
CLICK_APPARMOR_TEMPLATE := $(CLICK_DIR)/inbe.apparmor.in
|
||||
CLICK_DESKTOP_TEMPLATE := $(CLICK_DIR)/inbe.desktop.in
|
||||
CLICK_METAINFO_TEMPLATE := $(CLICK_DIR)/inbe.metainfo.xml.in
|
||||
CLICK_RUNNER := $(CLICK_DIR)/run-inbe.sh
|
||||
CLICK_BUILD_DIR := $(BUILD_OBJ_DIR)/click/$(CLICK_ARCH)
|
||||
CLICK_ROOT := $(CLICK_BUILD_DIR)/$(CLICK_PACKAGE)
|
||||
CLICK_CONTROL_DIR := $(CLICK_BUILD_DIR)/control
|
||||
CLICK_BIN_DIR := $(BUILD_BIN_DIR)/click/$(CLICK_ARCH)
|
||||
CLICK_DIST_DIR := $(BUILD_DIST_DIR)/click
|
||||
CLICK_TARGET = $(CLICK_DIST_DIR)/$(CLICK_PACKAGE)_$(APP_VERSION)_$(CLICK_ARCH).click
|
||||
CLICK_BIN := $(CLICK_BIN_DIR)/$(APP_NAME)
|
||||
CLICK_BIN_INPUT := $(if $(strip $(CLICK_BIN_SOURCE)),$(CLICK_BIN_SOURCE),$(CLICK_BIN))
|
||||
CLICK_RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/raylib
|
||||
CLICK_RAYLIB_A := $(CLICK_RAYLIB_BUILD_DIR)/libraylib.a
|
||||
CLICK_PATCHELF_INTERPRETER ?= /lib/ld-linux-aarch64.so.1
|
||||
CLICK_RUNTIME_LIBS ?= $(AARCH64_CLICK_RUNTIME_LIBS)
|
||||
WINDOWS_OBJ_DIR := $(BUILD_OBJ_DIR)/windows
|
||||
WINDOWS_BIN_DIR := $(BUILD_BIN_DIR)/windows
|
||||
WINDOWS_DIST_DIR := $(BUILD_DIST_DIR)/windows
|
||||
ANDROID_BUILD_DIR := $(BUILD_DIR)/android
|
||||
WEB_OBJ_DIR := $(BUILD_OBJ_DIR)/web
|
||||
WEB_DIST_DIR := $(BUILD_DIST_DIR)/web
|
||||
CHROME_WEB_STORE_DIR := $(BUILD_DIST_DIR)/chrome-web-store
|
||||
VERSION_FILE := src/core/version.h
|
||||
APP_VERSION := $(shell sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' $(VERSION_FILE) 2>/dev/null)
|
||||
|
||||
RAYLIB_DIR := vendor/raylib/src
|
||||
RAYLIB_BUILD_DIR := $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib
|
||||
RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/linux/$(ARCH)/raylib
|
||||
RAYLIB_A := $(RAYLIB_BUILD_DIR)/libraylib.a
|
||||
WIN64_ARCH := x86_64
|
||||
WIN64_CC ?= $(or $(WIN_CC),x86_64-w64-mingw32-gcc)
|
||||
WIN64_AR ?= $(or $(WIN_AR),x86_64-w64-mingw32-ar)
|
||||
WIN64_RANLIB ?= $(or $(WIN_RANLIB),x86_64-w64-mingw32-ranlib)
|
||||
WIN64_STRIP ?= $(or $(WIN_STRIP),x86_64-w64-mingw32-strip)
|
||||
WIN64_CC_PATH := $(shell command -v $(WIN64_CC) 2>/dev/null || printf '%s' $(WIN64_CC))
|
||||
WIN64_AR_PATH := $(shell command -v $(WIN64_AR) 2>/dev/null || printf '%s' $(WIN64_AR))
|
||||
WIN64_RANLIB_PATH := $(shell command -v $(WIN64_RANLIB) 2>/dev/null || printf '%s' $(WIN64_RANLIB))
|
||||
WIN32_ARCH := i686
|
||||
WIN32_CC ?= i686-w64-mingw32-gcc
|
||||
WIN32_AR ?= i686-w64-mingw32-ar
|
||||
WIN32_RANLIB ?= i686-w64-mingw32-ranlib
|
||||
WIN32_STRIP ?= i686-w64-mingw32-strip
|
||||
WIN64_RAYLIB_BUILD_DIR := $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib
|
||||
WIN32_CC_PATH := $(shell command -v $(WIN32_CC) 2>/dev/null || printf '%s' $(WIN32_CC))
|
||||
WIN32_AR_PATH := $(shell command -v $(WIN32_AR) 2>/dev/null || printf '%s' $(WIN32_AR))
|
||||
WIN32_RANLIB_PATH := $(shell command -v $(WIN32_RANLIB) 2>/dev/null || printf '%s' $(WIN32_RANLIB))
|
||||
WIN64_RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib
|
||||
WIN64_RAYLIB_A := $(WIN64_RAYLIB_BUILD_DIR)/libraylib.a
|
||||
WIN32_RAYLIB_BUILD_DIR := $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib
|
||||
WIN32_RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/raylib
|
||||
WIN32_RAYLIB_A := $(WIN32_RAYLIB_BUILD_DIR)/libraylib.a
|
||||
WEB_RAYLIB_BUILD_DIR := $(WEB_OBJ_DIR)/raylib
|
||||
WIN64_CURL_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/curl
|
||||
WIN64_CURL_INCLUDE_DIR := $(WIN64_CURL_BUILD_DIR)/include
|
||||
WIN64_CURL_A := $(WIN64_CURL_BUILD_DIR)/lib/libcurl.a
|
||||
WIN32_CURL_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/curl
|
||||
WIN32_CURL_INCLUDE_DIR := $(WIN32_CURL_BUILD_DIR)/include
|
||||
WIN32_CURL_A := $(WIN32_CURL_BUILD_DIR)/lib/libcurl.a
|
||||
WEB_RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/web/raylib
|
||||
WEB_RAYLIB_A := $(WEB_RAYLIB_BUILD_DIR)/libraylib.web.a
|
||||
RAYLIB_SOURCES := $(wildcard $(RAYLIB_DIR)/*.c) $(wildcard $(RAYLIB_DIR)/*.h)
|
||||
RAYLIB_SOURCES := $(shell find $(RAYLIB_DIR) -type f \( -name '*.c' -o -name '*.h' \))
|
||||
|
||||
FLINT_DIR := flint
|
||||
FLINT_ICON_FILES := $(wildcard $(FLINT_DIR)/icons/*.png)
|
||||
FLINT_ICON_ASSETS_C := $(FLINT_DIR)/src/flint_icon_assets.c
|
||||
FLINT_SRCS := $(filter-out $(FLINT_ICON_ASSETS_C),$(wildcard $(FLINT_DIR)/src/*.c)) $(FLINT_ICON_ASSETS_C)
|
||||
FLINT_SRCS := $(filter-out $(FLINT_ICON_ASSETS_C),$(wildcard $(FLINT_DIR)/src/*.c) $(wildcard $(FLINT_DIR)/src/ui/*.c)) $(FLINT_ICON_ASSETS_C)
|
||||
FLINT_WEB_SRCS := $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
|
||||
FLINT_WINDOWS_SRCS := $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
|
||||
FLINT_INCLUDE := -I$(FLINT_DIR)/include
|
||||
FLINT_CURL_CFLAGS ?= $(shell pkg-config --cflags libcurl 2>/dev/null || curl-config --cflags 2>/dev/null)
|
||||
FLINT_CURL_LDLIBS ?= $(shell pkg-config --libs libcurl 2>/dev/null || curl-config --libs 2>/dev/null)
|
||||
CURL_DIR := vendor/curl
|
||||
CURL_BUILD_DIR := $(VENDOR_BUILD_DIR)/linux/$(ARCH)/curl
|
||||
CURL_INCLUDE_DIR := $(CURL_BUILD_DIR)/include
|
||||
CURL_LIB_DIR := $(CURL_BUILD_DIR)/lib64
|
||||
CURL_SO := $(CURL_LIB_DIR)/libcurl.so
|
||||
CURL_PROTOCOL_CHECK := $(CURL_BUILD_DIR)/.protocols-ok
|
||||
OPENSSL_ROOT_DIR ?= $(shell pkg-config --variable=prefix openssl 2>/dev/null)
|
||||
OPENSSL_CMAKE_OPT := $(if $(strip $(OPENSSL_ROOT_DIR)),-DOPENSSL_ROOT_DIR=$(OPENSSL_ROOT_DIR),)
|
||||
OPENSSL_INCLUDE_CMAKE_OPT := $(if $(strip $(OPENSSL_INCLUDE_DIR)),-DOPENSSL_INCLUDE_DIR=$(OPENSSL_INCLUDE_DIR),)
|
||||
OPENSSL_SSL_CMAKE_OPT := $(if $(strip $(OPENSSL_SSL_LIBRARY)),-DOPENSSL_SSL_LIBRARY=$(OPENSSL_SSL_LIBRARY),)
|
||||
OPENSSL_CRYPTO_CMAKE_OPT := $(if $(strip $(OPENSSL_CRYPTO_LIBRARY)),-DOPENSSL_CRYPTO_LIBRARY=$(OPENSSL_CRYPTO_LIBRARY),)
|
||||
OPENSSL_LIB_DIR := $(patsubst %/,%,$(dir $(OPENSSL_SSL_LIBRARY)))
|
||||
OPENSSL_LDLIBS := $(if $(strip $(OPENSSL_SSL_LIBRARY) $(OPENSSL_CRYPTO_LIBRARY)),-Xlinker -rpath -Xlinker $(OPENSSL_LIB_DIR) $(OPENSSL_SSL_LIBRARY) $(OPENSSL_CRYPTO_LIBRARY),$(or $(shell pkg-config --libs openssl 2>/dev/null),-lssl -lcrypto))
|
||||
FLINT_CURL_CFLAGS := -I$(CURL_INCLUDE_DIR)
|
||||
FLINT_CURL_LDLIBS := -L$(CURL_LIB_DIR) -Wl,-rpath,$(abspath $(CURL_LIB_DIR)) -lcurl $(OPENSSL_LDLIBS)
|
||||
FLINT_CURL_VERSION_NUM ?= $(shell printf '%s\n' '#include <curl/curlver.h>' 'LIBCURL_VERSION_NUM' | $(CC) -I$(CURL_DIR)/include -E -P - 2>/dev/null | tail -n 1)
|
||||
FLINT_CURL_VERSION_HEX := $(patsubst 0x%,%,$(FLINT_CURL_VERSION_NUM))
|
||||
SQLITE_DIR := vendor/sqlite
|
||||
SQLITE_BUILD_DIR := $(BUILD_OBJ_DIR)/sqlite
|
||||
SQLITE_BUILD_DIR := $(VENDOR_BUILD_DIR)/sqlite
|
||||
SQLITE_AMALGAMATION_C := $(SQLITE_BUILD_DIR)/sqlite3.c
|
||||
SQLITE_AMALGAMATION_H := $(SQLITE_BUILD_DIR)/sqlite3.h
|
||||
SQLITE_SRC := $(SQLITE_AMALGAMATION_C)
|
||||
SQLITE_INCLUDE := -I$(SQLITE_BUILD_DIR)
|
||||
LIBOQS_DIR := vendor/liboqs
|
||||
LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/linux/$(ARCH)/liboqs
|
||||
LIBOQS_A := $(LIBOQS_BUILD_DIR)/lib/liboqs.a
|
||||
LIBOQS_INCLUDE := -I$(LIBOQS_BUILD_DIR)/include
|
||||
WEB_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/web/liboqs
|
||||
WEB_LIBOQS_A := $(WEB_LIBOQS_BUILD_DIR)/lib/liboqs.a
|
||||
WEB_LIBOQS_INCLUDE := -I$(WEB_LIBOQS_BUILD_DIR)/include
|
||||
TEST_BIN_DIR := $(BUILD_BIN_DIR)/tests
|
||||
STORAGE_IMPORT_TEST := $(TEST_BIN_DIR)/storage_import_test
|
||||
FLINT_TEXT_SCALING_TEST := $(TEST_BIN_DIR)/flint_text_scaling_test
|
||||
FLINT_RUNTIME_ASSET_CFLAGS := -DFLINT_HAS_LIBCURL=1 $(FLINT_CURL_CFLAGS)
|
||||
LOCALE_KEYS_TEST := $(TEST_BIN_DIR)/locale_keys_test
|
||||
SYNC_URL_TEST := $(TEST_BIN_DIR)/sync_url_test
|
||||
SYNC_ACCOUNT_TEST := $(TEST_BIN_DIR)/sync_account_test
|
||||
FLINT_RUNTIME_ASSET_CFLAGS := $(FLINT_CURL_CFLAGS)
|
||||
FLINT_RUNTIME_ASSET_LDLIBS := $(FLINT_CURL_LDLIBS)
|
||||
|
||||
APP_SRCS := \
|
||||
src/main.c \
|
||||
src/core/breath_engine.c \
|
||||
src/app/app.c \
|
||||
src/app/app_settings.c \
|
||||
src/app/device_preferences.c \
|
||||
src/session/session.c \
|
||||
src/practices/practice_registry.c \
|
||||
src/practices/whm/whm_practice.c \
|
||||
src/practices/whm/whm_session.c \
|
||||
src/practices/whm/whm_manual.c \
|
||||
src/practices/whm/whm_config.c \
|
||||
src/practices/meditation/meditation_practice.c \
|
||||
src/practices/meditation/meditation_session.c \
|
||||
src/practices/meditation/meditation_manual.c \
|
||||
src/practices/meditation/meditation_config.c \
|
||||
src/screens/habits_screen.c \
|
||||
src/session/meditation_music.c \
|
||||
src/core/locale.c \
|
||||
src/screens/statistics_screen.c \
|
||||
src/screens/habits/edit.c \
|
||||
src/screens/habits/session.c \
|
||||
src/practices/meditation/meditation_music.c \
|
||||
src/core/theme.c \
|
||||
src/storage/data.c \
|
||||
src/storage/db.c \
|
||||
src/storage/import.c \
|
||||
src/storage/storage.c \
|
||||
src/storage/sync_account.c \
|
||||
src/storage/sync_client.c \
|
||||
src/third_party/miniz.c \
|
||||
src/platform/android/android_device.c \
|
||||
src/screens/practice_screen.c \
|
||||
src/screens/language_screen.c \
|
||||
src/screens/manual_screen.c \
|
||||
src/screens/settings/settings_screen.c
|
||||
src/screens/settings/settings_screen.c \
|
||||
src/screens/settings/settings_device.c \
|
||||
src/screens/settings/settings_theme.c \
|
||||
src/screens/settings/settings_data.c \
|
||||
src/screens/settings/settings_sync_account.c
|
||||
|
||||
LOCALE_FILES := $(wildcard locales/*.txt)
|
||||
IMAGE_FILES := assets/whm/1.jpg assets/whm/2.jpg
|
||||
IMAGE_FILES := assets/practices/whm/1.jpg assets/practices/whm/2.jpg assets/practices/meditation/1.jpg
|
||||
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
|
||||
FONT_OUTPUTS := assets/fonts/locales.png assets/fonts/locales.dat assets/fonts/locales-8.png assets/fonts/locales-8.dat
|
||||
FONT_OUTPUTS := assets/fonts/locales.png assets/fonts/locales.dat
|
||||
OTFCHOP_DIR ?= vendor/otfchop
|
||||
FONT_TOOL := $(OTFCHOP_DIR)/otfchop
|
||||
FONT_SOURCE := $(OTFCHOP_DIR)/unifont-17.0.04.otf
|
||||
@@ -105,14 +190,15 @@ EMBEDDED_ASSETS_C := $(BUILD_OBJ_DIR)/$(APP_NAME)_embedded_assets.c
|
||||
EMBEDDED_ASSET_FILES := $(LOCALE_FILES) $(IMAGE_FILES) $(SOUND_FILES) $(FONT_OUTPUTS)
|
||||
SRC := $(APP_SRCS) $(EMBEDDED_ASSETS_C)
|
||||
|
||||
APP_INCLUDE := -Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/session -Isrc/storage -Isrc/platform/android -Isrc/third_party
|
||||
APP_INCLUDE := -Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party
|
||||
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=0,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=1
|
||||
CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DFLINT_EMBEDDED_ONLY=1 $(FLINT_RUNTIME_ASSET_CFLAGS)
|
||||
WINDOWS_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DFLINT_EMBEDDED_ONLY=1
|
||||
WEB_CFLAGS := $(filter-out -std=c99,$(CFLAGS)) -std=gnu99
|
||||
CLICK_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DFLINT_EMBEDDED_ONLY=1 $(AARCH64_FLINT_CURL_CFLAGS)
|
||||
LDFLAGS := -Wl,--gc-sections -s
|
||||
WINDOWS_LDFLAGS := -Wl,--gc-sections -static -static-libgcc -mwindows
|
||||
WINDOWS_LDLIBS := -lgdi32 -lwinmm -lopengl32 -luser32 -lshell32 -lole32 -lcomdlg32 -lcomctl32 -luuid -lm
|
||||
WINDOWS_LDLIBS := -lgdi32 -lwinmm -lopengl32 -luser32 -lshell32 -lole32 -lcomdlg32 -lcomctl32 -luuid -lwininet -lws2_32 -liphlpapi -lcrypt32 -lsecur32 -lbcrypt -ladvapi32 -lm
|
||||
ifneq ($(strip $(MCFGTHREADS)),)
|
||||
WIN64_THREAD_LDFLAGS := -L$(MCFGTHREADS)/lib
|
||||
else
|
||||
@@ -136,14 +222,27 @@ APPIMAGE_TARGET := $(LINUX_DIST_DIR)/$(APPIMAGE_NAME)
|
||||
LINUXDEPLOY ?= linuxdeploy
|
||||
WEB_CC ?= emcc
|
||||
WEB_AR ?= emar
|
||||
WEB_CACHE_BUSTER ?= $(shell git rev-parse --short HEAD 2>/dev/null || date +%s)
|
||||
WEB_CACHE_BUSTER ?= $(shell if git diff --quiet --ignore-submodules HEAD -- 2>/dev/null; then git rev-parse --short HEAD 2>/dev/null; else date +%s; fi)
|
||||
WEB_TARGET := $(WEB_DIST_DIR)/index.html
|
||||
WEB_BOOT_JS := src/web_boot.js
|
||||
WEB_DIST_ZIP := $(BUILD_DIST_DIR)/$(APP_NAME)-web.zip
|
||||
WEB_APP_URL ?= https://inbe.waozi.xyz/
|
||||
CHROME_WEB_STORE_ZIP := $(BUILD_DIST_DIR)/$(APP_NAME)-chrome-web-store.zip
|
||||
CHROME_WEB_STORE_MANIFEST := packaging/chrome-web-store/manifest.json
|
||||
CHROME_WEB_STORE_WORKER := packaging/chrome-web-store/service_worker.js
|
||||
CHROME_WEB_STORE_ICON_DIR := packaging/chrome-web-store/icons
|
||||
CHROME_WEB_STORE_ICONS := \
|
||||
$(CHROME_WEB_STORE_ICON_DIR)/icon-16.png \
|
||||
$(CHROME_WEB_STORE_ICON_DIR)/icon-32.png \
|
||||
$(CHROME_WEB_STORE_ICON_DIR)/icon-48.png \
|
||||
$(CHROME_WEB_STORE_ICON_DIR)/icon-128.png
|
||||
WEB_ASSET_FILES := $(shell find web-assets -type f 2>/dev/null)
|
||||
UNPACKAGED_AUDIO_DIR := unpackaged_assets/audio
|
||||
UNPACKAGED_AUDIO_FILES := $(shell find $(UNPACKAGED_AUDIO_DIR) -type f 2>/dev/null)
|
||||
MEDITATION_AUDIO_ZIP := web-assets/dl/inbe-meditation-audio-v1.zip
|
||||
|
||||
.PHONY: all native run test dist appimage clean clean-linux clean-raylib android-check-keystore android-copy-assets android-debug android-release android-bundle android-install android-install-release android-clean package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web
|
||||
.NOTPARALLEL: dist windows windows64 windows32 android-release android-bundle
|
||||
.PHONY: all native run screenshot test dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows clean clean-linux clean-vendor-builds android-check-keystore android-copy-assets android-local-properties android-debug android-release android-bundle android-install android-install-release android-clean package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web chrome-web-store
|
||||
.NOTPARALLEL: dist windows windows64 windows32 android-release android-bundle click
|
||||
|
||||
all: native
|
||||
|
||||
@@ -165,6 +264,8 @@ dist:
|
||||
$(MAKE) android-check-keystore PASSWORD="$$password" && \
|
||||
$(MAKE) package-unpackaged-assets && \
|
||||
$(MAKE) web && \
|
||||
$(MAKE) chrome-web-store && \
|
||||
$(MAKE) click && \
|
||||
$(MAKE) appimage && \
|
||||
$(MAKE) windows && \
|
||||
$(MAKE) android-release PASSWORD="$$password" && \
|
||||
@@ -172,28 +273,61 @@ dist:
|
||||
|
||||
appimage: $(APPIMAGE_TARGET)
|
||||
|
||||
click: $(CLICK_TARGET)
|
||||
|
||||
click-verify: $(CLICK_TARGET)
|
||||
@command -v clickable >/dev/null || { \
|
||||
echo "clickable is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
}
|
||||
clickable review $(CLICK_TARGET)
|
||||
|
||||
vendor-prebuilds: vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows
|
||||
|
||||
vendor-prebuilds-native: $(RAYLIB_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H) $(LIBOQS_A) $(CURL_PROTOCOL_CHECK)
|
||||
|
||||
vendor-prebuilds-web: $(WEB_RAYLIB_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H) $(WEB_LIBOQS_A)
|
||||
|
||||
vendor-prebuilds-windows: $(WIN64_RAYLIB_A) $(WIN32_RAYLIB_A) $(WIN64_CURL_A) $(WIN32_CURL_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H)
|
||||
|
||||
run: $(TARGET)
|
||||
./$(TARGET)
|
||||
|
||||
test: $(STORAGE_IMPORT_TEST) $(FLINT_TEXT_SCALING_TEST)
|
||||
$(STORAGE_IMPORT_TEST)
|
||||
$(FLINT_TEXT_SCALING_TEST)
|
||||
screenshot: $(TARGET)
|
||||
./scripts/generate-screenshots.sh "$(TARGET)"
|
||||
|
||||
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c src/storage/storage.c src/storage/storage.h src/screens/habits_screen.c src/screens/habits_screen.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
test: $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST)
|
||||
$(STORAGE_IMPORT_TEST)
|
||||
$(LOCALE_KEYS_TEST)
|
||||
$(SYNC_URL_TEST)
|
||||
$(SYNC_ACCOUNT_TEST)
|
||||
|
||||
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c src/storage/storage.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/screens/habits_screen.h src/screens/habits/habits.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/session -Isrc/storage -Isrc/platform/android -Isrc/third_party -Ivendor/raylib/src $(FLINT_INCLUDE) $(SQLITE_INCLUDE) \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party -Ivendor/raylib/src $(FLINT_INCLUDE) $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/storage_import_test.c src/storage/storage.c src/screens/habits_screen.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
tests/storage_import_test.c src/storage/storage.c src/storage/db.c src/storage/import.c src/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections -lm -lpthread -ldl
|
||||
|
||||
$(FLINT_TEXT_SCALING_TEST): tests/flint_text_scaling_test.c flint/src/flint_text.c flint/src/flint_clip.c flint/src/flint_scaling.c flint/include/flint_text.h flint/include/flint_clip.h flint/include/flint_scaling.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -ffunction-sections -fdata-sections \
|
||||
-Iflint/include -Ivendor/raylib/src \
|
||||
$(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-o $@ \
|
||||
tests/flint_text_scaling_test.c flint/src/flint_text.c flint/src/flint_clip.c flint/src/flint_scaling.c \
|
||||
-Wl,--gc-sections -lm
|
||||
tests/locale_keys_test.c
|
||||
|
||||
$(BUILD_OBJ_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR) $(WINDOWS_DIST_DIR) $(ANDROID_BUILD_DIR) $(TEST_BIN_DIR) $(WEB_OBJ_DIR) $(WEB_DIST_DIR):
|
||||
$(SYNC_URL_TEST): tests/sync_url_test.c src/storage/sync_client.c src/storage/sync_client.h $(CURL_PROTOCOL_CHECK) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -Wno-unused-function -std=c99 -D_DEFAULT_SOURCE -DINBE_SYNC_CLIENT_TESTS -ffunction-sections -fdata-sections \
|
||||
-Isrc/storage -Isrc -Ivendor/raylib/src $(FLINT_CURL_CFLAGS) -o $@ \
|
||||
tests/sync_url_test.c src/storage/sync_client.c \
|
||||
-Wl,--gc-sections $(FLINT_CURL_LDLIBS)
|
||||
|
||||
$(SYNC_ACCOUNT_TEST): tests/sync_account_test.c src/storage/sync_account.c src/storage/sync_account.h src/storage/storage.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party -Ivendor/raylib/src $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/sync_account_test.c src/storage/sync_account.c src/storage/storage.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections -lm -lpthread -ldl
|
||||
|
||||
$(BUILD_OBJ_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR) $(CLICK_BIN_DIR) $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR) $(WINDOWS_DIST_DIR) $(ANDROID_BUILD_DIR) $(TEST_BIN_DIR) $(WEB_OBJ_DIR) $(WEB_DIST_DIR) $(CHROME_WEB_STORE_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
$(WINDOWS_BIN_DIR)/$(WIN64_ARCH) $(WINDOWS_BIN_DIR)/$(WIN32_ARCH):
|
||||
@@ -206,10 +340,7 @@ $(FONT_TOOL): vendor/otfchop/otfchop.c vendor/otfchop/stb_truetype.h vendor/otfc
|
||||
$(MAKE) -C vendor/otfchop otfchop
|
||||
|
||||
assets/fonts/locales.png assets/fonts/locales.dat: $(LOCALE_FILES) $(FONT_TOOL) | assets/fonts
|
||||
$(FONT_TOOL) --size 16 $(FONT_SOURCE) $(LOCALE_FILES) assets/fonts/locales
|
||||
|
||||
assets/fonts/locales-8.png assets/fonts/locales-8.dat: $(LOCALE_FILES) $(FONT_TOOL) | assets/fonts
|
||||
$(FONT_TOOL) --size 8 $(FONT_SOURCE) $(LOCALE_FILES) assets/fonts/locales-8
|
||||
$(FONT_TOOL) $(FONT_SOURCE) $(LOCALE_FILES) assets/fonts/locales
|
||||
|
||||
$(EMBEDDED_ASSETS_C): $(EMBEDDED_ASSET_FILES) $(FLINT_DIR)/scripts/embed-assets.sh | $(BUILD_OBJ_DIR)
|
||||
sh $(FLINT_DIR)/scripts/embed-assets.sh $@ $(EMBEDDED_ASSET_FILES)
|
||||
@@ -218,10 +349,10 @@ $(FLINT_ICON_ASSETS_C): $(FLINT_ICON_FILES) $(FLINT_DIR)/scripts/embed-icons.sh
|
||||
sh $(FLINT_DIR)/scripts/embed-icons.sh $(FLINT_DIR)/icons $@
|
||||
|
||||
$(RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
rm -rf $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src
|
||||
mkdir -p $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src $(RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src/
|
||||
$(MAKE) -j1 -C $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src \
|
||||
rm -rf $(VENDOR_BUILD_DIR)/linux/$(ARCH)/raylib-src
|
||||
mkdir -p $(VENDOR_BUILD_DIR)/linux/$(ARCH)/raylib-src $(RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(VENDOR_BUILD_DIR)/linux/$(ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(VENDOR_BUILD_DIR)/linux/$(ARCH)/raylib-src \
|
||||
PLATFORM=PLATFORM_DESKTOP_SDL \
|
||||
GRAPHICS=GRAPHICS_API_OPENGL_ES2 \
|
||||
RAYLIB_LIBTYPE=STATIC \
|
||||
@@ -233,10 +364,10 @@ $(RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
CUSTOM_CFLAGS="-DUSING_SDL2_PROJECT $(RAY_CFLAGS) $(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(WEB_RAYLIB_A): $(RAYLIB_SOURCES) | $(WEB_OBJ_DIR)
|
||||
rm -rf $(WEB_OBJ_DIR)/raylib-src
|
||||
mkdir -p $(WEB_OBJ_DIR)/raylib-src $(WEB_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(WEB_OBJ_DIR)/raylib-src/
|
||||
$(MAKE) -j1 -C $(WEB_OBJ_DIR)/raylib-src \
|
||||
rm -rf $(VENDOR_BUILD_DIR)/web/raylib-src
|
||||
mkdir -p $(VENDOR_BUILD_DIR)/web/raylib-src $(WEB_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(VENDOR_BUILD_DIR)/web/raylib-src/
|
||||
$(MAKE) -j1 -C $(VENDOR_BUILD_DIR)/web/raylib-src \
|
||||
PLATFORM=PLATFORM_WEB \
|
||||
RAYLIB_LIBTYPE=STATIC \
|
||||
RAYLIB_RELEASE_PATH=../raylib \
|
||||
@@ -246,11 +377,29 @@ $(WEB_RAYLIB_A): $(RAYLIB_SOURCES) | $(WEB_OBJ_DIR)
|
||||
AR="$(WEB_AR)" \
|
||||
CUSTOM_CFLAGS="$(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(CLICK_RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
rm -rf $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/raylib-src
|
||||
mkdir -p $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/raylib-src $(CLICK_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/raylib-src \
|
||||
PLATFORM=PLATFORM_DESKTOP_SDL \
|
||||
GRAPHICS=GRAPHICS_API_OPENGL_ES2 \
|
||||
RAYLIB_LIBTYPE=STATIC \
|
||||
RAYLIB_RELEASE_PATH=../raylib \
|
||||
RAYLIB_MODULE_AUDIO=TRUE \
|
||||
RAYLIB_MODULE_MODELS=FALSE \
|
||||
CC="$(AARCH64_CC)" \
|
||||
AR="$(AARCH64_AR)" \
|
||||
RANLIB="$(AARCH64_RANLIB)" \
|
||||
SDL_INCLUDE_PATH="$(AARCH64_RAY_SDL_INCLUDE_DIR)" \
|
||||
SDL_LIBRARIES="$(AARCH64_RAY_SDL_LDLIBS)" \
|
||||
CUSTOM_CFLAGS="-DUSING_SDL2_PROJECT $(AARCH64_RAY_CFLAGS) $(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(WIN64_RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
rm -rf $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src
|
||||
mkdir -p $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src $(WIN64_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src \
|
||||
rm -rf $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src
|
||||
mkdir -p $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src $(WIN64_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src \
|
||||
OS=Windows_NT \
|
||||
PLATFORM=PLATFORM_DESKTOP_RGFW \
|
||||
GRAPHICS=GRAPHICS_API_OPENGL_11 \
|
||||
@@ -264,10 +413,10 @@ $(WIN64_RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
CUSTOM_CFLAGS="$(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(WIN32_RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
rm -rf $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src
|
||||
mkdir -p $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src $(WIN32_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src \
|
||||
rm -rf $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/raylib-src
|
||||
mkdir -p $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/raylib-src $(WIN32_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/raylib-src \
|
||||
OS=Windows_NT \
|
||||
PLATFORM=PLATFORM_DESKTOP_RGFW \
|
||||
GRAPHICS=GRAPHICS_API_OPENGL_11 \
|
||||
@@ -282,16 +431,150 @@ $(WIN32_RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
|
||||
$(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H): $(SQLITE_DIR)/configure $(SQLITE_DIR)/manifest | $(BUILD_OBJ_DIR)
|
||||
mkdir -p $(SQLITE_BUILD_DIR)
|
||||
cd $(SQLITE_BUILD_DIR) && ../../../$(SQLITE_DIR)/configure
|
||||
cd $(SQLITE_BUILD_DIR) && $(abspath $(SQLITE_DIR))/configure
|
||||
$(MAKE) -C $(SQLITE_BUILD_DIR) sqlite3.c sqlite3.h
|
||||
|
||||
$(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(RAYLIB_A) | $(LINUX_BIN_DIR)
|
||||
$(LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt | $(BUILD_OBJ_DIR)
|
||||
$(CMAKE) -S $(LIBOQS_DIR) -B $(LIBOQS_BUILD_DIR) \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DOQS_BUILD_ONLY_LIB=ON \
|
||||
-DOQS_USE_OPENSSL=OFF \
|
||||
-DOQS_MINIMAL_BUILD=SIG_ml_dsa_44
|
||||
$(CMAKE) --build $(LIBOQS_BUILD_DIR) --target oqs
|
||||
|
||||
$(WEB_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt | $(BUILD_OBJ_DIR)
|
||||
emcmake $(CMAKE) -S $(LIBOQS_DIR) -B $(WEB_LIBOQS_BUILD_DIR) \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DOQS_BUILD_ONLY_LIB=ON \
|
||||
-DOQS_USE_OPENSSL=OFF \
|
||||
-DOQS_DIST_BUILD=OFF \
|
||||
-DOQS_OPT_TARGET=generic \
|
||||
-DOQS_MINIMAL_BUILD=SIG_ml_dsa_44
|
||||
$(CMAKE) --build $(WEB_LIBOQS_BUILD_DIR) --target oqs
|
||||
|
||||
$(CURL_SO): $(CURL_DIR)/CMakeLists.txt
|
||||
$(CMAKE) -S $(CURL_DIR) -B $(CURL_BUILD_DIR) \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DCMAKE_INSTALL_PREFIX=$(abspath $(CURL_BUILD_DIR)) \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib64 \
|
||||
-DBUILD_CURL_EXE=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_STATIC_LIBS=OFF \
|
||||
-DCURL_USE_OPENSSL=ON \
|
||||
$(OPENSSL_CMAKE_OPT) \
|
||||
$(OPENSSL_INCLUDE_CMAKE_OPT) \
|
||||
$(OPENSSL_SSL_CMAKE_OPT) \
|
||||
$(OPENSSL_CRYPTO_CMAKE_OPT) \
|
||||
-DCURL_DISABLE_WEBSOCKETS=OFF \
|
||||
-DCURL_DISABLE_INSTALL=OFF \
|
||||
-DCURL_DISABLE_LDAP=ON \
|
||||
-DCURL_DISABLE_LDAPS=ON \
|
||||
-DCURL_DISABLE_DICT=ON \
|
||||
-DCURL_DISABLE_FILE=ON \
|
||||
-DCURL_DISABLE_FTP=ON \
|
||||
-DCURL_DISABLE_GOPHER=ON \
|
||||
-DCURL_DISABLE_IMAP=ON \
|
||||
-DCURL_DISABLE_MQTT=ON \
|
||||
-DCURL_DISABLE_POP3=ON \
|
||||
-DCURL_DISABLE_RTSP=ON \
|
||||
-DCURL_DISABLE_SMB=ON \
|
||||
-DCURL_DISABLE_SMTP=ON \
|
||||
-DCURL_DISABLE_TELNET=ON \
|
||||
-DCURL_DISABLE_TFTP=ON \
|
||||
-DCURL_DISABLE_LIBCURL_OPTION=ON \
|
||||
-DCURL_ZLIB=OFF \
|
||||
-DCURL_BROTLI=OFF \
|
||||
-DCURL_ZSTD=OFF \
|
||||
-DCURL_USE_LIBPSL=OFF \
|
||||
-DCURL_USE_LIBSSH2=OFF \
|
||||
-DCURL_USE_GSSAPI=OFF \
|
||||
-DUSE_NGHTTP2=OFF \
|
||||
-DUSE_LIBIDN2=OFF \
|
||||
-DENABLE_CURL_MANUAL=OFF \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_LIBCURL_DOCS=OFF \
|
||||
-DBUILD_MISC_DOCS=OFF \
|
||||
-DBUILD_TESTING=OFF
|
||||
$(CMAKE) --build $(CURL_BUILD_DIR) --target install
|
||||
|
||||
$(CURL_PROTOCOL_CHECK): $(CURL_SO)
|
||||
@$(CURL_BUILD_DIR)/bin/curl-config --protocols | grep -Eq '(^|[[:space:]])WS([[:space:]]|$$)' || { echo "vendored libcurl was built without WS protocol support"; exit 1; }
|
||||
@$(CURL_BUILD_DIR)/bin/curl-config --protocols | grep -Eq '(^|[[:space:]])WSS([[:space:]]|$$)' || { echo "vendored libcurl was built without WSS protocol support"; exit 1; }
|
||||
@touch $@
|
||||
|
||||
$(WIN64_CURL_A): $(CURL_DIR)/CMakeLists.txt
|
||||
rm -rf $(WIN64_CURL_BUILD_DIR)
|
||||
$(CMAKE) -S $(CURL_DIR) -B $(WIN64_CURL_BUILD_DIR) \
|
||||
-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_C_COMPILER=$(WIN64_CC_PATH) \
|
||||
-DCMAKE_AR=$(WIN64_AR_PATH) \
|
||||
-DCMAKE_RANLIB=$(WIN64_RANLIB_PATH) \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$(WIN64_THREAD_LDFLAGS)" \
|
||||
-DCMAKE_INSTALL_PREFIX=$(abspath $(WIN64_CURL_BUILD_DIR)) \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBUILD_STATIC_LIBS=ON \
|
||||
-DBUILD_CURL_EXE=OFF \
|
||||
-DCURL_STATICLIB=ON \
|
||||
-DCURL_USE_SCHANNEL=ON \
|
||||
-DCURL_USE_OPENSSL=OFF \
|
||||
-DCURL_USE_LIBPSL=OFF \
|
||||
-DCURL_USE_LIBSSH2=OFF \
|
||||
-DCURL_USE_GSSAPI=OFF \
|
||||
-DUSE_NGHTTP2=OFF \
|
||||
-DUSE_LIBIDN2=OFF \
|
||||
-DCURL_DISABLE_LDAP=ON \
|
||||
-DCURL_DISABLE_LDAPS=ON \
|
||||
-DCURL_DISABLE_SMB=ON \
|
||||
-DENABLE_CURL_MANUAL=OFF \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_LIBCURL_DOCS=OFF \
|
||||
-DBUILD_MISC_DOCS=OFF \
|
||||
-DBUILD_TESTING=OFF
|
||||
$(CMAKE) --build $(WIN64_CURL_BUILD_DIR) --target install
|
||||
|
||||
$(WIN32_CURL_A): $(CURL_DIR)/CMakeLists.txt
|
||||
rm -rf $(WIN32_CURL_BUILD_DIR)
|
||||
$(CMAKE) -S $(CURL_DIR) -B $(WIN32_CURL_BUILD_DIR) \
|
||||
-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_C_COMPILER=$(WIN32_CC_PATH) \
|
||||
-DCMAKE_AR=$(WIN32_AR_PATH) \
|
||||
-DCMAKE_RANLIB=$(WIN32_RANLIB_PATH) \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$(WIN32_THREAD_LDFLAGS)" \
|
||||
-DCMAKE_INSTALL_PREFIX=$(abspath $(WIN32_CURL_BUILD_DIR)) \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBUILD_STATIC_LIBS=ON \
|
||||
-DBUILD_CURL_EXE=OFF \
|
||||
-DCURL_STATICLIB=ON \
|
||||
-DCURL_USE_SCHANNEL=ON \
|
||||
-DCURL_USE_OPENSSL=OFF \
|
||||
-DCURL_USE_LIBPSL=OFF \
|
||||
-DCURL_USE_LIBSSH2=OFF \
|
||||
-DCURL_USE_GSSAPI=OFF \
|
||||
-DUSE_NGHTTP2=OFF \
|
||||
-DUSE_LIBIDN2=OFF \
|
||||
-DCURL_DISABLE_LDAP=ON \
|
||||
-DCURL_DISABLE_LDAPS=ON \
|
||||
-DCURL_DISABLE_SMB=ON \
|
||||
-DENABLE_CURL_MANUAL=OFF \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_LIBCURL_DOCS=OFF \
|
||||
-DBUILD_MISC_DOCS=OFF \
|
||||
-DBUILD_TESTING=OFF
|
||||
$(CMAKE) --build $(WIN32_CURL_BUILD_DIR) --target install
|
||||
|
||||
$(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(RAYLIB_A) $(LIBOQS_A) $(CURL_PROTOCOL_CHECK) | $(LINUX_BIN_DIR)
|
||||
$(CC) $(CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
$(LIBOQS_INCLUDE) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
$(RAY_CFLAGS) \
|
||||
-DINBE_HAS_LIBOQS=1 \
|
||||
-DSUPPORT_MODULE_RAUDIO=1 \
|
||||
-DSUPPORT_FILEFORMAT_OGG=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=1 \
|
||||
@@ -300,46 +583,142 @@ $(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H)
|
||||
$(FLINT_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(RAYLIB_A) \
|
||||
$(LIBOQS_A) \
|
||||
$(RAY_LDLIBS) \
|
||||
$(FLINT_RUNTIME_ASSET_LDLIBS) \
|
||||
-lm -lpthread -ldl -lrt \
|
||||
$(LDFLAGS)
|
||||
|
||||
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
|
||||
$(WIN64_CC) $(WINDOWS_CFLAGS) \
|
||||
$(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(CLICK_RAYLIB_A) | $(CLICK_BIN_DIR)
|
||||
$(AARCH64_CC) $(CLICK_CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
$(AARCH64_RAY_CFLAGS) \
|
||||
-DPLATFORM_DESKTOP \
|
||||
-DSUPPORT_MODULE_RAUDIO=1 \
|
||||
-DSUPPORT_FILEFORMAT_OGG=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=1 \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(CLICK_RAYLIB_A) \
|
||||
$(AARCH64_RAY_LDLIBS) \
|
||||
$(AARCH64_FLINT_CURL_LDLIBS) \
|
||||
-lm -lpthread -ldl -lrt \
|
||||
$(LDFLAGS)
|
||||
@if command -v patchelf >/dev/null; then \
|
||||
patchelf --set-interpreter "$(CLICK_PATCHELF_INTERPRETER)" --set-rpath '$$ORIGIN/../lib' $@; \
|
||||
fi
|
||||
|
||||
$(CLICK_TARGET): $(CLICK_BIN_INPUT) $(CLICK_MANIFEST_TEMPLATE) $(CLICK_CONTROL_TEMPLATE) $(CLICK_APPARMOR_TEMPLATE) $(CLICK_DESKTOP_TEMPLATE) $(CLICK_METAINFO_TEMPLATE) $(CLICK_RUNNER) $(LINUX_APPIMAGE_ICON) | $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR)
|
||||
@command -v ar >/dev/null || { \
|
||||
echo "ar is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
}
|
||||
rm -rf $(CLICK_ROOT) $(CLICK_CONTROL_DIR)
|
||||
rm -f $(CLICK_DIST_DIR)/$(CLICK_PACKAGE)_*_$(CLICK_ARCH).click
|
||||
rm -f $(CLICK_BUILD_DIR)/debian-binary $(CLICK_BUILD_DIR)/control.tar.gz $(CLICK_BUILD_DIR)/data.tar.gz
|
||||
mkdir -p $(CLICK_ROOT)/usr/bin $(CLICK_ROOT)/usr/lib $(CLICK_ROOT)/usr/share/applications $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps $(CLICK_ROOT)/usr/share/metainfo
|
||||
mkdir -p $(CLICK_CONTROL_DIR)
|
||||
cp $(CLICK_BIN_INPUT) $(CLICK_ROOT)/usr/bin/$(APP_NAME)
|
||||
cp $(CLICK_RUNNER) $(CLICK_ROOT)/run-inbe.sh
|
||||
chmod +x $(CLICK_ROOT)/run-inbe.sh $(CLICK_ROOT)/usr/bin/$(APP_NAME)
|
||||
@for lib in $(CLICK_RUNTIME_LIBS); do \
|
||||
if [ -f "$$lib" ]; then \
|
||||
cp -L "$$lib" $(CLICK_ROOT)/usr/lib/; \
|
||||
fi; \
|
||||
done
|
||||
@if command -v patchelf >/dev/null; then \
|
||||
for elf in $(CLICK_ROOT)/usr/lib/*.so*; do \
|
||||
if [ -f "$$elf" ]; then patchelf --set-rpath '$$ORIGIN' "$$elf" >/dev/null 2>&1 || true; fi; \
|
||||
done; \
|
||||
fi
|
||||
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
|
||||
-e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
|
||||
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
|
||||
-e 's#__CLICK_ARCH__#$(CLICK_ARCH)#g' \
|
||||
-e 's#__CLICK_FRAMEWORK__#$(CLICK_FRAMEWORK)#g' \
|
||||
-e 's#__CLICK_MAINTAINER__#$(CLICK_MAINTAINER)#g' \
|
||||
$(CLICK_MANIFEST_TEMPLATE) > $(CLICK_ROOT)/manifest.json
|
||||
cp $(CLICK_ROOT)/manifest.json $(CLICK_CONTROL_DIR)/manifest
|
||||
installed_size=$$(du -sk $(CLICK_ROOT) | awk '{ print $$1 }'); \
|
||||
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
|
||||
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
|
||||
-e 's#__CLICK_ARCH__#$(CLICK_ARCH)#g' \
|
||||
-e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
|
||||
-e 's#__CLICK_MAINTAINER__#$(CLICK_MAINTAINER)#g' \
|
||||
-e "s#__INSTALLED_SIZE__#$$installed_size#g" \
|
||||
$(CLICK_CONTROL_TEMPLATE) > $(CLICK_CONTROL_DIR)/control
|
||||
printf '%s\n' '#! /bin/sh' \
|
||||
'echo "Click packages may not be installed directly using dpkg."' \
|
||||
'echo "Use '\''click install'\'' instead."' \
|
||||
'exit 1' > $(CLICK_CONTROL_DIR)/preinst
|
||||
sed -e 's#__CLICK_POLICY_VERSION__#$(CLICK_POLICY_VERSION)#g' \
|
||||
$(CLICK_APPARMOR_TEMPLATE) > $(CLICK_ROOT)/inbe.apparmor
|
||||
sed -e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
|
||||
$(CLICK_DESKTOP_TEMPLATE) > $(CLICK_ROOT)/inbe.desktop
|
||||
@if [ "$(CLICK_INCLUDE_METAINFO)" = "1" ]; then \
|
||||
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
|
||||
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
|
||||
-e 's#__RELEASE_DATE__#$(shell date -u +%Y-%m-%d)#g' \
|
||||
$(CLICK_METAINFO_TEMPLATE) > $(CLICK_ROOT)/usr/share/metainfo/$(CLICK_PACKAGE).metainfo.xml; \
|
||||
fi
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/inbe.png
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps/inbe.png
|
||||
cd $(CLICK_ROOT) && find . -type f -printf '%P\n' | LC_ALL=C sort | xargs md5sum > $(abspath $(CLICK_CONTROL_DIR)/md5sums)
|
||||
printf '2.0\n' > $(CLICK_BUILD_DIR)/debian-binary
|
||||
tar -C $(CLICK_CONTROL_DIR) --sort=name --owner=0 --group=0 --numeric-owner -czf $(abspath $(CLICK_BUILD_DIR)/control.tar.gz) control manifest md5sums preinst
|
||||
tar -C $(CLICK_ROOT) --sort=name --owner=0 --group=0 --numeric-owner -czf $(abspath $(CLICK_BUILD_DIR)/data.tar.gz) inbe.apparmor inbe.desktop inbe.png manifest.json run-inbe.sh usr
|
||||
cd $(CLICK_BUILD_DIR) && ar rcs $(abspath $@) debian-binary control.tar.gz data.tar.gz
|
||||
test -f $@
|
||||
ar t $@ | grep -qx debian-binary
|
||||
ar t $@ | grep -qx control.tar.gz
|
||||
ar t $@ | grep -qx data.tar.gz
|
||||
|
||||
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) $(WIN64_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
|
||||
$(WIN64_CC) $(WINDOWS_CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
-I$(WIN64_CURL_INCLUDE_DIR) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
-DPLATFORM_DESKTOP \
|
||||
-DCURL_STATICLIB \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_WINDOWS_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(WIN64_RAYLIB_A) \
|
||||
$(WIN64_CURL_A) \
|
||||
$(WINDOWS_LDLIBS) \
|
||||
$(WIN64_THREAD_LDFLAGS) \
|
||||
$(WINDOWS_LDFLAGS)
|
||||
$(WIN64_STRIP) $@
|
||||
|
||||
$(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN32_RAYLIB_A) | $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)
|
||||
$(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN32_RAYLIB_A) $(WIN32_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)
|
||||
$(WIN32_CC) $(WINDOWS_CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
-I$(WIN32_CURL_INCLUDE_DIR) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
-DPLATFORM_DESKTOP \
|
||||
-DCURL_STATICLIB \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_WINDOWS_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(WIN32_RAYLIB_A) \
|
||||
$(WIN32_CURL_A) \
|
||||
$(WINDOWS_LDLIBS) \
|
||||
$(WIN32_THREAD_LDFLAGS) \
|
||||
$(WINDOWS_LDFLAGS)
|
||||
$(WIN32_STRIP) $@
|
||||
|
||||
$(APPIMAGE_TARGET): $(TARGET) $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPIMAGE_ICON) | $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR)
|
||||
$(APPIMAGE_TARGET): $(TARGET) $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPIMAGE_ICON) $(LINUX_APPIMAGE_APPDATA) | $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR)
|
||||
@command -v linuxdeploy-plugin-appimage >/dev/null || { \
|
||||
echo "linuxdeploy-plugin-appimage is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
@@ -355,13 +734,29 @@ $(APPIMAGE_TARGET): $(TARGET) $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPIMAGE_DESKTOP)
|
||||
rm -rf $(LINUX_APPDIR)
|
||||
rm -rf $(LINUX_DIST_DIR)/*.AppDir
|
||||
rm -f $(LINUX_DIST_DIR)/*.AppImage
|
||||
mkdir -p $(LINUX_APPDIR)/usr/bin $(LINUX_APPDIR)/usr/share/applications $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps
|
||||
mkdir -p $(LINUX_APPDIR)/usr/bin $(LINUX_APPDIR)/usr/lib $(LINUX_APPDIR)/usr/share/applications $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps $(LINUX_APPDIR)/usr/share/metainfo
|
||||
cp $(TARGET) $(LINUX_APPDIR)/usr/bin/$(APP_NAME)
|
||||
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 $(LINUX_APPDIR)/usr/bin/$(APP_NAME)
|
||||
cp $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPDIR)/AppRun
|
||||
chmod +x $(LINUX_APPDIR)/AppRun
|
||||
@loader=$$(LC_ALL=C readelf -l $(TARGET) | sed -n 's#.*Requesting program interpreter: \(.*\)]#\1#p'); \
|
||||
if printf '%s\n' "$$loader" | grep -q '^/nix/store/.*glibc.*/'; then \
|
||||
glibc_lib_dir=$$(dirname "$$loader"); \
|
||||
echo "Bundling glibc loader: $$loader"; \
|
||||
cp "$$loader" $(LINUX_APPDIR)/usr/lib/; \
|
||||
for lib in libc.so.6 libm.so.6 libpthread.so.0 libdl.so.2 librt.so.1 libresolv.so.2 libnss_files.so.2; do \
|
||||
if [ -f "$$glibc_lib_dir/$$lib" ]; then \
|
||||
cp "$$glibc_lib_dir/$$lib" $(LINUX_APPDIR)/usr/lib/; \
|
||||
chmod u+w $(LINUX_APPDIR)/usr/lib/$$lib; \
|
||||
fi; \
|
||||
done; \
|
||||
chmod u+w $(LINUX_APPDIR)/usr/lib/$$(basename "$$loader"); \
|
||||
else \
|
||||
echo "Not bundling glibc; build interpreter is $$loader"; \
|
||||
fi
|
||||
cp $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPDIR)/$(APP_NAME).desktop
|
||||
cp $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPDIR)/usr/share/applications/$(APP_NAME).desktop
|
||||
cp $(LINUX_APPIMAGE_APPDATA) $(LINUX_APPDIR)/usr/share/metainfo/$(ANDROID_APP_ID).metainfo.xml
|
||||
cp $(LINUX_APPIMAGE_ICON) $(LINUX_APPDIR)/$(APP_NAME).png
|
||||
cp $(LINUX_APPIMAGE_ICON) $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps/$(APP_NAME).png
|
||||
cd $(LINUX_APPIMAGE_BUILD_DIR) && env -u SOURCE_DATE_EPOCH ARCH=$(ARCH) LDAI_OUTPUT=$(abspath $(APPIMAGE_TARGET)) $(LINUXDEPLOY) \
|
||||
@@ -372,12 +767,15 @@ $(APPIMAGE_TARGET): $(TARGET) $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPIMAGE_DESKTOP)
|
||||
--output appimage
|
||||
test -f $@
|
||||
|
||||
$(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WEB_RAYLIB_A) src/web_shell.html manifest.json $(WEB_ASSET_FILES) | $(WEB_DIST_DIR)
|
||||
$(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WEB_RAYLIB_A) $(WEB_LIBOQS_A) src/web_shell.html $(WEB_BOOT_JS) manifest.json $(WEB_ASSET_FILES) $(MEDITATION_AUDIO_ZIP) | $(WEB_DIST_DIR)
|
||||
rm -f $(WEB_DIST_DIR)/index.data
|
||||
$(WEB_CC) $(WEB_CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
$(WEB_LIBOQS_INCLUDE) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
-DINBE_HAS_LIBOQS=1 \
|
||||
-DPLATFORM_WEB \
|
||||
-DSUPPORT_MODULE_RAUDIO=1 \
|
||||
-DSUPPORT_FILEFORMAT_OGG=1 \
|
||||
@@ -387,17 +785,22 @@ $(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMA
|
||||
$(FLINT_WEB_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(WEB_RAYLIB_A) \
|
||||
$(WEB_LIBOQS_A) \
|
||||
-sUSE_GLFW=3 \
|
||||
-sASYNCIFY \
|
||||
-sFORCE_FILESYSTEM=1 \
|
||||
-sFETCH=1 \
|
||||
-sALLOW_MEMORY_GROWTH=1 \
|
||||
-sSTACK_SIZE=8388608 \
|
||||
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick \
|
||||
--shell-file src/web_shell.html \
|
||||
-lidbfs.js \
|
||||
-lm
|
||||
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_DIST_DIR)/index.html
|
||||
cp $(WEB_BOOT_JS) $(WEB_DIST_DIR)/index_boot.js
|
||||
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_DIST_DIR)/index_boot.js
|
||||
cp -R web-assets $(WEB_DIST_DIR)/
|
||||
cp manifest.json $(WEB_DIST_DIR)/
|
||||
cp manifest.json $(WEB_DIST_DIR)/webmanifest.json
|
||||
|
||||
android-copy-assets:
|
||||
$(MAKE) $(FONT_OUTPUTS)
|
||||
@@ -425,13 +828,25 @@ android-check-keystore:
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
android-debug: android-copy-assets
|
||||
android-local-properties:
|
||||
@if [ -f droid/local.properties ]; then sed -i '/^ndk\.dir=/d' droid/local.properties; fi
|
||||
@if [ -d /mnt/storage/Android/Sdk/ndk/28.2.13676358 ]; then \
|
||||
if [ -f droid/local.properties ]; then \
|
||||
sed -i 's#^sdk\.dir=.*#sdk.dir=/mnt/storage/Android/Sdk#' droid/local.properties; \
|
||||
sed -i 's#^cmake\.dir=.*#cmake.dir=/mnt/storage/Android/Sdk/cmake/3.22.1#' droid/local.properties; \
|
||||
else \
|
||||
printf 'sdk.dir=/mnt/storage/Android/Sdk\ncmake.dir=/mnt/storage/Android/Sdk/cmake/3.22.1\n' > droid/local.properties; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
android-debug: android-copy-assets android-local-properties
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid assembleDebug
|
||||
$(MAKE) android-copy-debug-apks
|
||||
|
||||
android-release:
|
||||
$(MAKE) android-check-keystore PASSWORD="$(PASSWORD)"
|
||||
$(MAKE) android-copy-assets
|
||||
$(MAKE) android-local-properties
|
||||
@if [ -n "$(PASSWORD)" ]; then \
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid assembleRelease -Pkeystore.path="$(ANDROID_KEYSTORE)" -Pkeystore.alias="$(ANDROID_KEY_ALIAS)" -Pkeystore.password="$(PASSWORD)" || exit $$?; \
|
||||
else \
|
||||
@@ -443,6 +858,7 @@ android-release:
|
||||
android-bundle:
|
||||
$(MAKE) android-check-keystore PASSWORD="$(PASSWORD)"
|
||||
$(MAKE) android-copy-assets
|
||||
$(MAKE) android-local-properties
|
||||
@if [ -n "$(PASSWORD)" ]; then \
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid bundleRelease -Pkeystore.path="$(ANDROID_KEYSTORE)" -Pkeystore.alias="$(ANDROID_KEY_ALIAS)" -Pkeystore.password="$(PASSWORD)" || exit $$?; \
|
||||
else \
|
||||
@@ -520,15 +936,15 @@ android-clean:
|
||||
$(GRADLE) -p droid clean
|
||||
rm -rf $(ANDROID_BUILD_DIR)
|
||||
|
||||
package-unpackaged-assets:
|
||||
$(MEDITATION_AUDIO_ZIP): $(UNPACKAGED_AUDIO_FILES)
|
||||
mkdir -p $(dir $(MEDITATION_AUDIO_ZIP))
|
||||
rm -f $(MEDITATION_AUDIO_ZIP)
|
||||
cd $(UNPACKAGED_AUDIO_DIR) && find . -mindepth 2 -type f -name '*.ogg' -exec zip -9 -r $(abspath $(MEDITATION_AUDIO_ZIP)) {} + && zip -9 -r $(abspath $(MEDITATION_AUDIO_ZIP)) LICENSE.md MANIFEST.txt
|
||||
|
||||
package-unpackaged-assets: $(MEDITATION_AUDIO_ZIP)
|
||||
|
||||
windows-runtime-assets-check:
|
||||
@echo "Windows runtime asset downloads are not wired into this build yet"; \
|
||||
echo "Refusing to build Windows binaries that cannot download meditation audio."; \
|
||||
exit 1
|
||||
@:
|
||||
|
||||
windows64: windows-runtime-assets-check $(WIN64_TARGET)
|
||||
|
||||
@@ -546,6 +962,21 @@ windows:
|
||||
|
||||
web:
|
||||
$(MAKE) $(WEB_TARGET)
|
||||
rm -f $(WEB_DIST_ZIP)
|
||||
cd $(WEB_DIST_DIR) && zip -9 -r $(abspath $(WEB_DIST_ZIP)) .
|
||||
|
||||
chrome-web-store: $(CHROME_WEB_STORE_ZIP)
|
||||
|
||||
$(CHROME_WEB_STORE_ZIP): $(WEB_TARGET) $(CHROME_WEB_STORE_MANIFEST) $(CHROME_WEB_STORE_WORKER) $(CHROME_WEB_STORE_ICONS) | $(CHROME_WEB_STORE_DIR)
|
||||
rm -rf $(CHROME_WEB_STORE_DIR)
|
||||
mkdir -p $(CHROME_WEB_STORE_DIR)/icons
|
||||
cp -R $(WEB_DIST_DIR)/. $(CHROME_WEB_STORE_DIR)/
|
||||
sed -e 's#__APP_VERSION__#$(APP_VERSION)#g' \
|
||||
$(CHROME_WEB_STORE_MANIFEST) > $(CHROME_WEB_STORE_DIR)/manifest.json
|
||||
cp $(CHROME_WEB_STORE_WORKER) $(CHROME_WEB_STORE_DIR)/service_worker.js
|
||||
cp $(CHROME_WEB_STORE_ICONS) $(CHROME_WEB_STORE_DIR)/icons/
|
||||
rm -f $(CHROME_WEB_STORE_ZIP)
|
||||
cd $(CHROME_WEB_STORE_DIR) && zip -9 -r $(abspath $(CHROME_WEB_STORE_ZIP)) .
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
@@ -553,10 +984,10 @@ clean:
|
||||
clean-linux:
|
||||
rm -rf $(LINUX_OBJ_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR)
|
||||
|
||||
clean-raylib:
|
||||
rm -rf $(RAYLIB_BUILD_DIR) $(LINUX_OBJ_DIR)/*/native/raylib-src vendor/raylib/build
|
||||
clean-vendor-builds:
|
||||
rm -rf $(VENDOR_BUILD_DIR)
|
||||
|
||||
NEEDS_NATIVE_ENV := $(if $(MAKECMDGOALS),$(filter all native run dist appimage,$(MAKECMDGOALS)),native)
|
||||
NEEDS_NATIVE_ENV := $(if $(MAKECMDGOALS),$(filter all native run dist appimage vendor-prebuilds vendor-prebuilds-native,$(MAKECMDGOALS)),native)
|
||||
ifneq ($(strip $(NEEDS_NATIVE_ENV)),)
|
||||
ifeq ($(strip $(RAY_CFLAGS)),)
|
||||
$(error RAY_CFLAGS is not set. Enter the ray flake shell with 'nix develop')
|
||||
@@ -574,6 +1005,36 @@ ifeq ($(strip $(RAY_RAYLIB_CONFIG)),)
|
||||
$(error RAY_RAYLIB_CONFIG is not set. Enter the ray flake shell with 'nix develop')
|
||||
endif
|
||||
ifeq ($(strip $(FLINT_CURL_LDLIBS)),)
|
||||
$(error libcurl pkg-config metadata is missing. Runtime asset downloads are required; enter the flake shell with 'nix develop' or set FLINT_CURL_CFLAGS/FLINT_CURL_LDLIBS explicitly)
|
||||
$(error libcurl metadata is missing. Sync is required; enter the flake shell with 'nix develop' or set FLINT_CURL_CFLAGS/FLINT_CURL_LDLIBS explicitly)
|
||||
endif
|
||||
ifneq ($(shell v='$(FLINT_CURL_VERSION_HEX)'; if [ "$$v" = 075600 ] || [ "$$v" \> 075600 ]; then echo yes; fi),yes)
|
||||
$(error libcurl >= 7.86.0 is required for websocket sync; found LIBCURL_VERSION_NUM=$(FLINT_CURL_VERSION_NUM))
|
||||
endif
|
||||
endif
|
||||
|
||||
NEEDS_CLICK_ENV := $(filter click click-verify,$(MAKECMDGOALS))
|
||||
ifneq ($(strip $(NEEDS_CLICK_ENV)),)
|
||||
ifeq ($(strip $(CLICK_BIN_SOURCE)),)
|
||||
ifeq ($(strip $(AARCH64_CC)),)
|
||||
$(error AARCH64_CC is not set. Enter the ray flake shell with 'nix develop' or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_AR)),)
|
||||
$(error AARCH64_AR is not set. Enter the ray flake shell with 'nix develop' or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RANLIB)),)
|
||||
$(error AARCH64_RANLIB is not set. Enter the ray flake shell with 'nix develop' or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RAY_CFLAGS)),)
|
||||
$(error AARCH64_RAY_CFLAGS is not set. Enter the ray flake shell with 'nix develop' or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RAY_LDLIBS)),)
|
||||
$(error AARCH64_RAY_LDLIBS is not set. Enter the ray flake shell with 'nix develop' or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RAY_SDL_INCLUDE_DIR)),)
|
||||
$(error AARCH64_RAY_SDL_INCLUDE_DIR is not set. Enter the ray flake shell with 'nix develop' or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_FLINT_CURL_LDLIBS)),)
|
||||
$(error AARCH64_FLINT_CURL_LDLIBS is not set. Enter the ray flake shell with 'nix develop' or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 131 KiB |
@@ -5,7 +5,7 @@ plugins {
|
||||
android {
|
||||
namespace 'xyz.waozi.inbe'
|
||||
compileSdk 35
|
||||
ndkVersion "25.1.8937393"
|
||||
ndkVersion "28.2.13676358"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@@ -33,10 +33,10 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk 19
|
||||
minSdk 21
|
||||
targetSdk 35
|
||||
versionCode 30
|
||||
versionName "1.3.2"
|
||||
versionCode 41
|
||||
versionName "1.4.6"
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,12 @@ android {
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
packaging {
|
||||
jniLibs {
|
||||
useLegacyPackaging = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady { taskGraph ->
|
||||
|
||||
@@ -10,18 +10,21 @@ set(SQLITE_BUILD_DIR "${CMAKE_BINARY_DIR}/sqlite")
|
||||
set(SQLITE_AMALGAMATION_C "${SQLITE_BUILD_DIR}/sqlite3.c")
|
||||
set(SQLITE_AMALGAMATION_H "${SQLITE_BUILD_DIR}/sqlite3.h")
|
||||
set(NATIVE_APP_GLUE_DIR "${ANDROID_NDK}/sources/android/native_app_glue")
|
||||
file(GLOB FLINT_SOURCES CONFIGURE_DEPENDS "${FLINT_DIR}/src/*.c")
|
||||
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "" FORCE)
|
||||
set(OQS_USE_OPENSSL OFF CACHE BOOL "" FORCE)
|
||||
set(OQS_MINIMAL_BUILD "SIG_ml_dsa_44" CACHE STRING "" FORCE)
|
||||
add_subdirectory("${REPO_ROOT}/vendor/liboqs" "${CMAKE_BINARY_DIR}/liboqs")
|
||||
file(GLOB FLINT_SOURCES CONFIGURE_DEPENDS "${FLINT_DIR}/src/*.c" "${FLINT_DIR}/src/ui/*.c")
|
||||
list(REMOVE_ITEM FLINT_SOURCES "${FLINT_DIR}/src/flint_file_dialog.c")
|
||||
file(GLOB INBE_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/locales/*.txt")
|
||||
file(GLOB INBE_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
|
||||
set(INBE_EMBEDDED_INPUTS
|
||||
${INBE_LOCALE_ASSETS}
|
||||
assets/whm/1.jpg
|
||||
assets/whm/2.jpg
|
||||
assets/practices/whm/1.jpg
|
||||
assets/practices/whm/2.jpg
|
||||
assets/practices/meditation/1.jpg
|
||||
assets/fonts/locales.png
|
||||
assets/fonts/locales.dat
|
||||
assets/fonts/locales-8.png
|
||||
assets/fonts/locales-8.dat
|
||||
${INBE_SOUND_ASSETS}
|
||||
)
|
||||
set(INBE_EMBEDDED_DEPS)
|
||||
@@ -88,14 +91,29 @@ add_library(main SHARED
|
||||
"${SRC_DIR}/main.c"
|
||||
"${SRC_DIR}/core/breath_engine.c"
|
||||
"${SRC_DIR}/app/app.c"
|
||||
"${SRC_DIR}/app/app_settings.c"
|
||||
"${SRC_DIR}/app/device_preferences.c"
|
||||
"${SRC_DIR}/session/session.c"
|
||||
"${SRC_DIR}/practices/practice_registry.c"
|
||||
"${SRC_DIR}/practices/whm/whm_practice.c"
|
||||
"${SRC_DIR}/practices/whm/whm_session.c"
|
||||
"${SRC_DIR}/practices/whm/whm_manual.c"
|
||||
"${SRC_DIR}/practices/whm/whm_config.c"
|
||||
"${SRC_DIR}/practices/meditation/meditation_practice.c"
|
||||
"${SRC_DIR}/practices/meditation/meditation_session.c"
|
||||
"${SRC_DIR}/practices/meditation/meditation_manual.c"
|
||||
"${SRC_DIR}/practices/meditation/meditation_config.c"
|
||||
"${SRC_DIR}/screens/habits_screen.c"
|
||||
"${SRC_DIR}/session/meditation_music.c"
|
||||
"${SRC_DIR}/core/locale.c"
|
||||
"${SRC_DIR}/screens/statistics_screen.c"
|
||||
"${SRC_DIR}/screens/habits/edit.c"
|
||||
"${SRC_DIR}/screens/habits/session.c"
|
||||
"${SRC_DIR}/practices/meditation/meditation_music.c"
|
||||
"${SRC_DIR}/core/theme.c"
|
||||
"${SRC_DIR}/storage/data.c"
|
||||
"${SRC_DIR}/storage/db.c"
|
||||
"${SRC_DIR}/storage/import.c"
|
||||
"${SRC_DIR}/storage/storage.c"
|
||||
"${SRC_DIR}/storage/sync_account.c"
|
||||
"${SRC_DIR}/storage/sync_client.c"
|
||||
"${SRC_DIR}/third_party/miniz.c"
|
||||
"${SQLITE_AMALGAMATION_C}"
|
||||
"${SRC_DIR}/platform/android/android_device.c"
|
||||
@@ -106,6 +124,10 @@ add_library(main SHARED
|
||||
"${SRC_DIR}/screens/language_screen.c"
|
||||
"${SRC_DIR}/screens/manual_screen.c"
|
||||
"${SRC_DIR}/screens/settings/settings_screen.c"
|
||||
"${SRC_DIR}/screens/settings/settings_device.c"
|
||||
"${SRC_DIR}/screens/settings/settings_theme.c"
|
||||
"${SRC_DIR}/screens/settings/settings_data.c"
|
||||
"${SRC_DIR}/screens/settings/settings_sync_account.c"
|
||||
"${INBE_EMBEDDED_ASSETS_C}"
|
||||
${FLINT_SOURCES}
|
||||
"${SRC_DIR}/platform/android/android_insets.c"
|
||||
@@ -120,7 +142,9 @@ target_include_directories(main PRIVATE
|
||||
"${SRC_DIR}/core"
|
||||
"${SRC_DIR}/screens"
|
||||
"${SRC_DIR}/screens/settings"
|
||||
"${SRC_DIR}/session"
|
||||
"${SRC_DIR}/practices"
|
||||
"${SRC_DIR}/practices/whm"
|
||||
"${SRC_DIR}/practices/meditation"
|
||||
"${SRC_DIR}/storage"
|
||||
"${SRC_DIR}/platform/android"
|
||||
"${SRC_DIR}/third_party"
|
||||
@@ -141,6 +165,7 @@ target_compile_definitions(main PRIVATE
|
||||
SUPPORT_MODULE_RAUDIO=1
|
||||
SUPPORT_FILEFORMAT_OGG=1
|
||||
FLINT_EMBEDDED_ONLY=1
|
||||
INBE_HAS_LIBOQS=1
|
||||
)
|
||||
|
||||
target_compile_options(main PRIVATE
|
||||
@@ -153,11 +178,13 @@ target_compile_options(main PRIVATE
|
||||
target_link_options(main PRIVATE
|
||||
-Wl,--gc-sections
|
||||
-Wl,--strip-all
|
||||
-Wl,-z,max-page-size=16384
|
||||
-Wl,--wrap=fopen
|
||||
)
|
||||
|
||||
target_link_libraries(main
|
||||
raylib
|
||||
oqs
|
||||
android
|
||||
log
|
||||
OpenSLES
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import android.view.DisplayCutout;
|
||||
import android.view.KeyEvent;
|
||||
@@ -26,11 +27,17 @@ import android.view.inputmethod.InputMethodManager;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.URI;
|
||||
import java.net.UnknownHostException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.SecureRandom;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
public class MainActivity extends NativeActivity {
|
||||
private static final String TAG = "InbeMainActivity";
|
||||
@@ -51,6 +58,7 @@ public class MainActivity extends NativeActivity {
|
||||
private boolean windowFocused = true;
|
||||
private boolean backgroundExecutionActive = false;
|
||||
private boolean autoPausedForLifecycle = false;
|
||||
private int lastDeleteRepeatCount = -1;
|
||||
|
||||
private native void nativeSetInsets(int status, int nav,
|
||||
int cutoutLeft, int cutoutTop, int cutoutRight, int cutoutBottom);
|
||||
@@ -149,18 +157,32 @@ public class MainActivity extends NativeActivity {
|
||||
if (event != null && event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
int keyCode = event.getKeyCode();
|
||||
if (keyCode == KeyEvent.KEYCODE_DEL) {
|
||||
nativeTextInputBackspace();
|
||||
int repeatCount = event.getRepeatCount();
|
||||
int deleteCount = lastDeleteRepeatCount < 0
|
||||
? 1
|
||||
: Math.max(1, repeatCount - lastDeleteRepeatCount);
|
||||
lastDeleteRepeatCount = repeatCount;
|
||||
for (int i = 0; i < deleteCount; i++) {
|
||||
nativeTextInputBackspace();
|
||||
}
|
||||
} else if (keyCode == KeyEvent.KEYCODE_ENTER ||
|
||||
keyCode == KeyEvent.KEYCODE_NUMPAD_ENTER) {
|
||||
lastDeleteRepeatCount = -1;
|
||||
nativeTextInputEnter();
|
||||
} else {
|
||||
lastDeleteRepeatCount = -1;
|
||||
int unicode = event.getUnicodeChar();
|
||||
if (unicode >= 32) {
|
||||
nativeTextInputCommit(unicode);
|
||||
}
|
||||
}
|
||||
} else if (event != null && event.getAction() == KeyEvent.ACTION_UP) {
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_DEL) {
|
||||
lastDeleteRepeatCount = -1;
|
||||
}
|
||||
} else if (event != null && event.getAction() == KeyEvent.ACTION_MULTIPLE &&
|
||||
event.getCharacters() != null) {
|
||||
lastDeleteRepeatCount = -1;
|
||||
String chars = event.getCharacters();
|
||||
for (int i = 0; i < chars.length();) {
|
||||
int codepoint = chars.codePointAt(i);
|
||||
@@ -268,7 +290,228 @@ public class MainActivity extends NativeActivity {
|
||||
}, "inbe-runtime-asset-download").start();
|
||||
}
|
||||
|
||||
public void openImportPicker() {
|
||||
public String syncHttpRequest(String method, String urlText, String body, String[] headers) {
|
||||
HttpURLConnection connection = null;
|
||||
int status = 0;
|
||||
|
||||
try {
|
||||
byte[] bodyBytes = body != null ? body.getBytes(StandardCharsets.UTF_8) : new byte[0];
|
||||
connection = (HttpURLConnection)new URL(urlText).openConnection();
|
||||
connection.setInstanceFollowRedirects(false);
|
||||
connection.setConnectTimeout(15000);
|
||||
connection.setReadTimeout(30000);
|
||||
connection.setRequestMethod(method);
|
||||
connection.setRequestProperty("User-Agent", "inbe-sync/1");
|
||||
if (headers != null) {
|
||||
for (String header : headers) {
|
||||
if (header == null) continue;
|
||||
int colon = header.indexOf(':');
|
||||
if (colon <= 0) continue;
|
||||
String key = header.substring(0, colon).trim();
|
||||
String value = header.substring(colon + 1).trim();
|
||||
if (!key.isEmpty()) {
|
||||
connection.setRequestProperty(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("POST".equals(method) || "DELETE".equals(method)) {
|
||||
connection.setDoOutput(true);
|
||||
connection.setFixedLengthStreamingMode(bodyBytes.length);
|
||||
try (OutputStream output = connection.getOutputStream()) {
|
||||
output.write(bodyBytes);
|
||||
}
|
||||
}
|
||||
|
||||
status = connection.getResponseCode();
|
||||
InputStream stream = status >= 400 ? connection.getErrorStream() : connection.getInputStream();
|
||||
String response = "";
|
||||
if (stream != null) {
|
||||
try (InputStream input = stream) {
|
||||
byte[] bytes = readAllBytesCompat(input);
|
||||
response = new String(bytes, StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
return status + "\n" + response;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Sync HTTP request failed", e);
|
||||
return status + "\n" + (e.getMessage() != null ? e.getMessage() : "request failed");
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String syncWebSocketWait(String urlText, String[] headers) {
|
||||
Socket socket = null;
|
||||
|
||||
try {
|
||||
URI url = new URI(urlText);
|
||||
String protocol = url.getScheme();
|
||||
boolean secure = "wss".equals(protocol);
|
||||
int port = url.getPort();
|
||||
String path = url.getRawPath();
|
||||
if (path == null || path.isEmpty()) path = "/";
|
||||
if (url.getRawQuery() != null && !url.getRawQuery().isEmpty()) {
|
||||
path += "?" + url.getRawQuery();
|
||||
}
|
||||
if (port <= 0) port = secure ? 443 : 80;
|
||||
if (!secure && !"ws".equals(protocol)) {
|
||||
return "0\ninvalid websocket url";
|
||||
}
|
||||
|
||||
socket = secure
|
||||
? SSLSocketFactory.getDefault().createSocket(url.getHost(), port)
|
||||
: new Socket(url.getHost(), port);
|
||||
socket.setTcpNoDelay(true);
|
||||
|
||||
byte[] keyBytes = new byte[16];
|
||||
new SecureRandom().nextBytes(keyBytes);
|
||||
String key = Base64.encodeToString(keyBytes, Base64.NO_WRAP);
|
||||
|
||||
StringBuilder request = new StringBuilder();
|
||||
request.append("GET ").append(path).append(" HTTP/1.1\r\n");
|
||||
request.append("Host: ").append(url.getHost());
|
||||
if ((secure && port != 443) || (!secure && port != 80)) {
|
||||
request.append(":").append(port);
|
||||
}
|
||||
request.append("\r\n");
|
||||
request.append("Upgrade: websocket\r\n");
|
||||
request.append("Connection: Upgrade\r\n");
|
||||
request.append("Sec-WebSocket-Version: 13\r\n");
|
||||
request.append("Sec-WebSocket-Key: ").append(key).append("\r\n");
|
||||
request.append("User-Agent: inbe-sync/1\r\n");
|
||||
if (headers != null) {
|
||||
for (String header : headers) {
|
||||
if (header != null && !header.isEmpty()) {
|
||||
request.append(header).append("\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
request.append("\r\n");
|
||||
socket.getOutputStream().write(request.toString().getBytes(StandardCharsets.US_ASCII));
|
||||
socket.getOutputStream().flush();
|
||||
|
||||
String statusLine = readAsciiLine(socket);
|
||||
int status = parseHttpStatus(statusLine);
|
||||
while (true) {
|
||||
String line = readAsciiLine(socket);
|
||||
if (line == null || line.isEmpty()) break;
|
||||
}
|
||||
if (status != 101) {
|
||||
return status + "\nwebsocket upgrade failed";
|
||||
}
|
||||
Log.i(TAG, "Sync WebSocket connected");
|
||||
|
||||
while (true) {
|
||||
String message = readWebSocketText(socket);
|
||||
if (message == null) {
|
||||
return "0\nwebsocket closed";
|
||||
}
|
||||
if (message.contains("\"type\":\"sync_changed\"")) {
|
||||
return "101\n" + message;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "WebSocket wait failed", e);
|
||||
return "0\n" + (e.getMessage() != null ? e.getMessage() : "websocket failed");
|
||||
} finally {
|
||||
if (socket != null) {
|
||||
try {
|
||||
socket.close();
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int parseHttpStatus(String statusLine) {
|
||||
if (statusLine == null) return 0;
|
||||
String[] parts = statusLine.split(" ", 3);
|
||||
if (parts.length < 2) return 0;
|
||||
try {
|
||||
return Integer.parseInt(parts[1]);
|
||||
} catch (NumberFormatException e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static String readAsciiLine(Socket socket) throws java.io.IOException {
|
||||
StringBuilder line = new StringBuilder();
|
||||
while (true) {
|
||||
int b = socket.getInputStream().read();
|
||||
if (b < 0) {
|
||||
return line.length() > 0 ? line.toString() : null;
|
||||
}
|
||||
if (b == '\n') break;
|
||||
if (b != '\r') line.append((char)b);
|
||||
}
|
||||
return line.toString();
|
||||
}
|
||||
|
||||
private static String readWebSocketText(Socket socket) throws java.io.IOException {
|
||||
int b0 = socket.getInputStream().read();
|
||||
int b1 = socket.getInputStream().read();
|
||||
if (b0 < 0 || b1 < 0) return null;
|
||||
|
||||
int opcode = b0 & 0x0f;
|
||||
boolean masked = (b1 & 0x80) != 0;
|
||||
long length = b1 & 0x7f;
|
||||
if (length == 126) {
|
||||
length = ((long)readByte(socket) << 8) | readByte(socket);
|
||||
} else if (length == 127) {
|
||||
length = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
length = (length << 8) | readByte(socket);
|
||||
}
|
||||
}
|
||||
if (length < 0 || length > 1024 * 1024) {
|
||||
throw new java.io.IOException("websocket frame too large");
|
||||
}
|
||||
|
||||
byte[] mask = null;
|
||||
if (masked) {
|
||||
mask = readExact(socket, 4);
|
||||
}
|
||||
byte[] payload = readExact(socket, (int)length);
|
||||
if (masked) {
|
||||
for (int i = 0; i < payload.length; i++) {
|
||||
payload[i] = (byte)(payload[i] ^ mask[i % 4]);
|
||||
}
|
||||
}
|
||||
if (opcode == 8) return null;
|
||||
if (opcode != 1) return "";
|
||||
return new String(payload, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
private static int readByte(Socket socket) throws java.io.IOException {
|
||||
int b = socket.getInputStream().read();
|
||||
if (b < 0) throw new java.io.IOException("unexpected eof");
|
||||
return b;
|
||||
}
|
||||
|
||||
private static byte[] readExact(Socket socket, int count) throws java.io.IOException {
|
||||
byte[] data = new byte[count];
|
||||
int offset = 0;
|
||||
while (offset < count) {
|
||||
int read = socket.getInputStream().read(data, offset, count - offset);
|
||||
if (read < 0) throw new java.io.IOException("unexpected eof");
|
||||
offset += read;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private static byte[] readAllBytesCompat(InputStream input) throws java.io.IOException {
|
||||
byte[] buffer = new byte[8192];
|
||||
int read;
|
||||
java.io.ByteArrayOutputStream output = new java.io.ByteArrayOutputStream();
|
||||
while ((read = input.read(buffer)) != -1) {
|
||||
output.write(buffer, 0, read);
|
||||
}
|
||||
return output.toByteArray();
|
||||
}
|
||||
|
||||
public void openImportPicker(final String mimeTypesCsv) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -276,13 +519,10 @@ public class MainActivity extends NativeActivity {
|
||||
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.setType("*/*");
|
||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {
|
||||
"application/zip",
|
||||
"application/x-zip-compressed",
|
||||
"application/vnd.sqlite3",
|
||||
"application/x-sqlite",
|
||||
"application/x-sqlite3"
|
||||
});
|
||||
String[] mimeTypes = parseMimeTypes(mimeTypesCsv);
|
||||
if (mimeTypes.length > 0) {
|
||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);
|
||||
}
|
||||
startActivityForResult(intent, REQUEST_IMPORT_ZIP);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to open import picker", e);
|
||||
@@ -292,6 +532,22 @@ public class MainActivity extends NativeActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private static String[] parseMimeTypes(String mimeTypesCsv) {
|
||||
if (mimeTypesCsv == null || mimeTypesCsv.trim().isEmpty()) {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
String[] raw = mimeTypesCsv.split(",");
|
||||
java.util.ArrayList<String> result = new java.util.ArrayList<>();
|
||||
for (String mimeType : raw) {
|
||||
String trimmed = mimeType.trim();
|
||||
if (!trimmed.isEmpty()) {
|
||||
result.add(trimmed);
|
||||
}
|
||||
}
|
||||
return result.toArray(new String[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
@@ -11,6 +11,40 @@ import java.io.FileOutputStream;
|
||||
public class ShareHelper {
|
||||
private static final String TAG = "InbeShare";
|
||||
|
||||
public static void shareFile(Activity activity, byte[] data, String filename, String mimeType, String chooserTitle) {
|
||||
if (activity == null || data == null) return;
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
File cacheFile = new File(activity.getCacheDir(), filename);
|
||||
FileOutputStream fos = new FileOutputStream(cacheFile);
|
||||
fos.write(data);
|
||||
fos.close();
|
||||
|
||||
Uri contentUri = FileProvider.getUriForFile(
|
||||
activity,
|
||||
"xyz.waozi.inbe.fileprovider",
|
||||
cacheFile
|
||||
);
|
||||
|
||||
Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.setType(mimeType != null ? mimeType : "application/octet-stream");
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, contentUri);
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
|
||||
Intent shareIntent = Intent.createChooser(sendIntent, chooserTitle);
|
||||
activity.startActivity(shareIntent);
|
||||
|
||||
Log.i(TAG, "Share sheet shown");
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Share failed", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void shareZipFile(Activity activity, byte[] zipData, String filename, String chooserTitle) {
|
||||
if (activity == null || zipData == null) return;
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
android.useAndroidX=true
|
||||
android.suppressUnsupportedCompileSdk=35
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
@@ -2,11 +2,9 @@ Eine freie, quelloffene App für Atmung, Meditation und Gewohnheiten.
|
||||
|
||||
Funktionen:
|
||||
- Geführte Übungen mit visuellen und akustischen Hinweisen
|
||||
- Mind, Yoga und Fitness für Gewohnheiten und Übungen
|
||||
- Anpassbare Atemsitzungen und Meditationstimer
|
||||
- Gewohnheitstracking mit Sitzungsverlauf
|
||||
- Mind, Yoga und Fitness für verschiedene Übungsroutinen
|
||||
- Anpassbare Atemsitzungen, Meditationstimer und Zähler
|
||||
- Gewohnheitstracking mit Verlauf und verknüpften Übungszahlen
|
||||
- Optionale Synchronisierung von Gewohnheiten, Sitzungen und Fortschritt
|
||||
- Lokale Speicherung mit Import und Export
|
||||
- Anpassbare Designs mit hellen und dunklen Varianten
|
||||
- Touch-optimierte Oberfläche für Mobilgeräte
|
||||
|
||||
Verfügbare Plattformen: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Eine freie App für Atmung, Meditation und Gewohnheiten.
|
||||
Atmung, Meditation und Gewohnheiten mit Synchronisierung.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Fixed
|
||||
- Import now restores habits, habit sync settings, and optionally app settings from Inbe SQLite exports.
|
||||
@@ -0,0 +1,3 @@
|
||||
### Changed
|
||||
- Reorganized WHM and Meditation into practice-owned modules for cleaner code boundaries.
|
||||
- Split the meditation manual into an image intro page and a shorter music/gong setup page.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Fixed
|
||||
- Improved Android data import for `.db` backups, weekly habit rows, and import conflict handling.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Fixed
|
||||
- Fixed Tickmate `.db` imports so zero-based months map correctly and long habit histories load without dropping later dates.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Added
|
||||
- optional sync client, offline account creation
|
||||
@@ -0,0 +1,2 @@
|
||||
### Changed
|
||||
- Improve account management
|
||||
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
- Improve sync auth, websocket reconnects, and queued habit/session updates.
|
||||
- Reduce SQLite-related UI flicker and speed up bulk import sync queueing.
|
||||
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
- Refresh expired native sync auth tokens before sending queued changes.
|
||||
- Require first-time meditation users to continue through the tutorial before starting.
|
||||
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
- Build the Ubuntu Touch Click package with the OpenStore package id and review-compatible control metadata.
|
||||
- Omit Click AppStream metadata by default to avoid OpenStore revision import failures.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Changed
|
||||
- Fix spacing issues and translations
|
||||
@@ -0,0 +1,4 @@
|
||||
### Changed
|
||||
- Add a responsive Flint sidebar, configurable bottom navigation, and independent Statistics screen.
|
||||
### Fixed
|
||||
- Preserve queued local habit counter settings when applying sync responses.
|
||||
@@ -2,11 +2,9 @@ A free, open-source practice app for breathing, meditation, and habit tracking.
|
||||
|
||||
Features:
|
||||
- Guided practice sessions with visual and audio cues
|
||||
- Mind, Yoga, and Fitness organization for habits and practice views
|
||||
- Configurable breathing sessions and meditation timers
|
||||
- Habit tracking with session history
|
||||
- Mind, Yoga, and Fitness organization for different practice routines
|
||||
- Customizable breathing sessions, meditation timers, and habit counters
|
||||
- Habit tracking with session history and linked practice counts
|
||||
- Optional sync for habits, sessions, and practice progress
|
||||
- Local storage with import/export support
|
||||
- Theme customization with light and dark variants
|
||||
- Touch-optimized UI for mobile devices
|
||||
|
||||
Available platforms: Linux, Windows, Android, WebAssembly.
|
||||
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 169 KiB |
@@ -1 +1 @@
|
||||
A free, open-source app for breathing, meditation, and habit tracking.
|
||||
Syncable breathing, meditation, and habit practice app.
|
||||
@@ -2,11 +2,9 @@ Una app libre y de código abierto para respiración, meditación y hábitos.
|
||||
|
||||
Funciones:
|
||||
- Prácticas guiadas con señales visuales y de audio
|
||||
- Organización Mind, Yoga y Fitness para hábitos y prácticas
|
||||
- Sesiones de respiración y temporizadores de meditación configurables
|
||||
- Seguimiento de hábitos con historial de sesiones
|
||||
- Organización Mind, Yoga y Fitness para distintas rutinas de práctica
|
||||
- Sesiones de respiración, temporizadores y contadores configurables
|
||||
- Seguimiento de hábitos con historial y recuentos vinculados a prácticas
|
||||
- Sincronización opcional de hábitos, sesiones y progreso
|
||||
- Almacenamiento local con importación y exportación
|
||||
- Temas personalizables con variantes claras y oscuras
|
||||
- Interfaz optimizada para pantallas táctiles
|
||||
|
||||
Plataformas disponibles: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Una app libre para respiración, meditación y hábitos.
|
||||
Respiración, meditación y hábitos con sincronización.
|
||||
@@ -2,11 +2,9 @@ Une app libre et open source pour respiration, méditation et habitudes.
|
||||
|
||||
Fonctionnalités :
|
||||
- Pratiques guidées avec repères visuels et audio
|
||||
- Organisation Mind, Yoga et Fitness pour habitudes et pratiques
|
||||
- Séances de respiration et minuteries de méditation configurables
|
||||
- Suivi des habitudes avec historique des séances
|
||||
- Organisation Mind, Yoga et Fitness pour différentes routines
|
||||
- Séances de respiration, minuteries et compteurs personnalisables
|
||||
- Suivi des habitudes avec historique et comptes liés aux pratiques
|
||||
- Synchronisation optionnelle des habitudes, séances et progrès
|
||||
- Stockage local avec import et export
|
||||
- Thèmes personnalisables avec variantes claires et sombres
|
||||
- Interface optimisée pour les écrans tactiles
|
||||
|
||||
Plateformes disponibles : Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Une app libre pour respiration, méditation et habitudes.
|
||||
Respiration, méditation et habitudes avec synchronisation.
|
||||
@@ -2,11 +2,9 @@ Um app livre e de código aberto para respiração, meditação e hábitos.
|
||||
|
||||
Recursos:
|
||||
- Práticas guiadas com sinais visuais e sonoros
|
||||
- Organização Mind, Yoga e Fitness para hábitos e práticas
|
||||
- Sessões de respiração e timers de meditação configuráveis
|
||||
- Acompanhamento de hábitos com histórico de sessões
|
||||
- Organização Mind, Yoga e Fitness para diferentes rotinas de prática
|
||||
- Sessões de respiração, timers de meditação e contadores configuráveis
|
||||
- Acompanhamento de hábitos com histórico e contagens ligadas às práticas
|
||||
- Sincronização opcional de hábitos, sessões e progresso
|
||||
- Armazenamento local com importação e exportação
|
||||
- Temas personalizáveis com variantes claras e escuras
|
||||
- Interface otimizada para toque em dispositivos móveis
|
||||
|
||||
Plataformas disponíveis: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Um app livre para respiração, meditação e hábitos.
|
||||
Respiração, meditação e hábitos com sincronização.
|
||||
@@ -64,7 +64,7 @@
|
||||
buildToolsVersions = [ "34.0.0" ];
|
||||
platformVersions = [ "34" "35" ];
|
||||
includeNDK = true;
|
||||
ndkVersions = [ "25.1.8937393" ];
|
||||
ndkVersions = [ "28.2.13676358" ];
|
||||
cmakeVersions = [ "3.22.1" ];
|
||||
includeEmulator = true;
|
||||
includeSystemImages = true;
|
||||
@@ -78,6 +78,7 @@
|
||||
pkgConfigPath = pkgs.lib.makeSearchPath "lib/pkgconfig" [
|
||||
sdl2Pkgs.SDL2.dev
|
||||
pkgs.curl.dev
|
||||
pkgs.openssl.dev
|
||||
pkgs.libdrm.dev
|
||||
pkgs.libgbm
|
||||
pkgs.libglvnd.dev
|
||||
@@ -85,9 +86,12 @@
|
||||
|
||||
aarch64PkgConfigPath = pkgs.lib.makeSearchPath "lib/pkgconfig" [
|
||||
aarch64Pkgs.SDL2.dev
|
||||
aarch64Pkgs.curl.dev
|
||||
aarch64Pkgs.openssl.dev
|
||||
aarch64Pkgs.libdrm.dev
|
||||
aarch64Pkgs.libgbm
|
||||
aarch64Pkgs.libglvnd.dev
|
||||
aarch64Pkgs.zlib.dev
|
||||
];
|
||||
|
||||
windowsTargetPkgs = pkgs.lib.optionals windowsCrossEnabled [
|
||||
@@ -189,6 +193,8 @@ EOF
|
||||
sdl2Pkgs.SDL2
|
||||
sdl2Pkgs.SDL2.dev
|
||||
butler
|
||||
binutils
|
||||
clickable
|
||||
cmake
|
||||
curl
|
||||
curl.dev
|
||||
@@ -199,33 +205,50 @@ EOF
|
||||
gradle
|
||||
imagemagick
|
||||
jdk17
|
||||
libxml2
|
||||
libdrm
|
||||
libdrm.dev
|
||||
libgbm
|
||||
libglvnd
|
||||
libglvnd.dev
|
||||
alsa-lib
|
||||
appimagetool
|
||||
libpulseaudio
|
||||
linuxdeploy
|
||||
linuxdeployPluginAppImage
|
||||
mesa
|
||||
ncurses
|
||||
ninja
|
||||
openssl
|
||||
openssl.dev
|
||||
patchelf
|
||||
pkg-config
|
||||
pipewire
|
||||
rsync
|
||||
xvfb-run
|
||||
zlib
|
||||
zip
|
||||
aarch64Pkgs.stdenv.cc
|
||||
aarch64Pkgs.SDL2
|
||||
aarch64Pkgs.SDL2.dev
|
||||
aarch64Pkgs.curl
|
||||
aarch64Pkgs.curl.dev
|
||||
aarch64Pkgs.openssl
|
||||
aarch64Pkgs.openssl.dev
|
||||
aarch64Pkgs.libdrm
|
||||
aarch64Pkgs.libdrm.dev
|
||||
aarch64Pkgs.libgbm
|
||||
aarch64Pkgs.libglvnd
|
||||
aarch64Pkgs.libglvnd.dev
|
||||
aarch64Pkgs.zlib
|
||||
aarch64Pkgs.zlib.dev
|
||||
] ++ windowsTargetPkgs;
|
||||
|
||||
profile = ''
|
||||
export JAVA_HOME="${pkgs.jdk17.home}"
|
||||
export OPENSSL_INCLUDE_DIR="${pkgs.openssl.dev}/include"
|
||||
export OPENSSL_SSL_LIBRARY="${pkgs.openssl.out}/lib/libssl.so"
|
||||
export OPENSSL_CRYPTO_LIBRARY="${pkgs.openssl.out}/lib/libcrypto.so"
|
||||
|
||||
# Android SDK - override any system ANDROID_HOME
|
||||
export ANDROID_HOME="${sdk}/libexec/android-sdk"
|
||||
@@ -255,6 +278,7 @@ EOF
|
||||
|
||||
export AARCH64_CC="${aarch64Pkgs.stdenv.cc}/bin/${aarch64Pkgs.stdenv.cc.targetPrefix}cc"
|
||||
export AARCH64_AR="${aarch64Pkgs.stdenv.cc.bintools.bintools}/bin/${aarch64Pkgs.stdenv.cc.targetPrefix}ar"
|
||||
export AARCH64_RANLIB="${aarch64Pkgs.stdenv.cc.bintools.bintools}/bin/${aarch64Pkgs.stdenv.cc.targetPrefix}ranlib"
|
||||
export AARCH64_PKG_CONFIG_PATH="${aarch64PkgConfigPath}"
|
||||
export AARCH64_RAY_SDL_CFLAGS="-D_GNU_SOURCE=1 -D_REENTRANT -I${aarch64Pkgs.SDL2.dev}/include -I${aarch64Pkgs.SDL2.dev}/include/SDL2"
|
||||
export AARCH64_RAY_SDL_LDLIBS="-L${aarch64Pkgs.SDL2}/lib -lSDL2"
|
||||
@@ -263,15 +287,21 @@ EOF
|
||||
export AARCH64_RAY_CFLAGS="$AARCH64_RAY_SDL_CFLAGS $AARCH64_RAY_GL_CFLAGS"
|
||||
export AARCH64_RAY_LDLIBS="$AARCH64_RAY_SDL_LDLIBS $AARCH64_RAY_GL_LDLIBS"
|
||||
export AARCH64_RAY_SDL_INCLUDE_DIR="${aarch64Pkgs.SDL2.dev}/include"
|
||||
export AARCH64_FLINT_CURL_CFLAGS="$(PKG_CONFIG_PATH="$AARCH64_PKG_CONFIG_PATH" pkg-config --cflags libcurl)"
|
||||
export AARCH64_FLINT_CURL_LDLIBS="$(PKG_CONFIG_PATH="$AARCH64_PKG_CONFIG_PATH" pkg-config --libs libcurl)"
|
||||
export AARCH64_CLICK_RUNTIME_LIBS="${aarch64Pkgs.SDL2}/lib/libSDL2-2.0.so.0 ${aarch64Pkgs.curl.out}/lib/libcurl.so.4 ${aarch64Pkgs.openssl.out}/lib/libssl.so.3 ${aarch64Pkgs.openssl.out}/lib/libcrypto.so.3 ${aarch64Pkgs.libdrm}/lib/libdrm.so.2 ${aarch64Pkgs.libgbm}/lib/libgbm.so.1 ${aarch64Pkgs.libglvnd}/lib/libEGL.so.1 ${aarch64Pkgs.libglvnd}/lib/libGLESv2.so.2 ${aarch64Pkgs.zlib}/lib/libz.so.1"
|
||||
|
||||
${windowsProfile}
|
||||
|
||||
for project in inbe; do
|
||||
if [ -d "$project/droid" ]; then
|
||||
android_local_sdk="$ANDROID_SDK_ROOT"
|
||||
if [ -d /mnt/storage/Android/Sdk/ndk/28.2.13676358 ]; then
|
||||
android_local_sdk="/mnt/storage/Android/Sdk"
|
||||
fi
|
||||
cat > "$project/droid/local.properties" <<EOF
|
||||
sdk.dir=$ANDROID_SDK_ROOT
|
||||
ndk.dir=$ANDROID_NDK_ROOT
|
||||
cmake.dir=$ANDROID_SDK_ROOT/cmake/3.22.1
|
||||
sdk.dir=$android_local_sdk
|
||||
cmake.dir=$android_local_sdk/cmake/3.22.1
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
|
||||
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 150 B |
@@ -37,12 +37,14 @@ int flint_file_dialog_save(FlintFileDialog *dlg, const char *title, const char *
|
||||
|
||||
/* Load file dialog - returns 1 if file selected, 0 if cancelled */
|
||||
int flint_file_dialog_load(FlintFileDialog *dlg, const char *title);
|
||||
int flint_file_dialog_load_filtered(FlintFileDialog *dlg, const char *title, const char *filter);
|
||||
|
||||
/* Select folder dialog - returns 1 if folder selected, 0 if cancelled */
|
||||
int flint_file_dialog_select_folder(FlintFileDialog *dlg, const char *title);
|
||||
|
||||
/* Begin non-blocking dialogs. Call flint_file_dialog_update() each frame while active. */
|
||||
void flint_file_dialog_begin_load(FlintFileDialog *dlg, const char *title);
|
||||
void flint_file_dialog_begin_load_filtered(FlintFileDialog *dlg, const char *title, const char *filter);
|
||||
void flint_file_dialog_begin_save(FlintFileDialog *dlg, const char *title, const char *default_filename);
|
||||
|
||||
/* Draw/update active dialog: 1 confirmed, 0 cancelled, -1 still active. */
|
||||
|
||||
@@ -5,12 +5,8 @@
|
||||
|
||||
#define FLINT_TEXT_8 8
|
||||
#define FLINT_TEXT_12 12
|
||||
#define FLINT_TEXT_14 14
|
||||
#define FLINT_TEXT_16 16
|
||||
#define FLINT_TEXT_18 18
|
||||
#define FLINT_TEXT_20 20
|
||||
#define FLINT_TEXT_24 24
|
||||
#define FLINT_TEXT_32 32
|
||||
#define FLINT_TEXT_BASE_SIZE 16
|
||||
|
||||
void flint_text_set_font(Font font);
|
||||
@@ -19,16 +15,14 @@ Font flint_text_font(void);
|
||||
Font flint_text_load_chopped_font(const char *png_path, const char *dat_path, int base_size);
|
||||
Font flint_text_load_chopped_font_from_memory(const unsigned char *png_data, unsigned int png_size, const unsigned char *dat_data, unsigned int dat_size, int base_size);
|
||||
void flint_text_unload_font(Font *font);
|
||||
int flint_text_size(int preferred_size);
|
||||
int flint_text_dpi_size(int base_size);
|
||||
int flint_text_measure(const char *text, int font_size);
|
||||
int flint_text_height(const char *text, int font_size);
|
||||
int flint_text_line_height(int font_size);
|
||||
int flint_text_measure_scaled(const char *text, int scale);
|
||||
void flint_text_draw(const char *text, int x, int y, int font_size, Color color);
|
||||
void flint_text_draw_scaled(const char *text, int x, int y, int scale, Color color);
|
||||
void flint_text_draw_centered(const char *text, int center_x, int center_y, int font_size, Color color);
|
||||
void flint_text_draw_in_rect(const char *text, Rectangle rect, int font_size, Color color);
|
||||
void flint_text_draw_fitted_in_rect(const char *text, Rectangle rect, int preferred_size, int min_size, Color color);
|
||||
int flint_text_y(const char *text, int box_y, int box_h, int font_size);
|
||||
int flint_text_y_scaled(const char *text, int box_y, int box_h, int scale);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define FLINT_THEME_COUNT 10
|
||||
#define FLINT_THEME_COUNT 12
|
||||
|
||||
typedef enum {
|
||||
FLINT_THEME_SKY = 0,
|
||||
@@ -17,7 +17,9 @@ typedef enum {
|
||||
FLINT_THEME_DAWN = 6,
|
||||
FLINT_THEME_SAGE = 7,
|
||||
FLINT_THEME_INK = 8,
|
||||
FLINT_THEME_MONO = 9
|
||||
FLINT_THEME_MONO = 9,
|
||||
FLINT_THEME_MINT = 10,
|
||||
FLINT_THEME_COBALT = 11
|
||||
} FlintThemeId;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -60,6 +60,194 @@ typedef struct {
|
||||
float radius;
|
||||
} FlintUIIconButton;
|
||||
|
||||
typedef struct {
|
||||
int id;
|
||||
int x;
|
||||
int y;
|
||||
int icon_size;
|
||||
int icon_padding;
|
||||
Texture2D icon;
|
||||
int *open;
|
||||
int *value;
|
||||
int min;
|
||||
int max;
|
||||
int popup_width;
|
||||
int popup_height;
|
||||
} FlintUIIconSliderPopup;
|
||||
|
||||
typedef struct {
|
||||
Texture2D icon;
|
||||
int disabled;
|
||||
} FlintUIIconRowItem;
|
||||
|
||||
typedef struct {
|
||||
int center_x;
|
||||
int view_width;
|
||||
int view_height;
|
||||
int count;
|
||||
const FlintUIIconRowItem *items;
|
||||
int icon_size;
|
||||
int icon_padding;
|
||||
int gap;
|
||||
int side_margin;
|
||||
int bottom_margin;
|
||||
int max_button_width;
|
||||
int min_icon_size;
|
||||
int min_icon_padding;
|
||||
int min_gap;
|
||||
} FlintUIBottomIconRow;
|
||||
|
||||
typedef struct {
|
||||
int clicked_index;
|
||||
int y;
|
||||
int button_width;
|
||||
} FlintUIIconRowResult;
|
||||
|
||||
typedef struct {
|
||||
int route;
|
||||
const char *label;
|
||||
Texture2D icon;
|
||||
int active;
|
||||
int disabled;
|
||||
} FlintUIBottomNavItem;
|
||||
|
||||
typedef struct {
|
||||
int view_width;
|
||||
int view_height;
|
||||
int count;
|
||||
const FlintUIBottomNavItem *items;
|
||||
int height;
|
||||
int icon_size;
|
||||
int icon_padding;
|
||||
int side_margin;
|
||||
int bottom_margin;
|
||||
int max_button_width;
|
||||
} FlintUIBottomNav;
|
||||
|
||||
typedef struct {
|
||||
int clicked_index;
|
||||
int clicked_route;
|
||||
int y;
|
||||
int height;
|
||||
} FlintUIBottomNavResult;
|
||||
|
||||
typedef struct {
|
||||
int route;
|
||||
const char *label;
|
||||
Texture2D icon;
|
||||
} FlintUIBottomNavOption;
|
||||
|
||||
typedef struct {
|
||||
int id;
|
||||
const char *title;
|
||||
int *routes;
|
||||
int *route_count;
|
||||
int max_route_count;
|
||||
const char **slot_labels;
|
||||
const FlintUIBottomNavOption *options;
|
||||
int option_count;
|
||||
const char *add_label;
|
||||
const char *cancel_label;
|
||||
const char *save_label;
|
||||
const char *reset_label;
|
||||
Texture2D close_icon;
|
||||
} FlintUIBottomNavConfigModal;
|
||||
|
||||
typedef struct {
|
||||
int action;
|
||||
int changed;
|
||||
} FlintUIBottomNavConfigResult;
|
||||
|
||||
typedef struct {
|
||||
const char *message;
|
||||
int width;
|
||||
int header_h;
|
||||
int button_h;
|
||||
int line_gap;
|
||||
int extra_lines;
|
||||
int min_height;
|
||||
int font;
|
||||
} FlintUIParagraphModalMeasure;
|
||||
|
||||
typedef struct {
|
||||
Texture2D icon;
|
||||
int disabled;
|
||||
} FlintUIToolbarAction;
|
||||
|
||||
typedef struct {
|
||||
int id;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
int draw_menu;
|
||||
const char **options;
|
||||
int option_count;
|
||||
int *selected_index;
|
||||
int dropdown_min_width;
|
||||
int dropdown_max_width;
|
||||
int dropdown_height;
|
||||
const FlintUIToolbarAction *actions;
|
||||
int action_count;
|
||||
int action_icon_size;
|
||||
int action_icon_padding;
|
||||
int action_gap;
|
||||
int side_padding;
|
||||
} FlintUIToolbar;
|
||||
|
||||
typedef struct {
|
||||
int selected_menu_item;
|
||||
int clicked_action;
|
||||
} FlintUIToolbarResult;
|
||||
|
||||
typedef struct {
|
||||
FlintUIToolbar toolbar;
|
||||
Texture2D leading_icon;
|
||||
int leading_width;
|
||||
int leading_icon_size;
|
||||
int leading_icon_padding;
|
||||
} FlintUIToolbarHeader;
|
||||
|
||||
typedef struct {
|
||||
FlintUIToolbarResult toolbar;
|
||||
int leading_clicked;
|
||||
} FlintUIToolbarHeaderResult;
|
||||
|
||||
typedef struct {
|
||||
const char *text;
|
||||
int font;
|
||||
Color color;
|
||||
} FlintUIInfoRow;
|
||||
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int row_height;
|
||||
int padding_x;
|
||||
const FlintUIInfoRow *rows;
|
||||
int row_count;
|
||||
Color background;
|
||||
Color separator;
|
||||
Color default_text;
|
||||
} FlintUIInfoRows;
|
||||
|
||||
typedef struct {
|
||||
const char *label;
|
||||
UIButtonStyle style;
|
||||
int disabled;
|
||||
} FlintUIButtonRowItem;
|
||||
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
int gap;
|
||||
const FlintUIButtonRowItem *items;
|
||||
int count;
|
||||
} FlintUIButtonRow;
|
||||
|
||||
typedef struct {
|
||||
Rectangle bounds;
|
||||
const char *text;
|
||||
@@ -98,6 +286,33 @@ typedef struct {
|
||||
int *commit_pressed;
|
||||
} FlintUITextField;
|
||||
|
||||
typedef struct {
|
||||
const char *label;
|
||||
FlintUITextField field;
|
||||
int label_font;
|
||||
int label_h;
|
||||
int field_h;
|
||||
int gap;
|
||||
int bottom_gap;
|
||||
Color label_color;
|
||||
} FlintUILabelTextField;
|
||||
|
||||
typedef struct {
|
||||
const char *label;
|
||||
int font;
|
||||
int info_button;
|
||||
int icon_diameter;
|
||||
int height;
|
||||
Color color;
|
||||
} FlintUISectionLabel;
|
||||
|
||||
typedef struct {
|
||||
const char *label;
|
||||
int *value;
|
||||
int height;
|
||||
int disabled;
|
||||
} FlintUICheckboxRow;
|
||||
|
||||
typedef struct {
|
||||
const char *text;
|
||||
Texture2D icon;
|
||||
@@ -111,6 +326,8 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
const char *label;
|
||||
Texture2D icon;
|
||||
int icon_size;
|
||||
int disabled;
|
||||
Color accent;
|
||||
} FlintUISubtab;
|
||||
@@ -161,6 +378,31 @@ typedef struct {
|
||||
int right_clicked;
|
||||
} FlintUIHeader;
|
||||
|
||||
typedef int (*FlintUIScrollPageHeightFn)(int content_width, void *user_data);
|
||||
|
||||
typedef struct {
|
||||
int y;
|
||||
int height;
|
||||
int max_content_width;
|
||||
int min_content_width;
|
||||
int side_padding;
|
||||
int *scroll_offset;
|
||||
int wheel_step;
|
||||
int scrollbar_x;
|
||||
int measure_passes;
|
||||
FlintUIScrollPageHeightFn content_height;
|
||||
void *user_data;
|
||||
} FlintUIScrollPageSpec;
|
||||
|
||||
typedef struct {
|
||||
FlintUIScrollArea area;
|
||||
FlintUIScrollView view;
|
||||
int content_x;
|
||||
int content_y;
|
||||
int content_w;
|
||||
int content_h;
|
||||
} FlintUIScrollPage;
|
||||
|
||||
typedef void (*FlintUITextInputPlatformCallback)(int active);
|
||||
|
||||
void ui_init(int width, int height, float dpi);
|
||||
@@ -172,9 +414,11 @@ void ui_set_cursor_disabled(int *cursor_disabled);
|
||||
void ui_set_icons(Texture2D gear_icon, Texture2D x_icon);
|
||||
void ui_set_input_blocked(int blocked);
|
||||
int ui_input_captures_click(Vector2 point);
|
||||
int ui_hover_effects_enabled(void);
|
||||
/* DPI scaling, color, and layout functions now from Flint: flint_px, flint_clamp_px, flint_lighten, flint_darken, flint_centered_column, flint_page_side_padding */
|
||||
int flint_ui_font(void);
|
||||
int flint_ui_font_small(void);
|
||||
int flint_ui_title_font(const char *title, int max_width);
|
||||
int flint_ui_text_y(const char *text, int box_y, int box_h, int font);
|
||||
void flint_ui_draw_text_centered(const char *text, int center_x, int center_y, int font, Color color);
|
||||
void flint_ui_draw_text_left_in_rect(const char *text, Rectangle rect, int font_size, Color color);
|
||||
@@ -198,6 +442,23 @@ int ui_icon_btn_size(UIIconSize size);
|
||||
int ui_icon_btn_padding(UIIconSize size);
|
||||
int ui_draw_icon_btn(int x, int y, UIIconSize size, Texture2D icon, int *hover);
|
||||
int ui_draw_icon_btn_padded(int x, int y, int size, int padding, Texture2D icon, int *hover);
|
||||
int ui_draw_info_button(int center_x, int center_y, int diameter);
|
||||
int ui_draw_icon_slider_popup(FlintUIIconSliderPopup popup);
|
||||
FlintUIIconRowResult ui_draw_bottom_icon_row(FlintUIBottomIconRow row);
|
||||
int ui_bottom_nav_height(void);
|
||||
FlintUIBottomNavResult ui_draw_bottom_nav(FlintUIBottomNav nav);
|
||||
FlintUIBottomNavConfigResult ui_draw_bottom_nav_config_modal(FlintUIBottomNavConfigModal modal);
|
||||
FlintUIToolbarResult ui_draw_toolbar(FlintUIToolbar toolbar);
|
||||
FlintUIToolbarHeaderResult ui_draw_toolbar_header(FlintUIToolbarHeader header);
|
||||
void ui_draw_info_rows(FlintUIInfoRows rows);
|
||||
int ui_label_text_field_height(FlintUILabelTextField row);
|
||||
int ui_draw_label_text_field(FlintUILabelTextField row, int x, int y, int w);
|
||||
int ui_section_label_height(FlintUISectionLabel label);
|
||||
int ui_draw_section_label(FlintUISectionLabel label, int x, int y);
|
||||
int ui_checkbox_row_height(FlintUICheckboxRow row);
|
||||
int ui_draw_checkbox_row(FlintUICheckboxRow row, int x, int y);
|
||||
int ui_button_row_height(FlintUIButtonRow row);
|
||||
int ui_draw_button_row(FlintUIButtonRow row);
|
||||
int ui_draw_text_btn(int x, int y, const char *label, int *hover);
|
||||
|
||||
/* Generic button component with unified styling */
|
||||
@@ -216,37 +477,24 @@ int ui_draw_slider_vertical_with_marks(int id, int x, int y, int h,
|
||||
int ui_draw_toggle_switch(int x, int y, int w, int h, int *value,
|
||||
const char *off_label, const char *on_label);
|
||||
int ui_draw_checkbox_toggle(int x, int y, const char *label, int *value);
|
||||
int ui_draw_checkbox_toggle_disabled(int x, int y, const char *label,
|
||||
int *value, int disabled);
|
||||
int ui_draw_dropdown_button(int id, int x, int y, int w, int h, const char **options, int option_count, int *selected_index);
|
||||
int ui_draw_dropdown_menu(int id);
|
||||
int ui_dropdown_captures_click(Vector2 point);
|
||||
void ui_set_dropdown_clip_top(int top);
|
||||
void ui_set_dropdown_clip_bottom(int bottom);
|
||||
int ui_draw_theme_switcher(int x, int y, int w, const char *label,
|
||||
const char *light_label, const char *dark_label,
|
||||
int *theme_id, int *dark_mode);
|
||||
int ui_draw_theme_picker(int x, int y, int w, const char *label,
|
||||
int dark_mode, int *theme_id);
|
||||
int ui_theme_picker_height(int w);
|
||||
typedef struct UITab {
|
||||
const char *label;
|
||||
Texture2D icon;
|
||||
UIIconType icon_type;
|
||||
void (*on_click)(void *user_data);
|
||||
void *user_data;
|
||||
} UITab;
|
||||
|
||||
typedef struct UITabBar {
|
||||
UITab *tabs;
|
||||
int count;
|
||||
} UITabBar;
|
||||
|
||||
int ui_nav_button_width(const char *label, int icon_size, int show_label, int font);
|
||||
int ui_draw_nav_button(int x, int y, int icon_size, Texture2D icon, const char *label, int show_label, int *hover);
|
||||
int ui_draw_nav_button_expand(int x, int y, int icon_size, int w, Texture2D icon, const char *label, int show_label, int *hover);
|
||||
void ui_draw_tab_bar(UITab *tabs, int count);
|
||||
void ui_draw_tutorial_image_placeholder(const char *label, int x, int y, int w, int h);
|
||||
void ui_draw_tutorial_image(Texture2D texture, const char *fallback, int x, int y, int w, int h);
|
||||
int ui_draw_modal(const char *title, const char *message, const char *cancel_btn, const char *confirm_btn);
|
||||
int ui_draw_modal_3btn(const char *title, const char *message, const char *left_btn, const char *middle_btn, const char *right_btn);
|
||||
int ui_paragraph_modal_height(FlintUIParagraphModalMeasure measure);
|
||||
int ui_draw_screen_header(const char *title, int show_close);
|
||||
int ui_screen_header_height(void);
|
||||
FlintUIHeader ui_draw_title_header(int height, const char *title,
|
||||
@@ -262,6 +510,8 @@ int ui_scrollbar_safe_content_width(int content_x, int content_width,
|
||||
FlintUIScrollView ui_scroll_container_measure(FlintUIScrollArea area);
|
||||
FlintUIScrollView ui_scroll_container_begin(FlintUIScrollArea area);
|
||||
void ui_scroll_container_end(FlintUIScrollArea area, FlintUIScrollView view);
|
||||
FlintUIScrollPage ui_scroll_page_begin(FlintUIScrollPageSpec spec);
|
||||
void ui_scroll_page_end(FlintUIScrollPage page);
|
||||
int ui_draw_scrollbar(int x, int y, int viewport_h, int content_h, int *scroll_offset, int max_scroll);
|
||||
|
||||
void ui_focus_begin(void);
|
||||
|
||||
@@ -38,6 +38,10 @@ void flint_file_dialog_set_theme_scope(const char *scope) {
|
||||
|
||||
static FlintFileDialogInternal *create_internal(void) {
|
||||
FlintFileDialogInternal *internal = calloc(1, sizeof(FlintFileDialogInternal));
|
||||
if(internal != NULL) {
|
||||
internal->hover_index = -1;
|
||||
internal->last_clicked_index = -1;
|
||||
}
|
||||
return internal;
|
||||
}
|
||||
|
||||
@@ -214,6 +218,9 @@ static int scan_directory(FlintFileDialogInternal *internal) {
|
||||
qsort(internal->entries, internal->file_count,
|
||||
sizeof(DirEntry), compare_entries);
|
||||
}
|
||||
internal->hover_index = -1;
|
||||
internal->last_clicked_index = -1;
|
||||
internal->last_click_time = 0.0f;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -306,7 +313,7 @@ static void render_file_list(FlintFileDialog *dlg, Rectangle dialog_rect) {
|
||||
int list_x = dialog_rect.x + flint_px(16);
|
||||
int scrollbar_w = flint_px(12);
|
||||
int list_width = dialog_rect.width - flint_px(32);
|
||||
int bottom_y = dialog_rect.y + internal->dialog_height - flint_px(72);
|
||||
int bottom_y = dialog_rect.y + internal->dialog_height - flint_px(112);
|
||||
int list_height = bottom_y - list_y;
|
||||
if(list_height < FILE_DIALOG_ITEM_HEIGHT)
|
||||
list_height = FILE_DIALOG_ITEM_HEIGHT;
|
||||
@@ -401,12 +408,11 @@ static void render_scrollbar(FlintFileDialog *dlg, Rectangle dialog_rect) {
|
||||
static void render_filename_input(FlintFileDialog *dlg, Rectangle dialog_rect) {
|
||||
FlintFileDialogInternal *internal = (FlintFileDialogInternal *)dlg->_internal;
|
||||
|
||||
int input_y = dialog_rect.y + internal->dialog_height - flint_px(58);
|
||||
int input_y = dialog_rect.y + internal->dialog_height - flint_px(96);
|
||||
int input_x = dialog_rect.x + flint_px(16);
|
||||
int font = flint_ui_font_small();
|
||||
int label_width = flint_text_measure("Filename:", font) + flint_px(8);
|
||||
int button_area_width = flint_px(176);
|
||||
int input_width = dialog_rect.width - flint_px(32) - label_width - button_area_width;
|
||||
int input_width = dialog_rect.width - flint_px(32) - label_width;
|
||||
int input_height = flint_px(24);
|
||||
if(input_width < flint_px(24))
|
||||
input_width = flint_px(24);
|
||||
@@ -575,9 +581,10 @@ static int handle_mouse_input(FlintFileDialog *dlg) {
|
||||
if(hover_idx >= 0 && hover_idx < internal->file_count) {
|
||||
float current_time = GetTime();
|
||||
if(current_time - internal->last_click_time < 0.5 &&
|
||||
internal->hover_index == hover_idx) {
|
||||
internal->last_clicked_index == hover_idx) {
|
||||
if(internal->entries[hover_idx].is_dir) {
|
||||
navigate_into(internal, internal->entries[hover_idx].name);
|
||||
internal->last_clicked_index = -1;
|
||||
} else {
|
||||
copy_text(internal->selected_file, sizeof(internal->selected_file),
|
||||
internal->entries[hover_idx].name);
|
||||
@@ -595,6 +602,7 @@ static int handle_mouse_input(FlintFileDialog *dlg) {
|
||||
}
|
||||
|
||||
internal->last_click_time = current_time;
|
||||
internal->last_clicked_index = hover_idx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,7 +762,7 @@ run_dialog(FlintFileDialog *dlg)
|
||||
}
|
||||
|
||||
void
|
||||
flint_file_dialog_begin_load(FlintFileDialog *dlg, const char *title)
|
||||
flint_file_dialog_begin_load_filtered(FlintFileDialog *dlg, const char *title, const char *filter)
|
||||
{
|
||||
FlintFileDialogInternal *internal;
|
||||
|
||||
@@ -762,7 +770,7 @@ flint_file_dialog_begin_load(FlintFileDialog *dlg, const char *title)
|
||||
flint_file_dialog_init(dlg);
|
||||
dlg->mode = FLINT_FILE_DIALOG_LOAD;
|
||||
copy_text(dlg->title, sizeof(dlg->title), title);
|
||||
copy_text(dlg->filter, sizeof(dlg->filter), ".db,.zip");
|
||||
copy_text(dlg->filter, sizeof(dlg->filter), filter != NULL ? filter : "");
|
||||
dlg->active = 1;
|
||||
dlg->confirmed = 0;
|
||||
|
||||
@@ -771,10 +779,23 @@ flint_file_dialog_begin_load(FlintFileDialog *dlg, const char *title)
|
||||
scan_directory(internal);
|
||||
internal->filename_input[0] = '\0';
|
||||
internal->selected_file[0] = '\0';
|
||||
internal->hover_index = 0;
|
||||
internal->hover_index = -1;
|
||||
internal->last_clicked_index = -1;
|
||||
internal->focus_area = 0;
|
||||
}
|
||||
|
||||
void
|
||||
flint_file_dialog_begin_load(FlintFileDialog *dlg, const char *title)
|
||||
{
|
||||
flint_file_dialog_begin_load_filtered(dlg, title, NULL);
|
||||
}
|
||||
|
||||
int flint_file_dialog_load_filtered(FlintFileDialog *dlg, const char *title, const char *filter) {
|
||||
if(!dlg || !title) return 0;
|
||||
flint_file_dialog_begin_load_filtered(dlg, title, filter);
|
||||
return run_dialog(dlg);
|
||||
}
|
||||
|
||||
int flint_file_dialog_load(FlintFileDialog *dlg, const char *title) {
|
||||
if(!dlg || !title) return 0;
|
||||
flint_file_dialog_begin_load(dlg, title);
|
||||
@@ -839,7 +860,8 @@ int flint_file_dialog_select_folder(FlintFileDialog *dlg, const char *title) {
|
||||
FlintFileDialogInternal *internal = (FlintFileDialogInternal *)dlg->_internal;
|
||||
internal->filename_input[0] = '\0';
|
||||
internal->selected_file[0] = '\0';
|
||||
internal->hover_index = 0;
|
||||
internal->hover_index = -1;
|
||||
internal->last_clicked_index = -1;
|
||||
internal->focus_area = 0;
|
||||
|
||||
if(run_dialog(dlg)) {
|
||||
|
||||
@@ -27,6 +27,7 @@ typedef struct {
|
||||
DirEntry *entries;
|
||||
int scroll_offset;
|
||||
int hover_index;
|
||||
int last_clicked_index;
|
||||
int focus_area;
|
||||
Rectangle breadcrumb_rect;
|
||||
Rectangle file_list_rect;
|
||||
|
||||
@@ -844,17 +844,15 @@ static const unsigned char flint_icon_stack[] = {
|
||||
|
||||
static const unsigned char flint_icon_stat[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff,
|
||||
0x61, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x00, 0x6e, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xdd, 0x53, 0x41, 0x0e, 0xc0, 0x20, 0x08, 0x2b,
|
||||
0x8b, 0x2f, 0x52, 0xff, 0xff, 0x35, 0x76, 0x19, 0x4b, 0xc7, 0x20, 0x24, 0x64, 0xa7, 0xf5, 0xa2,
|
||||
0x52, 0xac, 0x55, 0x04, 0x7b, 0x4d, 0x55, 0x55, 0x45, 0x13, 0x47, 0x67, 0x93, 0x5e, 0x00, 0x80,
|
||||
0x11, 0x91, 0x3e, 0x26, 0x22, 0xe2, 0x79, 0x8b, 0x3d, 0x1c, 0x30, 0x69, 0x88, 0x44, 0x59, 0xf0,
|
||||
0x75, 0x05, 0x26, 0x79, 0xcd, 0xb6, 0x19, 0x23, 0x4a, 0xae, 0x44, 0x19, 0xe9, 0x23, 0x56, 0x95,
|
||||
0x31, 0xbe, 0x55, 0x85, 0xd4, 0x41, 0x76, 0x2a, 0xc7, 0x7d, 0xce, 0xb7, 0x0e, 0x7e, 0x20, 0xc0,
|
||||
0xf5, 0xae, 0xe6, 0x36, 0xde, 0x1f, 0xa9, 0xdb, 0x91, 0xb2, 0xd7, 0x6c, 0xb7, 0x32, 0x00, 0x9c,
|
||||
0x73, 0xd6, 0x3f, 0x54, 0x44, 0xc9, 0x6d, 0x34, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44,
|
||||
0xae, 0x42, 0x60, 0x82,
|
||||
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x08, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x77, 0x3d,
|
||||
0xf8, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x00, 0x50, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xed, 0x94, 0x41, 0x0a, 0x00, 0x20, 0x08, 0x04,
|
||||
0xd7, 0xe8, 0xff, 0x5f, 0xd0, 0x9f, 0x6e, 0xe7, 0x0e, 0x11, 0x95, 0x42, 0x82, 0x73, 0xd7, 0x51,
|
||||
0x59, 0x04, 0x8a, 0xef, 0x51, 0x55, 0x92, 0xe4, 0x6d, 0x7d, 0xf3, 0x1c, 0x26, 0xb7, 0x60, 0x75,
|
||||
0xca, 0x3c, 0x1b, 0xb8, 0x0a, 0x4e, 0x92, 0x35, 0x09, 0x5e, 0x23, 0xb9, 0x15, 0x44, 0x50, 0x82,
|
||||
0x12, 0x24, 0x10, 0xe4, 0x47, 0xbc, 0x5f, 0xc3, 0xd4, 0x5c, 0x44, 0xba, 0x99, 0x45, 0xf5, 0x07,
|
||||
0x00, 0x0c, 0x3d, 0xf1, 0x21, 0x64, 0x00, 0x66, 0x6f, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
|
||||
0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
static const unsigned char flint_icon_stripe[] = {
|
||||
@@ -1261,7 +1259,7 @@ const FlintIconAsset flint_icon_assets[] = {
|
||||
{UI_ICON_TYPE_SOUND3, "sound3", flint_icon_sound3, 278u},
|
||||
{UI_ICON_TYPE_SRHT, "srht", flint_icon_srht, 233u},
|
||||
{UI_ICON_TYPE_STACK, "stack", flint_icon_stack, 112u},
|
||||
{UI_ICON_TYPE_STAT, "stat", flint_icon_stat, 180u},
|
||||
{UI_ICON_TYPE_STAT, "stat", flint_icon_stat, 150u},
|
||||
{UI_ICON_TYPE_STRIPE, "stripe", flint_icon_stripe, 180u},
|
||||
{UI_ICON_TYPE_SUN, "sun", flint_icon_sun, 165u},
|
||||
{UI_ICON_TYPE_TCL, "tcl", flint_icon_tcl, 325u},
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <direct.h>
|
||||
#include <windows.h>
|
||||
#include <wininet.h>
|
||||
#define FLINT_MKDIR(path) _mkdir(path)
|
||||
#else
|
||||
#include <errno.h>
|
||||
@@ -208,6 +210,128 @@ fetch_failed(emscripten_fetch_t *fetch)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(__EMSCRIPTEN__)
|
||||
typedef struct WindowsDownloadContext {
|
||||
FlintRuntimeAssetDownload *download;
|
||||
} WindowsDownloadContext;
|
||||
|
||||
static void
|
||||
windows_set_last_error(FlintRuntimeAssetDownload *download, const char *prefix)
|
||||
{
|
||||
DWORD err = GetLastError();
|
||||
|
||||
if(download == NULL)
|
||||
return;
|
||||
snprintf(download->error, sizeof(download->error), "%s (%lu)",
|
||||
prefix != NULL ? prefix : "Windows download failed",
|
||||
(unsigned long)err);
|
||||
}
|
||||
|
||||
static DWORD WINAPI
|
||||
windows_download_thread_main(void *user_data)
|
||||
{
|
||||
WindowsDownloadContext *ctx = (WindowsDownloadContext *)user_data;
|
||||
FlintRuntimeAssetDownload *download = ctx != NULL ? ctx->download : NULL;
|
||||
HINTERNET internet = NULL;
|
||||
HINTERNET request = NULL;
|
||||
FILE *file = NULL;
|
||||
char status_buf[32];
|
||||
DWORD status_len = sizeof(status_buf);
|
||||
DWORD status_index = 0;
|
||||
char length_buf[64];
|
||||
DWORD length_len = sizeof(length_buf);
|
||||
DWORD length_index = 0;
|
||||
BYTE buffer[32768];
|
||||
DWORD bytes_read = 0;
|
||||
BOOL read_ok;
|
||||
|
||||
free(ctx);
|
||||
if(download == NULL)
|
||||
return 0;
|
||||
|
||||
file = fopen(download->path, "wb");
|
||||
if(file == NULL) {
|
||||
snprintf(download->error, sizeof(download->error), "failed to open %.200s", download->path);
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
internet = InternetOpenA("flint-runtime-assets/1",
|
||||
INTERNET_OPEN_TYPE_PRECONFIG,
|
||||
NULL, NULL, 0);
|
||||
if(internet == NULL) {
|
||||
fclose(file);
|
||||
windows_set_last_error(download, "failed to initialize Windows networking");
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
request = InternetOpenUrlA(internet, download->url, NULL, 0,
|
||||
INTERNET_FLAG_RELOAD |
|
||||
INTERNET_FLAG_NO_CACHE_WRITE |
|
||||
INTERNET_FLAG_PRAGMA_NOCACHE,
|
||||
0);
|
||||
if(request == NULL) {
|
||||
fclose(file);
|
||||
InternetCloseHandle(internet);
|
||||
remove(download->path);
|
||||
windows_set_last_error(download, "Windows download failed");
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(HttpQueryInfoA(request, HTTP_QUERY_STATUS_CODE, status_buf, &status_len, &status_index)) {
|
||||
status_buf[sizeof(status_buf) - 1] = '\0';
|
||||
download->http_status = strtol(status_buf, NULL, 10);
|
||||
}
|
||||
if(download->http_status < 200 || download->http_status >= 300) {
|
||||
snprintf(download->error, sizeof(download->error), "HTTP %ld", download->http_status);
|
||||
fclose(file);
|
||||
InternetCloseHandle(request);
|
||||
InternetCloseHandle(internet);
|
||||
remove(download->path);
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(HttpQueryInfoA(request, HTTP_QUERY_CONTENT_LENGTH, length_buf, &length_len, &length_index)) {
|
||||
length_buf[sizeof(length_buf) - 1] = '\0';
|
||||
download->total_bytes = (size_t)strtoull(length_buf, NULL, 10);
|
||||
}
|
||||
|
||||
while((read_ok = InternetReadFile(request, buffer, sizeof(buffer), &bytes_read)) && bytes_read > 0) {
|
||||
if(fwrite(buffer, 1, bytes_read, file) != bytes_read) {
|
||||
snprintf(download->error, sizeof(download->error), "failed to write %.200s", download->path);
|
||||
fclose(file);
|
||||
InternetCloseHandle(request);
|
||||
InternetCloseHandle(internet);
|
||||
remove(download->path);
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
download->bytes += (size_t)bytes_read;
|
||||
}
|
||||
|
||||
if(!read_ok) {
|
||||
fclose(file);
|
||||
InternetCloseHandle(request);
|
||||
InternetCloseHandle(internet);
|
||||
remove(download->path);
|
||||
windows_set_last_error(download, "Windows download failed");
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
InternetCloseHandle(request);
|
||||
InternetCloseHandle(internet);
|
||||
if(download->total_bytes == 0)
|
||||
download->total_bytes = download->bytes;
|
||||
download->status = FLINT_RUNTIME_ASSET_READY;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FLINT_HAS_LIBCURL) && !defined(__EMSCRIPTEN__)
|
||||
typedef struct NativeDownloadContext {
|
||||
FlintRuntimeAssetDownload *download;
|
||||
@@ -251,7 +375,7 @@ curl_thread_main(void *user_data)
|
||||
|
||||
file = fopen(download->path, "wb");
|
||||
if(file == NULL) {
|
||||
snprintf(download->error, sizeof(download->error), "failed to open %s", download->path);
|
||||
snprintf(download->error, sizeof(download->error), "failed to open %.200s", download->path);
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
@@ -348,6 +472,26 @@ flint_runtime_asset_download(FlintRuntimeAssetDownload *download,
|
||||
emscripten_fetch(&attr, download->url);
|
||||
return 1;
|
||||
}
|
||||
#elif defined(_WIN32)
|
||||
{
|
||||
HANDLE thread;
|
||||
WindowsDownloadContext *ctx = (WindowsDownloadContext *)calloc(1, sizeof(*ctx));
|
||||
if(ctx == NULL) {
|
||||
snprintf(download->error, sizeof(download->error), "out of memory");
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
ctx->download = download;
|
||||
thread = CreateThread(NULL, 0, windows_download_thread_main, ctx, 0, NULL);
|
||||
if(thread == NULL) {
|
||||
free(ctx);
|
||||
windows_set_last_error(download, "failed to create download thread");
|
||||
download->status = FLINT_RUNTIME_ASSET_ERROR;
|
||||
return 0;
|
||||
}
|
||||
CloseHandle(thread);
|
||||
return 1;
|
||||
}
|
||||
#elif defined(FLINT_HAS_LIBCURL)
|
||||
{
|
||||
pthread_t thread;
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
static Font g_flint_text_font = {0};
|
||||
static Font g_flint_text_small_font = {0};
|
||||
|
||||
static int
|
||||
font_valid(Font font)
|
||||
{
|
||||
return font.texture.id != 0 && font.glyphs != NULL && font.recs != NULL &&
|
||||
font.glyphCount > 0 && font.baseSize > 0;
|
||||
}
|
||||
|
||||
typedef struct FlintChoppedGlyph {
|
||||
int32_t value;
|
||||
int32_t x;
|
||||
@@ -25,9 +32,7 @@ typedef struct FlintChoppedGlyph {
|
||||
static Font
|
||||
active_font(void)
|
||||
{
|
||||
if(g_flint_text_font.texture.id != 0 && g_flint_text_font.glyphs != NULL &&
|
||||
g_flint_text_font.recs != NULL && g_flint_text_font.glyphCount > 0 &&
|
||||
g_flint_text_font.baseSize > 0)
|
||||
if(font_valid(g_flint_text_font))
|
||||
return g_flint_text_font;
|
||||
|
||||
return GetFontDefault();
|
||||
@@ -36,25 +41,33 @@ active_font(void)
|
||||
static Font
|
||||
active_font_for_size(int font_size)
|
||||
{
|
||||
if(font_size <= flint_px(FLINT_TEXT_8) &&
|
||||
g_flint_text_small_font.texture.id != 0 &&
|
||||
g_flint_text_small_font.glyphs != NULL &&
|
||||
g_flint_text_small_font.recs != NULL &&
|
||||
g_flint_text_small_font.glyphCount > 0 &&
|
||||
g_flint_text_small_font.baseSize > 0)
|
||||
if(font_size == FLINT_TEXT_8 && font_valid(g_flint_text_small_font))
|
||||
return g_flint_text_small_font;
|
||||
|
||||
return active_font();
|
||||
}
|
||||
|
||||
static int
|
||||
font_integer_scale(int font_size)
|
||||
{
|
||||
int target_size = flint_px(font_size);
|
||||
int base_size = FLINT_TEXT_BASE_SIZE;
|
||||
int scale;
|
||||
|
||||
if(target_size < base_size)
|
||||
target_size = base_size;
|
||||
scale = (target_size + base_size / 2) / base_size;
|
||||
return scale > 0 ? scale : 1;
|
||||
}
|
||||
|
||||
static float
|
||||
font_spacing(Font font, int font_size)
|
||||
{
|
||||
(void)font_size;
|
||||
if(font.baseSize <= 0)
|
||||
return 1.0f;
|
||||
|
||||
float spacing = (float)font_size / (float)font.baseSize;
|
||||
return spacing > 0.0f ? spacing : 1.0f;
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -227,57 +240,15 @@ flint_text_unload_font(Font *font)
|
||||
*font = (Font){0};
|
||||
}
|
||||
|
||||
int
|
||||
flint_text_size(int preferred_size)
|
||||
{
|
||||
static const int sizes[] = {
|
||||
FLINT_TEXT_8,
|
||||
FLINT_TEXT_12,
|
||||
FLINT_TEXT_14,
|
||||
FLINT_TEXT_16,
|
||||
FLINT_TEXT_18,
|
||||
FLINT_TEXT_20,
|
||||
FLINT_TEXT_24,
|
||||
FLINT_TEXT_32
|
||||
};
|
||||
int dpi_sizes[sizeof(sizes) / sizeof(sizes[0])];
|
||||
int best;
|
||||
int best_delta;
|
||||
|
||||
for(size_t i = 0; i < sizeof(sizes) / sizeof(sizes[0]); i++)
|
||||
dpi_sizes[i] = flint_px(sizes[i]);
|
||||
|
||||
best = dpi_sizes[0];
|
||||
best_delta = abs(preferred_size - best);
|
||||
|
||||
for(size_t i = 1; i < sizeof(sizes) / sizeof(sizes[0]); i++) {
|
||||
int delta = abs(preferred_size - dpi_sizes[i]);
|
||||
if(delta < best_delta) {
|
||||
best = dpi_sizes[i];
|
||||
best_delta = delta;
|
||||
}
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
int
|
||||
flint_text_dpi_size(int base_size)
|
||||
{
|
||||
return flint_text_size(flint_px(base_size));
|
||||
}
|
||||
|
||||
int
|
||||
flint_text_measure(const char *text, int font_size)
|
||||
{
|
||||
Font font = active_font_for_size(font_size);
|
||||
Vector2 size;
|
||||
|
||||
if(text == NULL || font.texture.id == 0)
|
||||
return 0;
|
||||
|
||||
size = MeasureTextEx(font, text, (float)font_size, font_spacing(font, font_size));
|
||||
return (int)size.x;
|
||||
return flint_text_measure_scaled(text, font_integer_scale(font_size));
|
||||
}
|
||||
|
||||
int
|
||||
@@ -292,7 +263,7 @@ flint_text_height(const char *text, int font_size)
|
||||
if(text == NULL || text[0] == '\0' || font.texture.id == 0 || font.baseSize <= 0)
|
||||
return font_size;
|
||||
|
||||
scale = (float)font_size / (float)font.baseSize;
|
||||
scale = (float)font_integer_scale(font_size);
|
||||
for(int i = 0; text[i] != '\0';) {
|
||||
int codepoint_byte_count = 0;
|
||||
int codepoint = GetCodepointNext(&text[i], &codepoint_byte_count);
|
||||
@@ -321,10 +292,19 @@ flint_text_height(const char *text, int font_size)
|
||||
}
|
||||
|
||||
if(!seen_glyph)
|
||||
return font_size;
|
||||
return font.baseSize * font_integer_scale(font_size);
|
||||
return (int)(max_bottom - min_top + 0.5f);
|
||||
}
|
||||
|
||||
int
|
||||
flint_text_line_height(int font_size)
|
||||
{
|
||||
Font font = active_font_for_size(font_size);
|
||||
int scale = font_integer_scale(font_size);
|
||||
|
||||
return font.baseSize > 0 ? font.baseSize * scale : FLINT_TEXT_BASE_SIZE * scale;
|
||||
}
|
||||
|
||||
int
|
||||
flint_text_measure_scaled(const char *text, int scale)
|
||||
{
|
||||
@@ -354,12 +334,7 @@ flint_text_measure_scaled(const char *text, int scale)
|
||||
void
|
||||
flint_text_draw(const char *text, int x, int y, int font_size, Color color)
|
||||
{
|
||||
Font font = active_font_for_size(font_size);
|
||||
|
||||
if(text == NULL || font.texture.id == 0)
|
||||
return;
|
||||
|
||||
DrawTextEx(font, text, (Vector2){(float)x, (float)y}, (float)font_size, font_spacing(font, font_size), color);
|
||||
flint_text_draw_scaled(text, x, y, font_integer_scale(font_size), color);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -402,8 +377,10 @@ flint_text_draw_scaled(const char *text, int x, int y, int scale, Color color)
|
||||
void
|
||||
flint_text_draw_centered(const char *text, int center_x, int center_y, int font_size, Color color)
|
||||
{
|
||||
Font font = active_font_for_size(font_size);
|
||||
int actual_size = font.baseSize > 0 ? font.baseSize * font_integer_scale(font_size) : font_size;
|
||||
int text_w = flint_text_measure(text, font_size);
|
||||
int y = flint_text_y(text, center_y - font_size / 2, font_size, font_size);
|
||||
int y = flint_text_y(text, center_y - actual_size / 2, actual_size, font_size);
|
||||
|
||||
flint_text_draw(text, center_x - text_w / 2, y, font_size, color);
|
||||
}
|
||||
@@ -423,25 +400,6 @@ flint_text_draw_in_rect(const char *text, Rectangle rect, int font_size, Color c
|
||||
flint_clip_end();
|
||||
}
|
||||
|
||||
void
|
||||
flint_text_draw_fitted_in_rect(const char *text, Rectangle rect, int preferred_size, int min_size, Color color)
|
||||
{
|
||||
const char *value = text != NULL ? text : "";
|
||||
int font_size = flint_text_size(preferred_size);
|
||||
int min_allowed = flint_text_size(min_size);
|
||||
|
||||
if(min_allowed < min_size)
|
||||
min_allowed = flint_text_size(min_size + 1);
|
||||
|
||||
if(font_size < min_allowed)
|
||||
font_size = min_allowed;
|
||||
|
||||
while(font_size > min_allowed && flint_text_measure(value, font_size) > (int)rect.width)
|
||||
font_size = flint_text_size(font_size - 1);
|
||||
|
||||
flint_text_draw_in_rect(value, rect, font_size, color);
|
||||
}
|
||||
|
||||
int
|
||||
flint_text_y_scaled(const char *text, int box_y, int box_h, int scale)
|
||||
{
|
||||
@@ -466,7 +424,7 @@ flint_text_y(const char *text, int box_y, int box_h, int font_size)
|
||||
if(text == NULL || text[0] == '\0' || font.texture.id == 0 || font.baseSize <= 0)
|
||||
return box_y + (int)(((float)box_h - (float)font_size) * 0.5f + 0.5f);
|
||||
|
||||
scale = (float)font_size / (float)font.baseSize;
|
||||
scale = (float)font_integer_scale(font_size);
|
||||
|
||||
for(int i = 0; text[i] != '\0';) {
|
||||
int codepoint_byte_count = 0;
|
||||
|
||||
@@ -142,7 +142,13 @@ flint_text_layout_reflow(FlintTextLayout *layout, int max_width, int font_size,
|
||||
|
||||
layout->line_widths[layout->line_count] = current_line_width;
|
||||
layout->line_count++;
|
||||
layout->total_height = layout->line_count > 0 ? layout->line_count * font_size + (layout->line_count - 1) * line_height : 0;
|
||||
{
|
||||
int drawn_line_height = flint_text_line_height(font_size);
|
||||
layout->total_height = layout->line_count > 0
|
||||
? layout->line_count * drawn_line_height +
|
||||
(layout->line_count - 1) * line_height
|
||||
: 0;
|
||||
}
|
||||
layout->line_height = line_height; /* Store for later use in draw */
|
||||
}
|
||||
|
||||
@@ -157,11 +163,12 @@ flint_text_layout_draw(FlintTextLayout *layout, int x, int *y, int font_size, Co
|
||||
int space_width = flint_text_measure(" ", font_size);
|
||||
int icon_spacing = flint_px(4);
|
||||
int line_spacing = (layout->line_height > 0) ? layout->line_height : flint_px(4);
|
||||
int drawn_line_height = flint_text_line_height(font_size);
|
||||
int next_break_line = 1;
|
||||
|
||||
for(int i = 0; i < layout->element_count; i++) {
|
||||
if(next_break_line <= layout->line_count && next_break_line > 0 && i == layout->line_breaks[next_break_line]) {
|
||||
current_y += font_size + line_spacing;
|
||||
current_y += drawn_line_height + line_spacing;
|
||||
current_x = x;
|
||||
next_break_line++;
|
||||
}
|
||||
@@ -191,7 +198,7 @@ flint_text_layout_draw(FlintTextLayout *layout, int x, int *y, int font_size, Co
|
||||
}
|
||||
}
|
||||
|
||||
*y = current_y + font_size;
|
||||
*y = current_y + drawn_line_height;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -23,7 +23,9 @@ const FlintThemeMeta flint_themes[FLINT_THEME_COUNT] = {
|
||||
[FLINT_THEME_DAWN] = {"Dawn", "dawn_light", "dawn_dark"},
|
||||
[FLINT_THEME_SAGE] = {"Sage", "sage_light", "sage_dark"},
|
||||
[FLINT_THEME_INK] = {"Sepia", "ink_light", "ink_dark"},
|
||||
[FLINT_THEME_MONO] = {"Mono", "mono_light", "mono_dark"}
|
||||
[FLINT_THEME_MONO] = {"Mono", "mono_light", "mono_dark"},
|
||||
[FLINT_THEME_MINT] = {"Mint", "mint_light", "mint_dark"},
|
||||
[FLINT_THEME_COBALT] = {"Cobalt", "cobalt_light", "cobalt_dark"}
|
||||
};
|
||||
|
||||
static const FlintThemeCatalogColors catalog_light[FLINT_THEME_COUNT] = {
|
||||
@@ -36,7 +38,9 @@ static const FlintThemeCatalogColors catalog_light[FLINT_THEME_COUNT] = {
|
||||
[FLINT_THEME_DAWN] = {{0xF5,0xE9,0xDF,0xFF}, {0xE7,0xD9,0xD0,0xFF}, {0x39,0x3B,0x4A,0xFF}, {0xE0,0x7A,0x6D,0xFF}, {0x8F,0xCF,0xC6,0xFF}, {0x62,0xB8,0xB0,0xFF}, {0xF5,0xE9,0xDF,0xFF}, {0xC8,0x62,0x5C,0xFF}},
|
||||
[FLINT_THEME_SAGE] = {{0xE8,0xEC,0xDF,0xFF}, {0xD9,0xE0,0xD0,0xFF}, {0x35,0x44,0x38,0xFF}, {0x82,0xA0,0x7D,0xFF}, {0xB6,0xC9,0xA6,0xFF}, {0x94,0xAF,0x84,0xFF}, {0xE8,0xEC,0xDF,0xFF}, {0x5D,0x82,0x68,0xFF}},
|
||||
[FLINT_THEME_INK] = {{0xF3,0xE4,0xC8,0xFF}, {0xE4,0xCF,0xAA,0xFF}, {0x3F,0x2B,0x1C,0xFF}, {0xB8,0x76,0x3F,0xFF}, {0xD8,0xB0,0x72,0xFF}, {0xC7,0x91,0x51,0xFF}, {0xF8,0xEE,0xD6,0xFF}, {0x8F,0x5B,0x2F,0xFF}},
|
||||
[FLINT_THEME_MONO] = {{0xFF,0xFF,0xFF,0xFF}, {0xEF,0xEF,0xEF,0xFF}, {0x00,0x00,0x00,0xFF}, {0x00,0x00,0x00,0xFF}, {0xDD,0xDD,0xDD,0xFF}, {0xC8,0xC8,0xC8,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0x00,0x00,0x00,0xFF}}
|
||||
[FLINT_THEME_MONO] = {{0xFF,0xFF,0xFF,0xFF}, {0xEF,0xEF,0xEF,0xFF}, {0x00,0x00,0x00,0xFF}, {0x00,0x00,0x00,0xFF}, {0xDD,0xDD,0xDD,0xFF}, {0xC8,0xC8,0xC8,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0x00,0x00,0x00,0xFF}},
|
||||
[FLINT_THEME_MINT] = {{0xE4,0xF4,0xEE,0xFF}, {0xD2,0xE7,0xDF,0xFF}, {0x1E,0x45,0x3A,0xFF}, {0x4B,0xB6,0x9A,0xFF}, {0x98,0xD8,0xC6,0xFF}, {0x70,0xC7,0xB2,0xFF}, {0xE4,0xF4,0xEE,0xFF}, {0x2D,0x8F,0x78,0xFF}},
|
||||
[FLINT_THEME_COBALT] = {{0xE7,0xEA,0xF4,0xFF}, {0xD7,0xDD,0xEC,0xFF}, {0x19,0x27,0x4A,0xFF}, {0x4F,0x67,0xC8,0xFF}, {0xA9,0xB8,0xEF,0xFF}, {0x7D,0x92,0xE0,0xFF}, {0xE7,0xEA,0xF4,0xFF}, {0x35,0x4F,0xB5,0xFF}}
|
||||
};
|
||||
|
||||
static const FlintThemeCatalogColors catalog_dark[FLINT_THEME_COUNT] = {
|
||||
@@ -49,7 +53,9 @@ static const FlintThemeCatalogColors catalog_dark[FLINT_THEME_COUNT] = {
|
||||
[FLINT_THEME_DAWN] = {{0x27,0x22,0x2C,0xFF}, {0x35,0x2D,0x38,0xFF}, {0xE9,0xC7,0xB7,0xFF}, {0xB8,0x5F,0x60,0xFF}, {0x3A,0x6B,0x70,0xFF}, {0x4D,0x83,0x85,0xFF}, {0xE9,0xC7,0xB7,0xFF}, {0xD0,0x72,0x67,0xFF}},
|
||||
[FLINT_THEME_SAGE] = {{0x1F,0x2A,0x22,0xFF}, {0x2D,0x3A,0x30,0xFF}, {0xC7,0xD4,0xC0,0xFF}, {0x5F,0x81,0x65,0xFF}, {0x3C,0x54,0x40,0xFF}, {0x4E,0x66,0x50,0xFF}, {0xC7,0xD4,0xC0,0xFF}, {0x8B,0xA0,0x70,0xFF}},
|
||||
[FLINT_THEME_INK] = {{0x25,0x1A,0x12,0xFF}, {0x33,0x24,0x18,0xFF}, {0xF1,0xD8,0xB0,0xFF}, {0xA3,0x65,0x32,0xFF}, {0x5A,0x3C,0x24,0xFF}, {0x72,0x4B,0x2C,0xFF}, {0xF1,0xD8,0xB0,0xFF}, {0xD5,0x91,0x52,0xFF}},
|
||||
[FLINT_THEME_MONO] = {{0x00,0x00,0x00,0xFF}, {0x12,0x12,0x12,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0x22,0x22,0x22,0xFF}, {0x3A,0x3A,0x3A,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0xFF,0xFF,0xFF,0xFF}}
|
||||
[FLINT_THEME_MONO] = {{0x00,0x00,0x00,0xFF}, {0x12,0x12,0x12,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0x22,0x22,0x22,0xFF}, {0x3A,0x3A,0x3A,0xFF}, {0xFF,0xFF,0xFF,0xFF}, {0xFF,0xFF,0xFF,0xFF}},
|
||||
[FLINT_THEME_MINT] = {{0x12,0x2D,0x28,0xFF}, {0x1B,0x3B,0x34,0xFF}, {0xB9,0xE4,0xD5,0xFF}, {0x2E,0x82,0x72,0xFF}, {0x25,0x55,0x4B,0xFF}, {0x32,0x69,0x5E,0xFF}, {0xB9,0xE4,0xD5,0xFF}, {0x6E,0xC8,0xB0,0xFF}},
|
||||
[FLINT_THEME_COBALT] = {{0x12,0x18,0x33,0xFF}, {0x1B,0x24,0x45,0xFF}, {0xC2,0xCC,0xF5,0xFF}, {0x38,0x4C,0xA8,0xFF}, {0x27,0x35,0x73,0xFF}, {0x34,0x45,0x8B,0xFF}, {0xC2,0xCC,0xF5,0xFF}, {0x8E,0xA0,0xF0,0xFF}}
|
||||
};
|
||||
|
||||
FlintThemeId
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
#include "ui.h"
|
||||
|
||||
int
|
||||
ui_bottom_nav_height(void)
|
||||
{
|
||||
return flint_px(46);
|
||||
}
|
||||
|
||||
FlintUIBottomNavResult
|
||||
ui_draw_bottom_nav(FlintUIBottomNav nav)
|
||||
{
|
||||
FlintUIBottomNavResult result = {-1, -1, 0, 0};
|
||||
int count = nav.count;
|
||||
int height = nav.height > 0 ? nav.height : ui_bottom_nav_height();
|
||||
int bottom_margin = nav.bottom_margin > 0 ? nav.bottom_margin : 0;
|
||||
int side_margin = nav.side_margin > 0 ? nav.side_margin : 0;
|
||||
int icon_size = nav.icon_size > 0 ? nav.icon_size : flint_px(24);
|
||||
int y = nav.view_height - bottom_margin - height;
|
||||
int available_w = nav.view_width - side_margin * 2;
|
||||
int tab_w;
|
||||
int group_w;
|
||||
int start_x;
|
||||
|
||||
result.y = y;
|
||||
result.height = height;
|
||||
if(nav.items == NULL || count <= 0 || nav.view_width <= 0 || nav.view_height <= 0)
|
||||
return result;
|
||||
if(count > 8)
|
||||
count = 8;
|
||||
if(available_w < flint_px(96))
|
||||
available_w = flint_px(96);
|
||||
|
||||
tab_w = available_w / count;
|
||||
if(tab_w < flint_px(56))
|
||||
tab_w = flint_px(56);
|
||||
group_w = tab_w * count;
|
||||
if(group_w > available_w)
|
||||
group_w = available_w;
|
||||
tab_w = group_w / count;
|
||||
start_x = side_margin + (available_w - group_w) / 2;
|
||||
|
||||
DrawRectangle(0, y, nav.view_width, height, flint_darken(c_bg, 10));
|
||||
DrawLine(0, y, nav.view_width, y, flint_darken(c_bg, 42));
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
const FlintUIBottomNavItem *item = &nav.items[i];
|
||||
int x = start_x + i * tab_w;
|
||||
int w = i == count - 1 ? start_x + group_w - x : tab_w;
|
||||
int icon_x = x + (w - icon_size) / 2;
|
||||
int icon_y = y + (height - icon_size) / 2;
|
||||
int hover = 0;
|
||||
UIButtonStyle style = item->active
|
||||
? UI_BUTTON_STYLE_TAB_SELECTED
|
||||
: UI_BUTTON_STYLE_TAB;
|
||||
Color icon_color = item->disabled ? flint_darken(c_icon, 40) : c_icon;
|
||||
|
||||
if(ui_draw_generic_button(x, y, w, height, "", style,
|
||||
item->disabled, &hover)) {
|
||||
result.clicked_index = i;
|
||||
result.clicked_route = item->route;
|
||||
}
|
||||
|
||||
if(item->icon.id != 0) {
|
||||
DrawTexturePro(item->icon,
|
||||
(Rectangle){0, 0, item->icon.width, item->icon.height},
|
||||
(Rectangle){icon_x, icon_y, icon_size, icon_size},
|
||||
(Vector2){0}, 0, icon_color);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
bottom_nav_option_index(const FlintUIBottomNavOption *options, int option_count,
|
||||
int route)
|
||||
{
|
||||
if(options == NULL || option_count <= 0)
|
||||
return 0;
|
||||
for(int i = 0; i < option_count; i++) {
|
||||
if(options[i].route == route)
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
FlintUIBottomNavConfigResult
|
||||
ui_draw_bottom_nav_config_modal(FlintUIBottomNavConfigModal modal)
|
||||
{
|
||||
static int route_scroll_offset = 0;
|
||||
FlintUIBottomNavConfigResult result = {0, 0};
|
||||
FlintUIPanelFrame frame;
|
||||
FlintUIScrollArea route_area;
|
||||
FlintUIScrollView route_view;
|
||||
const char *option_labels[16];
|
||||
int option_count = modal.option_count;
|
||||
int route_count = modal.route_count != NULL ? *modal.route_count : 0;
|
||||
int max_route_count = modal.max_route_count > 0 ? modal.max_route_count : route_count;
|
||||
int selected[16] = {0};
|
||||
int row_h = flint_px(58);
|
||||
int dropdown_h = flint_px(36);
|
||||
int remove_w = flint_px(36);
|
||||
int add_h = flint_px(34);
|
||||
int button_h = flint_px(36);
|
||||
int button_gap = flint_px(8);
|
||||
int y;
|
||||
int button_w;
|
||||
int total_button_w;
|
||||
int button_y;
|
||||
int add_y;
|
||||
int add_w;
|
||||
int route_view_h;
|
||||
int route_content_h;
|
||||
int reset_hover = 0;
|
||||
int cancel_hover = 0;
|
||||
int save_hover = 0;
|
||||
int dropdown_blocks_buttons;
|
||||
|
||||
if(max_route_count > 16)
|
||||
max_route_count = 16;
|
||||
if(route_count < 0)
|
||||
route_count = 0;
|
||||
if(route_count > max_route_count)
|
||||
route_count = max_route_count;
|
||||
if(option_count > 16)
|
||||
option_count = 16;
|
||||
for(int i = 0; i < option_count; i++)
|
||||
option_labels[i] = modal.options[i].label;
|
||||
for(int i = 0; i < route_count; i++)
|
||||
selected[i] = bottom_nav_option_index(modal.options, option_count,
|
||||
modal.routes != NULL ? modal.routes[i] : 0);
|
||||
|
||||
frame = ui_draw_modal_frame(flint_px(340),
|
||||
flint_px(128) + row_h * route_count + add_h + flint_px(58),
|
||||
modal.title,
|
||||
(Texture2D){0},
|
||||
modal.close_icon);
|
||||
if(frame.right_clicked) {
|
||||
result.action = 1;
|
||||
return result;
|
||||
}
|
||||
|
||||
button_w = (frame.content_w - button_gap * 2) / 3;
|
||||
if(button_w > flint_px(92))
|
||||
button_w = flint_px(92);
|
||||
total_button_w = button_w * 3 + button_gap * 2;
|
||||
button_y = frame.y + frame.h - button_h - flint_px(16);
|
||||
add_y = button_y - button_gap - add_h;
|
||||
route_view_h = add_y - frame.content_y - flint_px(12);
|
||||
if(route_view_h < row_h)
|
||||
route_view_h = row_h;
|
||||
if(frame.content_y + route_view_h > add_y - flint_px(8))
|
||||
route_view_h = add_y - frame.content_y - flint_px(8);
|
||||
if(route_view_h < flint_px(48))
|
||||
route_view_h = flint_px(48);
|
||||
route_content_h = row_h * route_count;
|
||||
route_area = (FlintUIScrollArea){
|
||||
.bounds = {
|
||||
(float)frame.content_x,
|
||||
(float)frame.content_y,
|
||||
(float)frame.content_w,
|
||||
(float)route_view_h
|
||||
},
|
||||
.content_height = route_content_h,
|
||||
.content_x = frame.content_x,
|
||||
.content_width = frame.content_w,
|
||||
.scroll_offset = &route_scroll_offset,
|
||||
.wheel_step = row_h,
|
||||
.scrollbar_x = frame.content_x + frame.content_w - flint_px(8)
|
||||
};
|
||||
|
||||
route_view = ui_scroll_container_begin(route_area);
|
||||
y = route_view.content_y;
|
||||
for(int i = 0; i < route_count; i++) {
|
||||
const char *slot_label = modal.slot_labels != NULL && modal.slot_labels[i] != NULL
|
||||
? modal.slot_labels[i]
|
||||
: "";
|
||||
int remove_hover = 0;
|
||||
flint_text_draw(slot_label, frame.content_x, y, flint_ui_font(), c_text);
|
||||
ui_draw_dropdown_button(modal.id + i, frame.content_x,
|
||||
y + flint_px(22), frame.content_w - remove_w - flint_px(8),
|
||||
dropdown_h, option_labels, option_count,
|
||||
&selected[i]);
|
||||
if(ui_draw_icon_btn_padded(frame.content_x + frame.content_w - remove_w,
|
||||
y + flint_px(22), flint_px(20),
|
||||
flint_px(8), modal.close_icon,
|
||||
&remove_hover)) {
|
||||
for(int j = i; j < route_count - 1; j++)
|
||||
modal.routes[j] = modal.routes[j + 1];
|
||||
route_count--;
|
||||
if(modal.route_count != NULL)
|
||||
*modal.route_count = route_count;
|
||||
result.changed = 1;
|
||||
break;
|
||||
}
|
||||
y += row_h;
|
||||
}
|
||||
ui_scroll_container_end(route_area, route_view);
|
||||
|
||||
ui_set_dropdown_clip_top(frame.content_y);
|
||||
ui_set_dropdown_clip_bottom(add_y - flint_px(8));
|
||||
|
||||
y = add_y;
|
||||
dropdown_blocks_buttons = ui_dropdown_captures_click(ui_mouse_world());
|
||||
if(route_count < max_route_count && modal.routes != NULL) {
|
||||
int add_hover = 0;
|
||||
add_w = frame.content_w < flint_px(180) ? frame.content_w : flint_px(180);
|
||||
if(ui_draw_generic_button(frame.content_x + (frame.content_w - add_w) / 2,
|
||||
y, add_w, add_h, modal.add_label,
|
||||
UI_BUTTON_STYLE_SECONDARY,
|
||||
dropdown_blocks_buttons, &add_hover)) {
|
||||
modal.routes[route_count] = option_count > 0 ? modal.options[0].route : 0;
|
||||
route_count++;
|
||||
if(modal.route_count != NULL)
|
||||
*modal.route_count = route_count;
|
||||
result.changed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
int x = frame.x + (frame.w - total_button_w) / 2;
|
||||
if(ui_draw_generic_button(x, button_y, button_w, button_h,
|
||||
modal.reset_label, UI_BUTTON_STYLE_SECONDARY,
|
||||
dropdown_blocks_buttons, &reset_hover))
|
||||
result.action = 3;
|
||||
x += button_w + button_gap;
|
||||
if(ui_draw_generic_button(x, button_y, button_w, button_h,
|
||||
modal.cancel_label, UI_BUTTON_STYLE_SECONDARY,
|
||||
dropdown_blocks_buttons, &cancel_hover))
|
||||
result.action = 1;
|
||||
x += button_w + button_gap;
|
||||
if(ui_draw_generic_button(x, button_y, button_w, button_h,
|
||||
modal.save_label, UI_BUTTON_STYLE_PRIMARY,
|
||||
dropdown_blocks_buttons, &save_hover))
|
||||
result.action = 2;
|
||||
}
|
||||
|
||||
for(int i = 0; i < route_count; i++) {
|
||||
if(ui_draw_dropdown_menu(modal.id + i) &&
|
||||
modal.routes != NULL && selected[i] >= 0 && selected[i] < option_count) {
|
||||
modal.routes[i] = modal.options[selected[i]].route;
|
||||
result.changed = 1;
|
||||
}
|
||||
}
|
||||
ui_set_dropdown_clip_top(0);
|
||||
ui_set_dropdown_clip_bottom(0);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,412 @@
|
||||
#include "ui.h"
|
||||
|
||||
|
||||
/* Per-dropdown state to track open/closed and click handling */
|
||||
#define MAX_DROPDOWN_OPTIONS 128
|
||||
#define DROPDOWN_OPTION_TEXT_SIZE 256
|
||||
|
||||
typedef struct UIDropdownState {
|
||||
int id;
|
||||
int open;
|
||||
int just_opened;
|
||||
int scroll_offset;
|
||||
int x, y, w, h;
|
||||
const char *options[MAX_DROPDOWN_OPTIONS];
|
||||
char option_text[MAX_DROPDOWN_OPTIONS][DROPDOWN_OPTION_TEXT_SIZE];
|
||||
int option_count;
|
||||
int *selected_index;
|
||||
int touch_pressed;
|
||||
int touch_press_start_y;
|
||||
int touch_drag_active;
|
||||
} UIDropdownState;
|
||||
|
||||
#define MAX_DROPDOWNS 24
|
||||
static UIDropdownState dropdown_states[MAX_DROPDOWNS];
|
||||
static int dropdown_state_count = 0;
|
||||
static int dropdown_clip_top = 0;
|
||||
static int dropdown_clip_bottom = 0;
|
||||
|
||||
static Color
|
||||
ui_dropdown_panel_color(int amount)
|
||||
{
|
||||
int luminance = ((int)c_bg.r + (int)c_bg.g + (int)c_bg.b) / 3;
|
||||
return luminance < 96 ? flint_lighten(c_bg, amount) : flint_darken(c_bg, amount);
|
||||
}
|
||||
|
||||
void
|
||||
ui_set_dropdown_clip_top(int top)
|
||||
{
|
||||
dropdown_clip_top = top > 0 ? top : 0;
|
||||
}
|
||||
|
||||
void
|
||||
ui_set_dropdown_clip_bottom(int bottom)
|
||||
{
|
||||
dropdown_clip_bottom = bottom > 0 ? bottom : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
dropdown_menu_layout(const UIDropdownState *state, int *dropdown_y, int *dropdown_h,
|
||||
int *visible_options, int *open_up)
|
||||
{
|
||||
int option_h;
|
||||
int menu_gap;
|
||||
int padding_top;
|
||||
int padding_bottom;
|
||||
int below_y;
|
||||
int below_space;
|
||||
int above_space;
|
||||
int bottom_limit;
|
||||
int max_visible_h;
|
||||
int total_h;
|
||||
|
||||
if(state == NULL || dropdown_y == NULL || dropdown_h == NULL)
|
||||
return;
|
||||
|
||||
option_h = state->h;
|
||||
menu_gap = flint_px(4);
|
||||
padding_top = flint_px(4);
|
||||
padding_bottom = flint_px(4);
|
||||
total_h = padding_top + option_h * state->option_count + padding_bottom;
|
||||
below_y = state->y + state->h + menu_gap;
|
||||
if(below_y < dropdown_clip_top)
|
||||
below_y = dropdown_clip_top;
|
||||
bottom_limit = dropdown_clip_bottom > 0 ? dropdown_clip_bottom : ui_view_height;
|
||||
below_space = bottom_limit - below_y - flint_px(16);
|
||||
above_space = state->y - dropdown_clip_top - flint_px(16);
|
||||
|
||||
if(below_space < 0)
|
||||
below_space = 0;
|
||||
if(above_space < 0)
|
||||
above_space = 0;
|
||||
|
||||
if(open_up != NULL)
|
||||
*open_up = (above_space > below_space);
|
||||
|
||||
max_visible_h = (above_space > below_space) ? above_space : below_space;
|
||||
if(total_h > max_visible_h) {
|
||||
int count = (max_visible_h - flint_px(8)) / option_h;
|
||||
if(count < 1)
|
||||
count = 1;
|
||||
total_h = count * option_h + flint_px(8);
|
||||
if(visible_options != NULL)
|
||||
*visible_options = count;
|
||||
} else if(visible_options != NULL) {
|
||||
*visible_options = state->option_count;
|
||||
}
|
||||
|
||||
if(open_up != NULL && *open_up)
|
||||
*dropdown_y = state->y - menu_gap - total_h;
|
||||
else
|
||||
*dropdown_y = below_y;
|
||||
|
||||
*dropdown_h = total_h;
|
||||
}
|
||||
|
||||
int
|
||||
ui_dropdown_captures_click(Vector2 point)
|
||||
{
|
||||
(void)point;
|
||||
for(int i = 0; i < dropdown_state_count; i++) {
|
||||
UIDropdownState *state = &dropdown_states[i];
|
||||
if(state->open && state->option_count > 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static UIDropdownState *
|
||||
get_or_create_dropdown_state(int id)
|
||||
{
|
||||
/* Find existing state */
|
||||
for(int i = 0; i < dropdown_state_count; i++) {
|
||||
if(dropdown_states[i].id == id)
|
||||
return &dropdown_states[i];
|
||||
}
|
||||
|
||||
/* Create new state */
|
||||
if(dropdown_state_count < MAX_DROPDOWNS) {
|
||||
dropdown_states[dropdown_state_count].id = id;
|
||||
dropdown_states[dropdown_state_count].open = 0;
|
||||
dropdown_states[dropdown_state_count].just_opened = 0;
|
||||
dropdown_states[dropdown_state_count].scroll_offset = 0;
|
||||
dropdown_states[dropdown_state_count].option_count = 0;
|
||||
dropdown_states[dropdown_state_count].selected_index = NULL;
|
||||
dropdown_states[dropdown_state_count].touch_pressed = 0;
|
||||
dropdown_states[dropdown_state_count].touch_press_start_y = 0;
|
||||
dropdown_states[dropdown_state_count].touch_drag_active = 0;
|
||||
return &dropdown_states[dropdown_state_count++];
|
||||
}
|
||||
|
||||
/* Fallback - use first slot */
|
||||
dropdown_states[0].id = id;
|
||||
return &dropdown_states[0];
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_dropdown_button(int id, int x, int y, int w, int h,
|
||||
const char **options, int option_count, int *selected_index)
|
||||
{
|
||||
UIDropdownState *state = get_or_create_dropdown_state(id);
|
||||
int font = flint_ui_font();
|
||||
int arrow_pad = flint_px(24);
|
||||
int arrow_size = flint_px(6);
|
||||
int changed = 0;
|
||||
Rectangle btn_bounds = {x, y, w, h};
|
||||
Vector2 mouse = ui_mouse_world();
|
||||
Color button_bg;
|
||||
int button_inside = CheckCollisionPointRec(mouse, btn_bounds);
|
||||
int active = button_inside &&
|
||||
(state->open
|
||||
? !ui_base_input_captures_click(mouse, 1)
|
||||
: !ui_input_captures_click(mouse));
|
||||
int hover = active && ui_hover_effects_enabled();
|
||||
|
||||
/* Calculate arrow position */
|
||||
int arrow_x = x + w - arrow_pad;
|
||||
int arrow_y = y + h / 2;
|
||||
|
||||
/* Store state for menu drawing */
|
||||
state->x = x;
|
||||
state->y = y;
|
||||
state->w = w;
|
||||
state->h = h;
|
||||
state->selected_index = selected_index;
|
||||
if(option_count < 0)
|
||||
option_count = 0;
|
||||
if(option_count > MAX_DROPDOWN_OPTIONS)
|
||||
option_count = MAX_DROPDOWN_OPTIONS;
|
||||
state->option_count = option_count;
|
||||
for(int i = 0; i < option_count; i++) {
|
||||
snprintf(state->option_text[i], sizeof(state->option_text[i]), "%s",
|
||||
options != NULL && options[i] != NULL ? options[i] : "");
|
||||
state->options[i] = state->option_text[i];
|
||||
}
|
||||
|
||||
if(active)
|
||||
ui_mark_clickable();
|
||||
|
||||
/* Handle click on button */
|
||||
if(active && IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) {
|
||||
state->open = !state->open;
|
||||
if(state->open) {
|
||||
state->just_opened = 1;
|
||||
state->scroll_offset = 0;
|
||||
state->touch_drag_active = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw button background */
|
||||
button_bg = state->open ? ui_dropdown_panel_color(28)
|
||||
: (hover ? c_button_hover : ui_dropdown_panel_color(16));
|
||||
DrawRectangleRec(btn_bounds, button_bg);
|
||||
ui_draw_bevel(x, y, w, h,
|
||||
state->open ? flint_lighten(button_bg, 34) : flint_lighten(button_bg, 24),
|
||||
state->open ? flint_darken(button_bg, 38) : flint_darken(button_bg, 30));
|
||||
|
||||
/* Draw current selection text, clipped before the X icon. */
|
||||
int current_index = selected_index != NULL ? *selected_index : 0;
|
||||
if(current_index < 0 || current_index >= option_count)
|
||||
current_index = 0;
|
||||
const char *current_name = option_count > 0 ? state->options[current_index] : "";
|
||||
int text_x = x + flint_px(12);
|
||||
int text_w = arrow_x - arrow_size - flint_px(8) - text_x;
|
||||
if(text_w > 0) {
|
||||
flint_clip_begin((int)(g_ui_camera.offset.x + (float)text_x * g_ui_camera.zoom),
|
||||
(int)(g_ui_camera.offset.y + (float)y * g_ui_camera.zoom),
|
||||
(int)((float)text_w * g_ui_camera.zoom),
|
||||
(int)((float)h * g_ui_camera.zoom));
|
||||
flint_text_draw(current_name, text_x, flint_ui_text_y(current_name, y, h, font), font, c_text);
|
||||
flint_clip_end();
|
||||
}
|
||||
|
||||
/* Draw dropdown X icon */
|
||||
int x_size = arrow_size;
|
||||
int x_half = x_size / 2;
|
||||
int x1 = arrow_x - x_half;
|
||||
int x2 = arrow_x + x_half;
|
||||
int y1 = arrow_y - x_half;
|
||||
int y2 = arrow_y + x_half;
|
||||
DrawLine(x1, y1, x2, y2, c_text);
|
||||
DrawLine(x1, y2, x2, y1, c_text);
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_dropdown_menu(int id)
|
||||
{
|
||||
UIDropdownState *state = get_or_create_dropdown_state(id);
|
||||
int changed = 0;
|
||||
|
||||
if(!state->open || state->option_count <= 0 || state->selected_index == NULL)
|
||||
return 0;
|
||||
|
||||
int font = flint_ui_font();
|
||||
int x = state->x;
|
||||
int y = state->y;
|
||||
int w = state->w;
|
||||
int h = state->h;
|
||||
int option_h = h;
|
||||
int option_count = state->option_count;
|
||||
int *selected_index = state->selected_index;
|
||||
const char **options = state->options;
|
||||
|
||||
int dropdown_y = 0;
|
||||
int dropdown_h = 0;
|
||||
int padding_top = flint_px(4);
|
||||
int padding_bottom = flint_px(4);
|
||||
int content_h = padding_top + option_h * option_count + padding_bottom;
|
||||
int max_scroll;
|
||||
int scrollbar_w = flint_px(8);
|
||||
int option_w = w;
|
||||
|
||||
dropdown_menu_layout(state, &dropdown_y, &dropdown_h, NULL, NULL);
|
||||
max_scroll = content_h - dropdown_h;
|
||||
if(max_scroll < 0)
|
||||
max_scroll = 0;
|
||||
if(state->scroll_offset > max_scroll)
|
||||
state->scroll_offset = max_scroll;
|
||||
if(state->scroll_offset < 0)
|
||||
state->scroll_offset = 0;
|
||||
if(max_scroll > 0)
|
||||
option_w = w - scrollbar_w - flint_px(2);
|
||||
|
||||
Rectangle menu_bounds = {x, dropdown_y, w, dropdown_h};
|
||||
Rectangle btn_bounds = {x, y, w, h};
|
||||
Vector2 mouse = ui_mouse_world();
|
||||
int my = (int)mouse.y;
|
||||
int pointer_in_dropdown = CheckCollisionPointRec(mouse, btn_bounds) ||
|
||||
CheckCollisionPointRec(mouse, menu_bounds);
|
||||
|
||||
/* Track pointer movement to distinguish click from drag */
|
||||
if(IsMouseButtonDown(MOUSE_BUTTON_LEFT)) {
|
||||
if(!state->touch_pressed && pointer_in_dropdown) {
|
||||
/* Pointer just went down - reset drag state */
|
||||
state->touch_pressed = 1;
|
||||
state->touch_press_start_y = my;
|
||||
state->touch_drag_active = 0;
|
||||
} else if(!state->touch_drag_active) {
|
||||
/* Check if movement exceeded threshold (making it a drag, not a click) */
|
||||
int dy = my - state->touch_press_start_y;
|
||||
if(abs(dy) > flint_px(8)) { /* 8px threshold */
|
||||
state->touch_drag_active = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* If dragging, scroll the dropdown */
|
||||
if(state->touch_drag_active && max_scroll > 0) {
|
||||
int dy = my - state->touch_press_start_y;
|
||||
state->scroll_offset -= dy;
|
||||
/* Update start position for continuous scrolling */
|
||||
state->touch_press_start_y = my;
|
||||
|
||||
/* Clamp scroll offset */
|
||||
if(state->scroll_offset < 0)
|
||||
state->scroll_offset = 0;
|
||||
if(state->scroll_offset > max_scroll)
|
||||
state->scroll_offset = max_scroll;
|
||||
}
|
||||
} else if(state->touch_pressed) {
|
||||
/* Pointer just released - only reset touch_pressed, keep touch_drag_active for selection check */
|
||||
state->touch_pressed = 0;
|
||||
}
|
||||
|
||||
/* Click outside closes dropdown */
|
||||
if(IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) {
|
||||
if(!state->just_opened &&
|
||||
!CheckCollisionPointRec(mouse, btn_bounds) &&
|
||||
!CheckCollisionPointRec(mouse, menu_bounds)) {
|
||||
state->open = 0;
|
||||
state->touch_drag_active = 0;
|
||||
state->touch_pressed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(state->just_opened && !IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
|
||||
state->just_opened = 0;
|
||||
|
||||
if(CheckCollisionPointRec(mouse, menu_bounds)) {
|
||||
float wheel = GetMouseWheelMove();
|
||||
if(wheel != 0.0f && max_scroll > 0) {
|
||||
state->scroll_offset -= (int)(wheel * (float)option_h);
|
||||
if(state->scroll_offset < 0)
|
||||
state->scroll_offset = 0;
|
||||
if(state->scroll_offset > max_scroll)
|
||||
state->scroll_offset = max_scroll;
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw dropdown background */
|
||||
DrawRectangle(x, dropdown_y, w, dropdown_h, ui_dropdown_panel_color(18));
|
||||
ui_draw_bevel(x, dropdown_y, w, dropdown_h,
|
||||
ui_dropdown_panel_color(32), ui_dropdown_panel_color(8));
|
||||
|
||||
flint_clip_begin((int)(g_ui_camera.offset.x + (float)x * g_ui_camera.zoom),
|
||||
(int)(g_ui_camera.offset.y + (float)dropdown_y * g_ui_camera.zoom),
|
||||
(int)((float)w * g_ui_camera.zoom),
|
||||
(int)((float)dropdown_h * g_ui_camera.zoom));
|
||||
|
||||
/* Draw options */
|
||||
for(int i = 0; i < option_count; i++) {
|
||||
int option_y = dropdown_y + padding_top + i * option_h - state->scroll_offset;
|
||||
Rectangle option_bounds = {x, option_y, option_w, option_h};
|
||||
|
||||
/* Skip if outside visible area - use inclusive bounds for last item */
|
||||
if(option_y + option_h < dropdown_y || option_y >= dropdown_y + dropdown_h)
|
||||
continue;
|
||||
|
||||
int option_active = CheckCollisionPointRec(mouse, option_bounds);
|
||||
int option_hover = option_active && ui_hover_effects_enabled();
|
||||
|
||||
if(option_active) {
|
||||
if(option_hover)
|
||||
DrawRectangle(x, option_y, w, option_h, c_button_hover);
|
||||
ui_mark_clickable();
|
||||
|
||||
if(IsMouseButtonReleased(MOUSE_BUTTON_LEFT) && !state->just_opened && !state->touch_drag_active) {
|
||||
*selected_index = i;
|
||||
state->open = 0;
|
||||
state->just_opened = 0;
|
||||
state->touch_drag_active = 0;
|
||||
state->touch_pressed = 0;
|
||||
state->scroll_offset = 0;
|
||||
changed = 1;
|
||||
flint_clip_end();
|
||||
goto draw_arrow;
|
||||
}
|
||||
}
|
||||
|
||||
flint_text_draw(options[i], x + flint_px(12), flint_ui_text_y(options[i], option_y, option_h, font), font, c_text);
|
||||
}
|
||||
|
||||
flint_clip_end();
|
||||
|
||||
if(max_scroll > 0)
|
||||
ui_draw_scrollbar(x + w - scrollbar_w, dropdown_y + flint_px(2),
|
||||
dropdown_h - flint_px(4), content_h, &state->scroll_offset, max_scroll);
|
||||
|
||||
draw_arrow:
|
||||
;
|
||||
|
||||
/* Redraw arrow on top of everything */
|
||||
int arrow_pad = flint_px(24);
|
||||
int arrow_size = flint_px(6);
|
||||
int arrow_x = x + w - arrow_pad;
|
||||
int arrow_y = y + h / 2;
|
||||
|
||||
/* Draw dropdown X icon */
|
||||
int x_size = arrow_size;
|
||||
int x_half = x_size / 2;
|
||||
int x1 = arrow_x - x_half;
|
||||
int x2 = arrow_x + x_half;
|
||||
int y1 = arrow_y - x_half;
|
||||
int y2 = arrow_y + x_half;
|
||||
DrawLine(x1, y1, x2, y2, c_text);
|
||||
DrawLine(x1, y2, x2, y1, c_text);
|
||||
return changed;
|
||||
}
|
||||
|
||||
/* ================================================================
|
||||
* TUTORIAL HELPERS
|
||||
* ================================================================ */
|
||||
@@ -0,0 +1,113 @@
|
||||
#include "ui.h"
|
||||
|
||||
int
|
||||
ui_draw_icon_slider_popup(FlintUIIconSliderPopup popup)
|
||||
{
|
||||
int hover = 0;
|
||||
int popup_w;
|
||||
int popup_h;
|
||||
int popup_x;
|
||||
int popup_y;
|
||||
Vector2 mouse;
|
||||
|
||||
if(popup.open == NULL || popup.value == NULL)
|
||||
return 0;
|
||||
|
||||
if(ui_draw_icon_btn_padded(popup.x, popup.y, popup.icon_size,
|
||||
popup.icon_padding, popup.icon, &hover))
|
||||
*popup.open = !*popup.open;
|
||||
|
||||
if(!*popup.open)
|
||||
return 0;
|
||||
|
||||
popup_w = popup.popup_width > 0 ? popup.popup_width : flint_px(44);
|
||||
popup_h = popup.popup_height > 0 ? popup.popup_height : flint_px(200);
|
||||
popup_x = popup.x;
|
||||
popup_y = popup.y + popup.icon_size + popup.icon_padding * 2;
|
||||
mouse = ui_mouse_world();
|
||||
|
||||
if(IsMouseButtonPressed(MOUSE_BUTTON_LEFT) &&
|
||||
(mouse.x < popup_x || mouse.x > popup_x + popup_w ||
|
||||
mouse.y < popup_y || mouse.y > popup_y + popup_h)) {
|
||||
*popup.open = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DrawRectangle(popup_x, popup_y, popup_w, popup_h, c_surface);
|
||||
ui_draw_bevel(popup_x, popup_y, popup_w, popup_h,
|
||||
flint_lighten(c_surface, 40), flint_darken(c_surface, 40));
|
||||
|
||||
return ui_draw_slider_vertical(popup.id, popup_x + popup_w / 2,
|
||||
popup_y + flint_px(10),
|
||||
popup_h - flint_px(20),
|
||||
popup.min, popup.max, popup.value);
|
||||
}
|
||||
|
||||
FlintUIIconRowResult
|
||||
ui_draw_bottom_icon_row(FlintUIBottomIconRow row)
|
||||
{
|
||||
FlintUIIconRowResult result = {-1, 0, 0};
|
||||
int count = row.count;
|
||||
int icon_size = row.icon_size > 0 ? row.icon_size : flint_px(24);
|
||||
int icon_padding = row.icon_padding > 0 ? row.icon_padding : flint_px(10);
|
||||
int gap = row.gap > 0 ? row.gap : flint_px(12);
|
||||
int side_margin = row.side_margin > 0 ? row.side_margin : flint_px(24);
|
||||
int bottom_margin = row.bottom_margin > 0 ? row.bottom_margin : flint_px(6);
|
||||
int min_icon_size = row.min_icon_size > 0 ? row.min_icon_size : flint_px(16);
|
||||
int min_icon_padding = row.min_icon_padding > 0 ? row.min_icon_padding : flint_px(6);
|
||||
int min_gap = row.min_gap > 0 ? row.min_gap : flint_px(8);
|
||||
int available_w;
|
||||
int max_btn_w;
|
||||
int button_w;
|
||||
int row_w;
|
||||
int start_x;
|
||||
|
||||
if(row.items == NULL || count <= 0)
|
||||
return result;
|
||||
|
||||
available_w = row.view_width - side_margin * 2;
|
||||
if(available_w < flint_px(120))
|
||||
available_w = flint_px(120);
|
||||
|
||||
max_btn_w = row.max_button_width > 0 ? row.max_button_width : available_w;
|
||||
if(count > 1) {
|
||||
int fit_btn_w = (available_w - gap * (count - 1)) / count;
|
||||
if(max_btn_w <= 0 || max_btn_w > fit_btn_w)
|
||||
max_btn_w = fit_btn_w;
|
||||
}
|
||||
|
||||
button_w = icon_size + icon_padding * 2;
|
||||
if(button_w > max_btn_w) {
|
||||
button_w = max_btn_w;
|
||||
icon_padding = button_w / 4;
|
||||
icon_size = button_w - icon_padding * 2;
|
||||
}
|
||||
|
||||
if(icon_padding < min_icon_padding)
|
||||
icon_padding = min_icon_padding;
|
||||
if(icon_size < min_icon_size)
|
||||
icon_size = min_icon_size;
|
||||
|
||||
button_w = icon_size + icon_padding * 2;
|
||||
gap = button_w / 4;
|
||||
if(gap < min_gap)
|
||||
gap = min_gap;
|
||||
|
||||
row_w = button_w * count + gap * (count - 1);
|
||||
start_x = row.center_x - row_w / 2;
|
||||
result.y = row.view_height - bottom_margin - button_w;
|
||||
result.button_width = button_w;
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
int hover = 0;
|
||||
int x = start_x + i * (button_w + gap);
|
||||
|
||||
if(row.items[i].disabled)
|
||||
continue;
|
||||
if(ui_draw_icon_btn_padded(x, result.y, icon_size, icon_padding,
|
||||
row.items[i].icon, &hover))
|
||||
result.clicked_index = i;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
#include "ui.h"
|
||||
|
||||
static int
|
||||
ui_modal_button(int x, int y, int w, int h, const char *label, int font,
|
||||
Vector2 mouse_world)
|
||||
{
|
||||
Rectangle bounds = {(float)x, (float)y, (float)w, (float)h};
|
||||
int active = CheckCollisionPointRec(mouse_world, bounds);
|
||||
int hovered = active && ui_hover_effects_enabled();
|
||||
Color fill = hovered ? c_button_hover : c_button;
|
||||
int text_w;
|
||||
|
||||
DrawRectangle(x, y, w, h, fill);
|
||||
ui_draw_bevel(x, y, w, h, flint_lighten(fill, 40), flint_darken(fill, 40));
|
||||
if(active)
|
||||
ui_mark_clickable();
|
||||
|
||||
text_w = flint_text_measure(label, font);
|
||||
flint_text_draw(label, x + (w - text_w) / 2, flint_ui_text_y(label, y, h, font),
|
||||
font, c_text);
|
||||
|
||||
return active && IsMouseButtonReleased(MOUSE_BUTTON_LEFT);
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_modal(const char *title, const char *message,
|
||||
const char *cancel_btn, const char *confirm_btn)
|
||||
{
|
||||
int modal_w = flint_px(280);
|
||||
int modal_x;
|
||||
int modal_y;
|
||||
int title_font = flint_ui_font();
|
||||
int msg_font = flint_ui_font();
|
||||
int btn_font = flint_ui_font();
|
||||
int btn_h = flint_clamp_px(36, 32, 40);
|
||||
int btn_w = flint_px(100);
|
||||
int btn_gap = flint_px(12);
|
||||
int title_h = flint_px(32);
|
||||
int msg_x;
|
||||
int msg_y;
|
||||
int msg_w = modal_w - flint_px(32);
|
||||
int msg_gap = flint_px(18);
|
||||
int modal_h;
|
||||
int btn_y;
|
||||
Vector2 mouse_world = ui_mouse_world();
|
||||
FlintTextLayout msg_layout = flint_text_layout_parse(message, g_ui_gear_icon,
|
||||
UI_ICON_TYPE_GEAR, msg_font);
|
||||
flint_text_layout_reflow(&msg_layout, msg_w, msg_font, flint_px(4));
|
||||
|
||||
modal_h = title_h + flint_text_layout_get_height(&msg_layout) + msg_gap + btn_h + flint_px(20);
|
||||
if(modal_h < flint_px(160))
|
||||
modal_h = flint_px(160);
|
||||
if(modal_h > ui_view_height - flint_px(24))
|
||||
modal_h = ui_view_height - flint_px(24);
|
||||
modal_x = (ui_view_width - modal_w) / 2;
|
||||
modal_y = (ui_view_height - modal_h) / 2;
|
||||
msg_x = modal_x + flint_px(16);
|
||||
msg_y = modal_y + title_h;
|
||||
btn_y = modal_y + modal_h - btn_h - flint_px(16);
|
||||
|
||||
/* Dim background */
|
||||
DrawRectangle(0, 0, ui_view_width, ui_view_height, (Color){0, 0, 0, 180});
|
||||
|
||||
/* Modal background */
|
||||
DrawRectangle(modal_x, modal_y, modal_w, modal_h, c_surface);
|
||||
ui_draw_bevel(modal_x, modal_y, modal_w, modal_h, flint_lighten(c_surface, 40), flint_darken(c_surface, 40));
|
||||
|
||||
/* Title */
|
||||
int title_w = flint_text_measure(title, title_font);
|
||||
flint_text_draw(title, modal_x + (modal_w - title_w) / 2, modal_y + flint_px(12), title_font, c_text);
|
||||
|
||||
/* Draw the layout */
|
||||
flint_text_layout_draw(&msg_layout, msg_x, &msg_y, msg_font, c_text);
|
||||
flint_text_layout_free(&msg_layout);
|
||||
|
||||
/* Buttons */
|
||||
int cancel_x = modal_x + (modal_w - btn_w * 2 - btn_gap) / 2;
|
||||
int confirm_x = cancel_x + btn_w + btn_gap;
|
||||
int result = 0;
|
||||
|
||||
if(ui_modal_button(cancel_x, btn_y, btn_w, btn_h, cancel_btn, btn_font, mouse_world))
|
||||
result = 1;
|
||||
if(ui_modal_button(confirm_x, btn_y, btn_w, btn_h, confirm_btn, btn_font, mouse_world))
|
||||
result = 2;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_modal_3btn(const char *title, const char *message,
|
||||
const char *left_btn, const char *middle_btn, const char *right_btn)
|
||||
{
|
||||
int modal_w = flint_px(300);
|
||||
int modal_x;
|
||||
int modal_y;
|
||||
int title_font = flint_ui_font();
|
||||
int msg_font = flint_ui_font();
|
||||
int btn_font = flint_ui_font();
|
||||
int btn_h = flint_clamp_px(36, 32, 40);
|
||||
int btn_w = flint_px(90);
|
||||
int btn_gap = flint_px(8);
|
||||
int title_h = flint_px(32);
|
||||
int msg_x;
|
||||
int msg_y;
|
||||
int msg_w = modal_w - flint_px(32);
|
||||
int msg_gap = flint_px(18);
|
||||
int modal_h;
|
||||
int btn_y;
|
||||
Vector2 mouse_world = ui_mouse_world();
|
||||
FlintTextLayout msg_layout = flint_text_layout_parse(message, g_ui_gear_icon,
|
||||
UI_ICON_TYPE_GEAR, msg_font);
|
||||
flint_text_layout_reflow(&msg_layout, msg_w, msg_font, flint_px(4));
|
||||
|
||||
modal_h = title_h + flint_text_layout_get_height(&msg_layout) + msg_gap + btn_h + flint_px(20);
|
||||
if(modal_h < flint_px(160))
|
||||
modal_h = flint_px(160);
|
||||
if(modal_h > ui_view_height - flint_px(24))
|
||||
modal_h = ui_view_height - flint_px(24);
|
||||
modal_x = (ui_view_width - modal_w) / 2;
|
||||
modal_y = (ui_view_height - modal_h) / 2;
|
||||
msg_x = modal_x + flint_px(16);
|
||||
msg_y = modal_y + title_h;
|
||||
btn_y = modal_y + modal_h - btn_h - flint_px(16);
|
||||
|
||||
/* Dim background */
|
||||
DrawRectangle(0, 0, ui_view_width, ui_view_height, (Color){0, 0, 0, 180});
|
||||
|
||||
/* Modal background */
|
||||
DrawRectangle(modal_x, modal_y, modal_w, modal_h, c_surface);
|
||||
ui_draw_bevel(modal_x, modal_y, modal_w, modal_h, flint_lighten(c_surface, 40), flint_darken(c_surface, 40));
|
||||
|
||||
/* Title */
|
||||
int title_w = flint_text_measure(title, title_font);
|
||||
flint_text_draw(title, modal_x + (modal_w - title_w) / 2, modal_y + flint_px(12), title_font, c_text);
|
||||
|
||||
/* Draw the layout */
|
||||
flint_text_layout_draw(&msg_layout, msg_x, &msg_y, msg_font, c_text);
|
||||
flint_text_layout_free(&msg_layout);
|
||||
|
||||
/* Calculate button positions */
|
||||
int total_btn_w = btn_w * 3 + btn_gap * 2;
|
||||
int left_x = modal_x + (modal_w - total_btn_w) / 2;
|
||||
int middle_x = left_x + btn_w + btn_gap;
|
||||
int right_x = middle_x + btn_w + btn_gap;
|
||||
|
||||
int result = 0;
|
||||
|
||||
if(ui_modal_button(left_x, btn_y, btn_w, btn_h, left_btn, btn_font, mouse_world))
|
||||
result = 1;
|
||||
if(ui_modal_button(middle_x, btn_y, btn_w, btn_h, middle_btn, btn_font, mouse_world))
|
||||
result = 2;
|
||||
if(ui_modal_button(right_x, btn_y, btn_w, btn_h, right_btn, btn_font, mouse_world))
|
||||
result = 3;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
ui_paragraph_modal_height(FlintUIParagraphModalMeasure measure)
|
||||
{
|
||||
int width = measure.width > 0 ? measure.width : flint_px(320);
|
||||
int header_h = measure.header_h > 0 ? measure.header_h : flint_px(58);
|
||||
int button_h = measure.button_h > 0 ? measure.button_h : flint_px(36);
|
||||
int line_gap = measure.line_gap > 0 ? measure.line_gap : flint_px(4);
|
||||
int font = measure.font > 0 ? measure.font : flint_ui_font();
|
||||
int extra_lines = measure.extra_lines > 0 ? measure.extra_lines : 0;
|
||||
int min_h = measure.min_height > 0 ? measure.min_height : 0;
|
||||
int content_w;
|
||||
FlintUIParagraph paragraph;
|
||||
int height;
|
||||
|
||||
if(width > ui_view_width - flint_px(24))
|
||||
width = ui_view_width - flint_px(24);
|
||||
if(width < flint_px(160))
|
||||
width = flint_px(160);
|
||||
content_w = width - flint_px(36);
|
||||
if(content_w < flint_px(120))
|
||||
content_w = flint_px(120);
|
||||
paragraph = (FlintUIParagraph){
|
||||
.text = measure.message,
|
||||
.width = content_w,
|
||||
.font = font,
|
||||
.line_gap = line_gap,
|
||||
.color = c_text
|
||||
};
|
||||
height = header_h +
|
||||
flint_ui_paragraph_height(paragraph) +
|
||||
extra_lines * (font + line_gap) +
|
||||
button_h +
|
||||
flint_px(18);
|
||||
if(height < min_h)
|
||||
height = min_h;
|
||||
return height;
|
||||
}
|
||||
|
||||
/* ================================================================
|
||||
* SCREEN HEADER (TITLE BAR)
|
||||
* ================================================================ */
|
||||
|
||||
int
|
||||
ui_screen_header_height(void)
|
||||
{
|
||||
return flint_clamp_px(60, 48, 60);
|
||||
}
|
||||
|
||||
FlintUIHeader
|
||||
ui_draw_title_header(int height, const char *title,
|
||||
Texture2D left_icon,
|
||||
Texture2D right_icon)
|
||||
{
|
||||
FlintUIHeader header = {height, 0, 0};
|
||||
int icon_size = flint_px(20);
|
||||
int icon_padding = flint_px(8);
|
||||
int icon_w = icon_size + icon_padding * 2;
|
||||
int title_font = flint_ui_title_font(title, ui_view_width - icon_w * 2 - flint_px(48));
|
||||
int title_w = flint_text_measure(title, title_font);
|
||||
int hover = 0;
|
||||
|
||||
DrawRectangle(0, 0, ui_view_width, height, c_bg);
|
||||
DrawLine(0, height - 1, ui_view_width, height - 1, flint_darken(c_button, 18));
|
||||
|
||||
if(left_icon.id != 0) {
|
||||
header.left_clicked = ui_draw_icon_btn_padded(flint_px(12), flint_px(12),
|
||||
icon_size, icon_padding,
|
||||
left_icon, &hover);
|
||||
}
|
||||
if(right_icon.id != 0) {
|
||||
header.right_clicked = ui_draw_icon_btn_padded(ui_view_width - icon_w - flint_px(12),
|
||||
flint_px(12), icon_size, icon_padding,
|
||||
right_icon, &hover);
|
||||
}
|
||||
|
||||
flint_text_draw(title, (ui_view_width - title_w) / 2,
|
||||
flint_ui_text_y(title, 0, height, title_font),
|
||||
title_font, c_text);
|
||||
return header;
|
||||
}
|
||||
|
||||
FlintUIPanelFrame
|
||||
ui_draw_modal_frame(int width, int height, const char *title,
|
||||
Texture2D left_icon,
|
||||
Texture2D right_icon)
|
||||
{
|
||||
FlintUIPanelFrame frame = {0};
|
||||
int title_font;
|
||||
int icon_size = flint_px(20);
|
||||
int icon_padding = flint_px(8);
|
||||
int icon_w = icon_size + icon_padding * 2;
|
||||
int title_w;
|
||||
int hover = 0;
|
||||
|
||||
if(width > ui_view_width - flint_px(24))
|
||||
width = ui_view_width - flint_px(24);
|
||||
if(height > ui_view_height - flint_px(24))
|
||||
height = ui_view_height - flint_px(24);
|
||||
|
||||
frame.w = width;
|
||||
frame.h = height;
|
||||
frame.x = (ui_view_width - width) / 2;
|
||||
frame.y = (ui_view_height - height) / 2;
|
||||
frame.content_x = frame.x + flint_px(18);
|
||||
frame.content_y = frame.y + flint_px(58);
|
||||
frame.content_w = frame.w - flint_px(36);
|
||||
frame.content_h = frame.h - flint_px(74);
|
||||
title_font = flint_ui_title_font(title, frame.w - icon_w * 2 - flint_px(24));
|
||||
title_w = flint_text_measure(title, title_font);
|
||||
|
||||
DrawRectangle(0, 0, ui_view_width, ui_view_height, (Color){0, 0, 0, 180});
|
||||
DrawRectangle(frame.x, frame.y, frame.w, frame.h, c_surface);
|
||||
ui_draw_bevel(frame.x, frame.y, frame.w, frame.h,
|
||||
flint_lighten(c_surface, 40), flint_darken(c_surface, 40));
|
||||
|
||||
flint_text_draw(title, frame.x + (frame.w - title_w) / 2,
|
||||
frame.y + flint_px(14), title_font, c_text);
|
||||
|
||||
if(left_icon.id != 0) {
|
||||
frame.left_clicked = ui_draw_icon_btn_padded(frame.x + flint_px(6),
|
||||
frame.y + flint_px(6),
|
||||
icon_size, icon_padding,
|
||||
left_icon, &hover);
|
||||
}
|
||||
if(right_icon.id != 0) {
|
||||
frame.right_clicked = ui_draw_icon_btn_padded(frame.x + frame.w - icon_w - flint_px(6),
|
||||
frame.y + flint_px(6),
|
||||
icon_size, icon_padding,
|
||||
right_icon, &hover);
|
||||
}
|
||||
|
||||
return frame;
|
||||
}
|
||||
int
|
||||
ui_draw_screen_header(const char *title, int show_close)
|
||||
{
|
||||
(void)c_bg; /* unused */
|
||||
int title_h = ui_screen_header_height();
|
||||
int title_font;
|
||||
int close_hover = 0;
|
||||
int close_clicked = 0;
|
||||
|
||||
/* Draw header background */
|
||||
DrawRectangle(0, 0, ui_view_width, title_h, flint_darken(c_bg, 14));
|
||||
DrawLine(0, title_h - 1, ui_view_width, title_h - 1, flint_darken(c_bg, 42));
|
||||
|
||||
/* Draw close button if requested */
|
||||
int close_x = ui_view_width - flint_px(40) - ui_icon_btn_padding(UI_ICON_SIZE_TINY);
|
||||
int title_x = flint_px(16);
|
||||
int title_max_w = show_close ? close_x - title_x - flint_px(12) : ui_view_width - title_x * 2;
|
||||
title_font = flint_ui_title_font(title, title_max_w);
|
||||
flint_text_draw(title, title_x, flint_ui_text_y(title, 0, title_h, title_font), title_font, c_text);
|
||||
|
||||
if(show_close) {
|
||||
close_clicked = ui_draw_icon_btn(close_x, flint_px(8), UI_ICON_SIZE_TINY,
|
||||
g_ui_x_icon, &close_hover);
|
||||
}
|
||||
|
||||
return close_clicked;
|
||||
}
|
||||
|
||||
/* ================================================================
|
||||
* SCROLLBAR
|
||||
* ================================================================ */
|
||||
@@ -0,0 +1,134 @@
|
||||
#include "ui.h"
|
||||
|
||||
void
|
||||
ui_draw_info_rows(FlintUIInfoRows rows)
|
||||
{
|
||||
Color background = rows.background.a != 0
|
||||
? rows.background
|
||||
: flint_darken(c_bg, 6);
|
||||
Color separator = rows.separator.a != 0
|
||||
? rows.separator
|
||||
: flint_darken(c_bg, 30);
|
||||
Color default_text = rows.default_text.a != 0 ? rows.default_text : c_text;
|
||||
int row_h = rows.row_height > 0 ? rows.row_height : flint_px(32);
|
||||
int padding_x = rows.padding_x > 0 ? rows.padding_x : flint_px(10);
|
||||
|
||||
if(rows.rows == NULL || rows.row_count <= 0 || rows.width <= 0 || row_h <= 0)
|
||||
return;
|
||||
|
||||
DrawRectangle(rows.x, rows.y, rows.width, row_h * rows.row_count,
|
||||
background);
|
||||
for(int i = 0; i < rows.row_count; i++) {
|
||||
const FlintUIInfoRow *row = &rows.rows[i];
|
||||
int y = rows.y + i * row_h;
|
||||
int font = row->font > 0 ? row->font : flint_ui_font();
|
||||
Color text = row->color.a != 0 ? row->color : default_text;
|
||||
|
||||
if(i > 0)
|
||||
DrawLine(rows.x, y, rows.x + rows.width, y, separator);
|
||||
flint_ui_draw_text_left_in_rect(row->text ? row->text : "",
|
||||
(Rectangle){(float)(rows.x + padding_x),
|
||||
(float)y,
|
||||
(float)(rows.width - padding_x * 2),
|
||||
(float)row_h},
|
||||
font, text);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ui_label_text_field_height(FlintUILabelTextField row)
|
||||
{
|
||||
int label_h = row.label_h > 0 ? row.label_h : flint_px(22);
|
||||
int field_h = row.field_h > 0 ? row.field_h : flint_px(40);
|
||||
int gap = row.gap > 0 ? row.gap : 0;
|
||||
int bottom_gap = row.bottom_gap > 0 ? row.bottom_gap : flint_px(24);
|
||||
|
||||
return label_h + gap + field_h + bottom_gap;
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_label_text_field(FlintUILabelTextField row, int x, int y, int w)
|
||||
{
|
||||
int label_font = row.label_font > 0 ? row.label_font : flint_ui_font_small();
|
||||
int label_h = row.label_h > 0 ? row.label_h : flint_px(22);
|
||||
int field_h = row.field_h > 0 ? row.field_h : flint_px(40);
|
||||
int gap = row.gap > 0 ? row.gap : 0;
|
||||
Color label_color = row.label_color.a != 0 ? row.label_color : flint_darken(c_text, 34);
|
||||
FlintUITextField field = row.field;
|
||||
|
||||
flint_text_draw(row.label != NULL ? row.label : "", x, y, label_font, label_color);
|
||||
field.bounds = (Rectangle){(float)x, (float)(y + label_h + gap), (float)w, (float)field_h};
|
||||
return flint_ui_text_field(field);
|
||||
}
|
||||
|
||||
int
|
||||
ui_section_label_height(FlintUISectionLabel label)
|
||||
{
|
||||
return label.height > 0 ? label.height : flint_px(24);
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_section_label(FlintUISectionLabel label, int x, int y)
|
||||
{
|
||||
int font = label.font > 0 ? label.font : flint_ui_font_small();
|
||||
int icon_d = label.icon_diameter > 0 ? label.icon_diameter : flint_px(18);
|
||||
Color color = label.color.a != 0 ? label.color : flint_darken(c_text, 34);
|
||||
const char *text = label.label != NULL ? label.label : "";
|
||||
int label_w;
|
||||
|
||||
flint_text_draw(text, x, y, font, color);
|
||||
if(!label.info_button)
|
||||
return 0;
|
||||
label_w = flint_text_measure(text, font);
|
||||
return ui_draw_info_button(x + label_w + flint_px(16),
|
||||
y + font / 2 + flint_px(1), icon_d);
|
||||
}
|
||||
|
||||
int
|
||||
ui_checkbox_row_height(FlintUICheckboxRow row)
|
||||
{
|
||||
return row.height > 0 ? row.height : flint_px(42);
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_checkbox_row(FlintUICheckboxRow row, int x, int y)
|
||||
{
|
||||
if(row.disabled)
|
||||
return ui_draw_checkbox_toggle_disabled(x, y, row.label, row.value, 1);
|
||||
return ui_draw_checkbox_toggle(x, y, row.label, row.value);
|
||||
}
|
||||
|
||||
int
|
||||
ui_button_row_height(FlintUIButtonRow row)
|
||||
{
|
||||
return row.height > 0 ? row.height : flint_px(40);
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_button_row(FlintUIButtonRow row)
|
||||
{
|
||||
int clicked = -1;
|
||||
int gap = row.gap > 0 ? row.gap : flint_px(10);
|
||||
int button_w;
|
||||
|
||||
if(row.items == NULL || row.count <= 0 || row.width <= 0 || row.height <= 0)
|
||||
return -1;
|
||||
|
||||
button_w = (row.width - gap * (row.count - 1)) / row.count;
|
||||
if(button_w <= 0)
|
||||
return -1;
|
||||
|
||||
for(int i = 0; i < row.count; i++) {
|
||||
int hover = 0;
|
||||
int x = row.x + i * (button_w + gap);
|
||||
|
||||
if(ui_draw_generic_button(x, row.y, button_w, row.height,
|
||||
row.items[i].label,
|
||||
row.items[i].style,
|
||||
row.items[i].disabled,
|
||||
&hover))
|
||||
clicked = i;
|
||||
}
|
||||
|
||||
return clicked;
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
#include "ui.h"
|
||||
|
||||
int
|
||||
ui_scrollbar_reserved_width(int max_scroll)
|
||||
{
|
||||
return max_scroll > 0 ? flint_px(16) : 0;
|
||||
}
|
||||
|
||||
int
|
||||
ui_scrollbar_content_width(int content_width, int max_scroll)
|
||||
{
|
||||
int reserved = ui_scrollbar_reserved_width(max_scroll);
|
||||
|
||||
if(reserved <= 0)
|
||||
return content_width;
|
||||
if(content_width <= reserved)
|
||||
return 0;
|
||||
return content_width - reserved;
|
||||
}
|
||||
|
||||
int
|
||||
ui_scrollbar_safe_content_width(int content_x, int content_width,
|
||||
int scrollbar_x, int max_scroll)
|
||||
{
|
||||
int gap = flint_px(20);
|
||||
int safe_width = content_width;
|
||||
|
||||
if(max_scroll <= 0 || scrollbar_x <= 0)
|
||||
return content_width;
|
||||
|
||||
safe_width = scrollbar_x - content_x - gap;
|
||||
if(safe_width > content_width)
|
||||
return content_width;
|
||||
if(safe_width < 0)
|
||||
return 0;
|
||||
return safe_width;
|
||||
}
|
||||
|
||||
FlintUIScrollView
|
||||
ui_scroll_container_measure(FlintUIScrollArea area)
|
||||
{
|
||||
FlintUIScrollView view;
|
||||
int x = (int)area.bounds.x;
|
||||
int y = (int)area.bounds.y;
|
||||
int w = (int)area.bounds.width;
|
||||
int h = (int)area.bounds.height;
|
||||
int scrollbar_w = flint_px(8);
|
||||
int scrollbar_x = area.scrollbar_x > 0
|
||||
? area.scrollbar_x
|
||||
: x + w - scrollbar_w;
|
||||
int content_x = area.content_x > 0 ? area.content_x : x;
|
||||
int content_w = area.content_width > 0 ? area.content_width : w;
|
||||
|
||||
memset(&view, 0, sizeof(view));
|
||||
view.content_x = content_x;
|
||||
view.viewport_h = h;
|
||||
view.content_h = area.content_height > 0 ? area.content_height : 0;
|
||||
view.max_scroll = view.content_h - h;
|
||||
if(view.max_scroll < 0)
|
||||
view.max_scroll = 0;
|
||||
|
||||
if(area.scroll_offset != NULL) {
|
||||
int scroll_offset = ui_clampi(*area.scroll_offset, 0, view.max_scroll);
|
||||
view.content_y = y - scroll_offset;
|
||||
} else {
|
||||
view.content_y = y;
|
||||
}
|
||||
view.content_w = ui_scrollbar_safe_content_width(content_x, content_w,
|
||||
scrollbar_x, view.max_scroll);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
FlintUIScrollPage
|
||||
ui_scroll_page_begin(FlintUIScrollPageSpec spec)
|
||||
{
|
||||
FlintUIScrollPage page;
|
||||
FlintUIScrollArea area;
|
||||
FlintUIScrollView measured;
|
||||
int max_content_w = spec.max_content_width;
|
||||
int min_content_w = spec.min_content_width;
|
||||
int side_padding = spec.side_padding > 0 ? spec.side_padding : flint_page_side_padding();
|
||||
int content_x = 0;
|
||||
int content_w = 0;
|
||||
int draw_w;
|
||||
int passes = spec.measure_passes > 0 ? spec.measure_passes : 3;
|
||||
|
||||
memset(&page, 0, sizeof(page));
|
||||
|
||||
if(max_content_w <= 0)
|
||||
max_content_w = ui_view_width;
|
||||
if(max_content_w > ui_view_width - side_padding * 2)
|
||||
max_content_w = ui_view_width - side_padding * 2;
|
||||
if(min_content_w > 0 && max_content_w < min_content_w)
|
||||
max_content_w = min_content_w;
|
||||
if(max_content_w < 0)
|
||||
max_content_w = 0;
|
||||
|
||||
flint_centered_column(max_content_w, side_padding, &content_x, &content_w);
|
||||
draw_w = content_w;
|
||||
|
||||
for(int i = 0; i < passes; i++) {
|
||||
int content_h;
|
||||
|
||||
if(spec.content_height != NULL)
|
||||
content_h = spec.content_height(draw_w, spec.user_data);
|
||||
else
|
||||
content_h = 0;
|
||||
area = (FlintUIScrollArea){
|
||||
.bounds = {0.0f, (float)spec.y, (float)ui_view_width, (float)spec.height},
|
||||
.content_height = content_h,
|
||||
.content_x = content_x,
|
||||
.content_width = content_w,
|
||||
.scroll_offset = spec.scroll_offset,
|
||||
.wheel_step = spec.wheel_step > 0 ? spec.wheel_step : flint_px(42),
|
||||
.scrollbar_x = spec.scrollbar_x > 0 ? spec.scrollbar_x : ui_view_width - flint_px(8)
|
||||
};
|
||||
measured = ui_scroll_container_measure(area);
|
||||
if(measured.content_w == draw_w)
|
||||
break;
|
||||
draw_w = measured.content_w;
|
||||
}
|
||||
|
||||
if(spec.content_height != NULL)
|
||||
area.content_height = spec.content_height(draw_w, spec.user_data);
|
||||
page.area = area;
|
||||
page.view = ui_scroll_container_begin(area);
|
||||
page.content_x = page.view.content_x;
|
||||
page.content_y = page.view.content_y;
|
||||
page.content_w = page.view.content_w;
|
||||
page.content_h = area.content_height;
|
||||
return page;
|
||||
}
|
||||
|
||||
void
|
||||
ui_scroll_page_end(FlintUIScrollPage page)
|
||||
{
|
||||
ui_scroll_container_end(page.area, page.view);
|
||||
}
|
||||
FlintUIScrollView
|
||||
ui_scroll_container_begin(FlintUIScrollArea area)
|
||||
{
|
||||
static int content_drag_active = 0;
|
||||
static int content_dragging = 0;
|
||||
static int content_drag_start_y = 0;
|
||||
static int content_drag_start_scroll = 0;
|
||||
FlintUIScrollView view = ui_scroll_container_measure(area);
|
||||
Vector2 mouse_world = ui_mouse_world();
|
||||
int y = (int)area.bounds.y;
|
||||
int wheel_step = area.wheel_step > 0 ? area.wheel_step : flint_px(42);
|
||||
int inside = CheckCollisionPointRec(mouse_world, area.bounds);
|
||||
int captured = ui_input_captures_click(mouse_world);
|
||||
int drag_threshold = flint_px(5);
|
||||
int scrollbar_w = flint_px(8);
|
||||
int scrollbar_x = area.scrollbar_x > 0
|
||||
? area.scrollbar_x
|
||||
: (int)(area.bounds.x + area.bounds.width) - scrollbar_w;
|
||||
Rectangle scrollbar_bounds = {
|
||||
(float)scrollbar_x,
|
||||
area.bounds.y,
|
||||
(float)scrollbar_w,
|
||||
area.bounds.height
|
||||
};
|
||||
int on_scrollbar = view.max_scroll > 0 &&
|
||||
CheckCollisionPointRec(mouse_world, scrollbar_bounds);
|
||||
|
||||
if(area.scroll_offset != NULL) {
|
||||
*area.scroll_offset = ui_clampi(*area.scroll_offset, 0, view.max_scroll);
|
||||
if(view.max_scroll > 0 && inside && !captured) {
|
||||
float wheel = GetMouseWheelMove();
|
||||
if(wheel != 0.0f) {
|
||||
*area.scroll_offset -= (int)(wheel * (float)wheel_step);
|
||||
*area.scroll_offset = ui_clampi(*area.scroll_offset, 0, view.max_scroll);
|
||||
}
|
||||
}
|
||||
|
||||
if(g_ui_slider_active_id != 0 &&
|
||||
g_ui_pointer_owner == UI_POINTER_OWNER_NONE &&
|
||||
g_ui_pointer_dragging &&
|
||||
ui_pointer_drag_is_horizontal())
|
||||
g_ui_pointer_owner = UI_POINTER_OWNER_HORIZONTAL_SLIDER;
|
||||
|
||||
if(g_ui_pointer_owner == UI_POINTER_OWNER_HORIZONTAL_SLIDER ||
|
||||
g_ui_pointer_owner == UI_POINTER_OWNER_VERTICAL_SLIDER) {
|
||||
content_drag_active = 0;
|
||||
content_dragging = 0;
|
||||
}
|
||||
|
||||
if(view.max_scroll > 0 &&
|
||||
g_ui_pointer_owner == UI_POINTER_OWNER_NONE &&
|
||||
IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && inside && !captured &&
|
||||
!on_scrollbar) {
|
||||
content_drag_active = 1;
|
||||
content_dragging = 0;
|
||||
content_drag_start_y = (int)mouse_world.y;
|
||||
content_drag_start_scroll = *area.scroll_offset;
|
||||
}
|
||||
if(content_drag_active && IsMouseButtonDown(MOUSE_BUTTON_LEFT) &&
|
||||
g_ui_pointer_owner != UI_POINTER_OWNER_HORIZONTAL_SLIDER &&
|
||||
g_ui_pointer_owner != UI_POINTER_OWNER_VERTICAL_SLIDER) {
|
||||
int dy = (int)mouse_world.y - content_drag_start_y;
|
||||
if(content_dragging || dy > drag_threshold || dy < -drag_threshold) {
|
||||
g_ui_pointer_owner = UI_POINTER_OWNER_SCROLL;
|
||||
content_dragging = 1;
|
||||
*area.scroll_offset = content_drag_start_scroll - dy;
|
||||
*area.scroll_offset = ui_clampi(*area.scroll_offset, 0, view.max_scroll);
|
||||
ui_set_input_blocked(1);
|
||||
}
|
||||
} else if(content_drag_active) {
|
||||
if(content_dragging)
|
||||
ui_set_input_blocked(1);
|
||||
content_drag_active = 0;
|
||||
content_dragging = 0;
|
||||
}
|
||||
view.content_y = y - *area.scroll_offset;
|
||||
} else {
|
||||
view.content_y = y;
|
||||
}
|
||||
{
|
||||
Rectangle screen_bounds = {
|
||||
g_ui_camera.offset.x + area.bounds.x * g_ui_camera.zoom,
|
||||
g_ui_camera.offset.y + area.bounds.y * g_ui_camera.zoom,
|
||||
area.bounds.width * g_ui_camera.zoom,
|
||||
area.bounds.height * g_ui_camera.zoom
|
||||
};
|
||||
Rectangle clipped_screen_bounds = flint_clip_effective(screen_bounds);
|
||||
Rectangle clipped_world_bounds = {
|
||||
(clipped_screen_bounds.x - g_ui_camera.offset.x) / g_ui_camera.zoom,
|
||||
(clipped_screen_bounds.y - g_ui_camera.offset.y) / g_ui_camera.zoom,
|
||||
clipped_screen_bounds.width / g_ui_camera.zoom,
|
||||
clipped_screen_bounds.height / g_ui_camera.zoom
|
||||
};
|
||||
|
||||
ui_push_input_clip(clipped_world_bounds);
|
||||
flint_clip_begin((int)screen_bounds.x, (int)screen_bounds.y,
|
||||
(int)screen_bounds.width, (int)screen_bounds.height);
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
void
|
||||
ui_scroll_container_end(FlintUIScrollArea area, FlintUIScrollView view)
|
||||
{
|
||||
int scrollbar_w = flint_px(8);
|
||||
int scrollbar_x;
|
||||
|
||||
flint_clip_end();
|
||||
ui_pop_input_clip();
|
||||
|
||||
if(area.scroll_offset == NULL || view.max_scroll <= 0)
|
||||
return;
|
||||
|
||||
scrollbar_x = area.scrollbar_x > 0
|
||||
? area.scrollbar_x
|
||||
: (int)(area.bounds.x + area.bounds.width) - scrollbar_w;
|
||||
ui_draw_scrollbar(scrollbar_x,
|
||||
(int)area.bounds.y,
|
||||
(int)area.bounds.height,
|
||||
view.content_h,
|
||||
area.scroll_offset,
|
||||
view.max_scroll);
|
||||
}
|
||||
|
||||
/* ================================================================
|
||||
* SCROLLBAR
|
||||
* ================================================================ */
|
||||
|
||||
int
|
||||
ui_draw_scrollbar(int x, int y, int viewport_h, int content_h, int *scroll_offset, int max_scroll)
|
||||
{
|
||||
/* Don't show scrollbar if no scrolling needed */
|
||||
if(max_scroll <= 0)
|
||||
return 0;
|
||||
|
||||
static int scrollbar_drag_active = 0;
|
||||
static int scrollbar_drag_start_y = 0;
|
||||
static int scrollbar_drag_start_scroll = 0;
|
||||
|
||||
int scrollbar_width = flint_px(8);
|
||||
int scrollbar_min_thumb = flint_px(24);
|
||||
int track_padding = 0;
|
||||
|
||||
/* Calculate thumb size and position */
|
||||
float content_ratio = (float)viewport_h / (float)content_h;
|
||||
int thumb_height = (int)(viewport_h * content_ratio);
|
||||
if(thumb_height < scrollbar_min_thumb)
|
||||
thumb_height = scrollbar_min_thumb;
|
||||
if(thumb_height > viewport_h)
|
||||
thumb_height = viewport_h;
|
||||
|
||||
float scroll_ratio = max_scroll > 0 ? (float)*scroll_offset / (float)max_scroll : 0.0f;
|
||||
int thumb_y = y + (int)(scroll_ratio * (viewport_h - thumb_height));
|
||||
|
||||
Vector2 mouse_pos = ui_mouse_world();
|
||||
int my = (int)mouse_pos.y;
|
||||
Rectangle thumb_bounds = {x + track_padding, thumb_y, scrollbar_width - track_padding * 2, thumb_height};
|
||||
int input_captured = ui_input_captures_click_internal(mouse_pos, 0);
|
||||
int thumb_active = CheckCollisionPointRec(mouse_pos, thumb_bounds) && !input_captured;
|
||||
int thumb_hover = thumb_active && ui_hover_effects_enabled();
|
||||
|
||||
/* Handle drag state */
|
||||
if(IsMouseButtonDown(MOUSE_BUTTON_LEFT) &&
|
||||
(!input_captured || scrollbar_drag_active)) {
|
||||
if(!scrollbar_drag_active) {
|
||||
/* Start drag if clicking on thumb */
|
||||
if(thumb_active && g_ui_pointer_owner == UI_POINTER_OWNER_NONE) {
|
||||
scrollbar_drag_active = 1;
|
||||
g_ui_pointer_owner = UI_POINTER_OWNER_SCROLL;
|
||||
scrollbar_drag_start_y = my;
|
||||
scrollbar_drag_start_scroll = *scroll_offset;
|
||||
}
|
||||
} else {
|
||||
/* Continue drag */
|
||||
int dy = my - scrollbar_drag_start_y;
|
||||
float scroll_per_pixel = (float)max_scroll / (float)(viewport_h - thumb_height);
|
||||
int new_scroll = scrollbar_drag_start_scroll + (int)(dy * scroll_per_pixel);
|
||||
*scroll_offset = new_scroll;
|
||||
if(*scroll_offset < 0) *scroll_offset = 0;
|
||||
if(*scroll_offset > max_scroll) *scroll_offset = max_scroll;
|
||||
}
|
||||
} else {
|
||||
if(scrollbar_drag_active && g_ui_pointer_owner == UI_POINTER_OWNER_SCROLL)
|
||||
g_ui_pointer_owner = UI_POINTER_OWNER_NONE;
|
||||
scrollbar_drag_active = 0;
|
||||
}
|
||||
|
||||
DrawRectangle(x, y, scrollbar_width, viewport_h, flint_darken(c_bg, 20));
|
||||
|
||||
Color thumb_color = thumb_hover || scrollbar_drag_active ? c_button_hover : c_button;
|
||||
DrawRectangleRec(thumb_bounds, thumb_color);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ================================================================
|
||||
* END OF UI FUNCTIONS
|
||||
* ================================================================ */
|
||||
@@ -0,0 +1,211 @@
|
||||
#include "ui.h"
|
||||
#include "flint_layout.h"
|
||||
#include "flint_locale.h"
|
||||
|
||||
|
||||
static const FlintThemeId theme_picker_order[FLINT_THEME_COUNT] = {
|
||||
FLINT_THEME_SKY,
|
||||
FLINT_THEME_OCEAN,
|
||||
FLINT_THEME_COBALT,
|
||||
FLINT_THEME_FOREST,
|
||||
FLINT_THEME_SAGE,
|
||||
FLINT_THEME_MINT,
|
||||
FLINT_THEME_SUNSET,
|
||||
FLINT_THEME_INK,
|
||||
FLINT_THEME_DAWN,
|
||||
FLINT_THEME_CHERRY,
|
||||
FLINT_THEME_LAVENDER,
|
||||
FLINT_THEME_MONO
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int circle_size;
|
||||
int label_gap;
|
||||
int col_gap;
|
||||
int cell_w;
|
||||
int per_row;
|
||||
int row_width;
|
||||
int row_step;
|
||||
int row_count;
|
||||
int height;
|
||||
} UIThemeGridLayout;
|
||||
|
||||
static const char *
|
||||
ui_theme_label(FlintThemeId theme)
|
||||
{
|
||||
const char *key = NULL;
|
||||
const char *label;
|
||||
|
||||
switch(flint_theme_normalize(theme)) {
|
||||
case FLINT_THEME_SKY: key = "theme_sky"; break;
|
||||
case FLINT_THEME_OCEAN: key = "theme_ocean"; break;
|
||||
case FLINT_THEME_FOREST: key = "theme_forest"; break;
|
||||
case FLINT_THEME_SUNSET: key = "theme_sunset"; break;
|
||||
case FLINT_THEME_LAVENDER: key = "theme_lavender"; break;
|
||||
case FLINT_THEME_CHERRY: key = "theme_cherry"; break;
|
||||
case FLINT_THEME_DAWN: key = "theme_dawn"; break;
|
||||
case FLINT_THEME_SAGE: key = "theme_sage"; break;
|
||||
case FLINT_THEME_INK: key = "theme_sepia"; break;
|
||||
case FLINT_THEME_MONO: key = "theme_mono"; break;
|
||||
case FLINT_THEME_MINT: key = "theme_mint"; break;
|
||||
case FLINT_THEME_COBALT: key = "theme_cobalt"; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if(key == NULL)
|
||||
return flint_theme_label(theme);
|
||||
label = locale_get(key);
|
||||
if(label == NULL || label[0] == '\0' || strcmp(label, key) == 0)
|
||||
return flint_theme_label(theme);
|
||||
return label;
|
||||
}
|
||||
|
||||
static UIThemeGridLayout
|
||||
ui_theme_grid_layout(int w)
|
||||
{
|
||||
UIThemeGridLayout layout = {0};
|
||||
int small_font = FLINT_TEXT_12;
|
||||
|
||||
int row_gap = flint_px(14);
|
||||
layout.circle_size = flint_px(24);
|
||||
layout.label_gap = flint_px(6);
|
||||
layout.col_gap = flint_px(10);
|
||||
layout.cell_w = layout.circle_size;
|
||||
for(int i = 0; i < FLINT_THEME_COUNT; i++) {
|
||||
int name_w = flint_text_measure(ui_theme_label((FlintThemeId)i), small_font) + flint_px(8);
|
||||
if(name_w > layout.cell_w)
|
||||
layout.cell_w = name_w;
|
||||
}
|
||||
|
||||
layout.per_row = (w + layout.col_gap) / (layout.cell_w + layout.col_gap);
|
||||
if(layout.per_row < 1)
|
||||
layout.per_row = 1;
|
||||
if(layout.per_row > 3)
|
||||
layout.per_row = 3;
|
||||
if(layout.per_row > FLINT_THEME_COUNT)
|
||||
layout.per_row = FLINT_THEME_COUNT;
|
||||
layout.row_width = layout.per_row * layout.cell_w + (layout.per_row - 1) * layout.col_gap;
|
||||
|
||||
layout.row_step = layout.circle_size + layout.label_gap + small_font + row_gap;
|
||||
layout.row_count = (FLINT_THEME_COUNT + layout.per_row - 1) / layout.per_row;
|
||||
layout.height = layout.circle_size + layout.label_gap + small_font;
|
||||
if(layout.row_count > 1)
|
||||
layout.height += (layout.row_count - 1) * layout.row_step;
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
static int
|
||||
ui_draw_theme_grid(int x, int circle_y, int w, int dark, int *theme_id)
|
||||
{
|
||||
int changed = 0;
|
||||
int small_font = FLINT_TEXT_12;
|
||||
int selected = theme_id != NULL ? *theme_id : FLINT_THEME_SKY;
|
||||
UIThemeGridLayout layout = ui_theme_grid_layout(w);
|
||||
int start_x = x + (w - layout.row_width) / 2;
|
||||
Vector2 mouse_world = ui_mouse_world();
|
||||
|
||||
if(selected < 0 || selected >= FLINT_THEME_COUNT)
|
||||
selected = FLINT_THEME_SKY;
|
||||
|
||||
for(int i = 0; i < FLINT_THEME_COUNT; i++) {
|
||||
FlintThemeId theme = theme_picker_order[i];
|
||||
int row = i / layout.per_row;
|
||||
int col = i % layout.per_row;
|
||||
int cell_x = start_x + col * (layout.cell_w + layout.col_gap);
|
||||
int cx = cell_x + layout.cell_w / 2;
|
||||
int cy = circle_y + row * layout.row_step;
|
||||
Color theme_color = c_circle;
|
||||
|
||||
if(!flint_theme_catalog_color(theme, dark != 0, "circle", &theme_color)) {
|
||||
const char *scope = flint_theme_scope_for(theme, dark != 0);
|
||||
theme_color = flint_theme_get(scope, "circle");
|
||||
}
|
||||
|
||||
DrawCircle(cx, cy, layout.circle_size / 2, theme_color);
|
||||
DrawCircleLines(cx, cy, layout.circle_size / 2 + (selected == theme ? flint_px(2) : flint_px(1)),
|
||||
selected == theme ? c_text : flint_darken(c_bg, 30));
|
||||
|
||||
Rectangle bounds = {
|
||||
(float)(cx - layout.circle_size / 2 - flint_px(4)),
|
||||
(float)(cy - layout.circle_size / 2 - flint_px(4)),
|
||||
(float)(layout.circle_size + flint_px(8)),
|
||||
(float)(layout.circle_size + flint_px(8))
|
||||
};
|
||||
if(CheckCollisionPointRec(mouse_world, bounds) && !ui_input_captures_click(mouse_world)) {
|
||||
ui_mark_clickable();
|
||||
if(IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) {
|
||||
selected = theme;
|
||||
if(theme_id != NULL)
|
||||
*theme_id = theme;
|
||||
changed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
const char *name = ui_theme_label(theme);
|
||||
int name_w = flint_text_measure(name, small_font);
|
||||
flint_text_draw(name, cx - name_w / 2,
|
||||
cy + layout.circle_size / 2 + layout.label_gap,
|
||||
small_font, c_text);
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_theme_switcher(int x, int y, int w, const char *label,
|
||||
const char *light_label, const char *dark_label,
|
||||
int *theme_id, int *dark_mode)
|
||||
{
|
||||
int changed = 0;
|
||||
int font = flint_ui_font();
|
||||
int dark = dark_mode != NULL ? *dark_mode : 0;
|
||||
|
||||
flint_text_draw(label ? label : "Theme", x, y, font, c_text);
|
||||
|
||||
int light_w = flint_text_measure(light_label ? light_label : "Light", font);
|
||||
int dark_w = flint_text_measure(dark_label ? dark_label : "Dark", font);
|
||||
int max_label_w = light_w > dark_w ? light_w : dark_w;
|
||||
int toggle_w = max_label_w * 2 + flint_px(32);
|
||||
int min_toggle_w = flint_px(100);
|
||||
if(toggle_w < min_toggle_w)
|
||||
toggle_w = min_toggle_w;
|
||||
if(toggle_w > w)
|
||||
toggle_w = w;
|
||||
|
||||
int toggle_h = flint_px(28);
|
||||
int toggle_x = x + w - toggle_w - flint_px(8);
|
||||
int toggle_y = y - flint_px(2);
|
||||
if(ui_draw_toggle_switch(toggle_x, toggle_y, toggle_w, toggle_h, &dark,
|
||||
light_label ? light_label : "Light",
|
||||
dark_label ? dark_label : "Dark")) {
|
||||
if(dark_mode != NULL)
|
||||
*dark_mode = dark;
|
||||
changed = 1;
|
||||
}
|
||||
|
||||
if(ui_draw_theme_grid(x, y + flint_px(64), w, dark, theme_id))
|
||||
changed = 1;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_theme_picker(int x, int y, int w, const char *label, int dark_mode,
|
||||
int *theme_id)
|
||||
{
|
||||
int changed = 0;
|
||||
int font = flint_ui_font();
|
||||
|
||||
flint_text_draw(label ? label : "Theme", x, y, font, c_text);
|
||||
if(ui_draw_theme_grid(x, y + flint_px(54), w, dark_mode != 0, theme_id))
|
||||
changed = 1;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
int
|
||||
ui_theme_picker_height(int w)
|
||||
{
|
||||
return flint_px(54) + ui_theme_grid_layout(w).height;
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
#include "ui.h"
|
||||
|
||||
FlintUIToolbarResult
|
||||
ui_draw_toolbar(FlintUIToolbar toolbar)
|
||||
{
|
||||
FlintUIToolbarResult result = {-1, -1};
|
||||
int side_padding = toolbar.side_padding > 0 ? toolbar.side_padding : flint_px(12);
|
||||
int action_icon_size = toolbar.action_icon_size > 0
|
||||
? toolbar.action_icon_size
|
||||
: flint_px(20);
|
||||
int action_icon_padding = toolbar.action_icon_padding > 0
|
||||
? toolbar.action_icon_padding
|
||||
: flint_px(8);
|
||||
int action_gap = toolbar.action_gap > 0 ? toolbar.action_gap : flint_px(6);
|
||||
int action_w = action_icon_size + action_icon_padding * 2;
|
||||
int action_y = toolbar.y + (toolbar.height - action_w) / 2;
|
||||
int controls_x = toolbar.x + toolbar.width - side_padding;
|
||||
|
||||
if(toolbar.draw_menu) {
|
||||
if(toolbar.options != NULL && toolbar.selected_index != NULL &&
|
||||
ui_draw_dropdown_menu(toolbar.id))
|
||||
result.selected_menu_item = toolbar.selected_index != NULL
|
||||
? *toolbar.selected_index
|
||||
: -1;
|
||||
return result;
|
||||
}
|
||||
|
||||
DrawRectangle(toolbar.x, toolbar.y, toolbar.width, toolbar.height,
|
||||
flint_darken(c_bg, 14));
|
||||
DrawLine(toolbar.x, toolbar.y + toolbar.height - 1,
|
||||
toolbar.x + toolbar.width, toolbar.y + toolbar.height - 1,
|
||||
flint_darken(c_bg, 42));
|
||||
|
||||
if(toolbar.actions != NULL && toolbar.action_count > 0) {
|
||||
for(int i = toolbar.action_count - 1; i >= 0; i--) {
|
||||
int hover = 0;
|
||||
int action_x;
|
||||
|
||||
controls_x -= action_w;
|
||||
action_x = controls_x;
|
||||
if(!toolbar.actions[i].disabled &&
|
||||
ui_draw_icon_btn_padded(action_x, action_y, action_icon_size,
|
||||
action_icon_padding,
|
||||
toolbar.actions[i].icon, &hover))
|
||||
result.clicked_action = i;
|
||||
controls_x -= action_gap;
|
||||
}
|
||||
}
|
||||
|
||||
if(toolbar.options != NULL && toolbar.option_count > 0 &&
|
||||
toolbar.selected_index != NULL) {
|
||||
int dropdown_h = toolbar.dropdown_height > 0
|
||||
? toolbar.dropdown_height
|
||||
: flint_px(36);
|
||||
int dropdown_x = toolbar.x + side_padding;
|
||||
int dropdown_y = toolbar.y + (toolbar.height - dropdown_h) / 2;
|
||||
int dropdown_w = controls_x - dropdown_x;
|
||||
int dropdown_available_w;
|
||||
|
||||
if(toolbar.action_count > 0)
|
||||
dropdown_w -= side_padding - action_gap;
|
||||
dropdown_available_w = dropdown_w;
|
||||
if(toolbar.dropdown_min_width > 0 && dropdown_w < toolbar.dropdown_min_width)
|
||||
dropdown_w = toolbar.dropdown_min_width;
|
||||
if(toolbar.dropdown_max_width > 0 && dropdown_w > toolbar.dropdown_max_width)
|
||||
dropdown_w = toolbar.dropdown_max_width;
|
||||
if(dropdown_available_w > 0 && dropdown_w > dropdown_available_w)
|
||||
dropdown_w = dropdown_available_w;
|
||||
if(dropdown_w < 0)
|
||||
dropdown_w = 0;
|
||||
ui_draw_dropdown_button(toolbar.id, dropdown_x, dropdown_y,
|
||||
dropdown_w, dropdown_h,
|
||||
toolbar.options, toolbar.option_count,
|
||||
toolbar.selected_index);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
FlintUIToolbarHeaderResult
|
||||
ui_draw_toolbar_header(FlintUIToolbarHeader header)
|
||||
{
|
||||
FlintUIToolbarHeaderResult result;
|
||||
FlintUIToolbar toolbar = header.toolbar;
|
||||
int height = toolbar.height > 0 ? toolbar.height : flint_px(58);
|
||||
int icon_size = header.leading_icon_size > 0 ? header.leading_icon_size : flint_px(20);
|
||||
int icon_padding = header.leading_icon_padding > 0 ? header.leading_icon_padding : flint_px(8);
|
||||
int leading_w = header.leading_width;
|
||||
int hover = 0;
|
||||
|
||||
memset(&result, 0, sizeof(result));
|
||||
if(leading_w <= 0 && header.leading_icon.id != 0)
|
||||
leading_w = icon_size + icon_padding * 2 + flint_px(24);
|
||||
|
||||
if(!toolbar.draw_menu) {
|
||||
DrawRectangle(0, 0, ui_view_width, height, flint_darken(c_bg, 14));
|
||||
DrawLine(0, height - 1, ui_view_width, height - 1,
|
||||
flint_darken(c_bg, 42));
|
||||
if(header.leading_icon.id != 0) {
|
||||
result.leading_clicked = ui_draw_icon_btn_padded(flint_px(12), flint_px(12),
|
||||
icon_size, icon_padding,
|
||||
header.leading_icon,
|
||||
&hover);
|
||||
}
|
||||
toolbar.x = leading_w;
|
||||
toolbar.y = 0;
|
||||
toolbar.width = ui_view_width - leading_w;
|
||||
toolbar.height = height;
|
||||
if(toolbar.width < 0)
|
||||
toolbar.width = 0;
|
||||
}
|
||||
|
||||
result.toolbar = ui_draw_toolbar(toolbar);
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#include "ui.h"
|
||||
|
||||
void
|
||||
ui_draw_tutorial_image_placeholder(const char *label, int x, int y, int w, int h)
|
||||
{
|
||||
DrawRectangle(x, y, w, h, flint_darken(c_bg, 12));
|
||||
ui_draw_bevel(x, y, w, h, flint_darken(c_bg, 45), flint_lighten(c_bg, 35));
|
||||
int font = flint_ui_font();
|
||||
int tw = flint_text_measure(label, font);
|
||||
flint_text_draw(label, x + w / 2 - tw / 2, flint_ui_text_y(label, y, h, font), font, c_text);
|
||||
}
|
||||
|
||||
void
|
||||
ui_draw_tutorial_image(Texture2D texture, const char *fallback, int x, int y, int w, int h)
|
||||
{
|
||||
if(texture.id == 0) {
|
||||
ui_draw_tutorial_image_placeholder(fallback, x, y, w, h);
|
||||
return;
|
||||
}
|
||||
|
||||
float scale_x = (float)w / (float)texture.width;
|
||||
float scale_y = (float)h / (float)texture.height;
|
||||
float scale = scale_x < scale_y ? scale_x : scale_y;
|
||||
float dst_w = (float)texture.width * scale;
|
||||
float dst_h = (float)texture.height * scale;
|
||||
Rectangle src = {0, 0, (float)texture.width, (float)texture.height};
|
||||
Rectangle dst = {x + ((float)w - dst_w) * 0.5f, y + ((float)h - dst_h) * 0.5f, dst_w, dst_h};
|
||||
|
||||
DrawTexturePro(texture, src, dst, (Vector2){0}, 0, WHITE);
|
||||
}
|
||||
|
||||
/* ================================================================
|
||||
* MODAL DIALOGS
|
||||
* ================================================================ */
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef FLINT_UI_INTERNAL_H
|
||||
#define FLINT_UI_INTERNAL_H
|
||||
|
||||
#include "flint_ui.h"
|
||||
#include "flint_clip.h"
|
||||
#include "flint_dpi.h"
|
||||
#include "flint.h"
|
||||
#include "flint_text_layout.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(PLATFORM_WEB)
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
extern Color c_text, c_bg, c_surface, c_circle, c_button, c_button_hover, c_icon;
|
||||
extern Camera2D g_ui_camera;
|
||||
extern Texture2D g_ui_gear_icon;
|
||||
extern Texture2D g_ui_x_icon;
|
||||
extern int g_ui_slider_active_id;
|
||||
extern int g_ui_input_blocked;
|
||||
extern int g_ui_pointer_dragging;
|
||||
extern int g_ui_pointer_owner;
|
||||
|
||||
enum {
|
||||
UI_POINTER_OWNER_NONE = 0,
|
||||
UI_POINTER_OWNER_SCROLL,
|
||||
UI_POINTER_OWNER_HORIZONTAL_SLIDER,
|
||||
UI_POINTER_OWNER_VERTICAL_SLIDER
|
||||
};
|
||||
|
||||
Vector2 ui_mouse_world(void);
|
||||
void ui_mark_clickable(void);
|
||||
void ui_mark_disabled(void);
|
||||
int ui_pointer_drag_is_horizontal(void);
|
||||
int ui_hover_effects_enabled(void);
|
||||
int ui_base_input_captures_click(Vector2 point, int include_pointer_drag);
|
||||
int ui_input_captures_click_internal(Vector2 point, int include_pointer_drag);
|
||||
void ui_push_input_clip(Rectangle bounds);
|
||||
void ui_pop_input_clip(void);
|
||||
int ui_clampi(int value, int min_value, int max_value);
|
||||
|
||||
#endif
|
||||
@@ -25,6 +25,9 @@ Návod
|
||||
[tab_settings]
|
||||
Nastavení
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiky
|
||||
---
|
||||
[play_button]
|
||||
SPUSTIT
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Meditace
|
||||
[meditation_manual_title]
|
||||
Meditace
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Jednoduchá meditační praxe pro dech, klid a uvědomění.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Vyberte hudbu, pokud pomáhá sezení zklidnit, a pohodlně se posaďte. Nechte pozornost spočinout na dechu. Když vás myšlenky odvedou, jasně si toho všimněte a vraťte se bez úsilí. Gong označí začátek i konec.
|
||||
Vyberte hudbu, pokud chcete. Gong oznaci zacatek a konec.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Meditační hudba
|
||||
@@ -77,19 +83,19 @@ Síť není dostupná
|
||||
Nelze se připojit k serveru s meditačním audiem. Zkontrolujte síťová oprávnění Androidu a připojení k internetu a zkuste to znovu.
|
||||
---
|
||||
[duration_5m]
|
||||
5m
|
||||
5 min
|
||||
---
|
||||
[duration_15m]
|
||||
15m
|
||||
15 min
|
||||
---
|
||||
[duration_30m]
|
||||
30m
|
||||
30 min
|
||||
---
|
||||
[duration_1h]
|
||||
1h
|
||||
1 h
|
||||
---
|
||||
[duration_2h]
|
||||
2h
|
||||
2 h
|
||||
---
|
||||
[breath_button]
|
||||
DÝCHAT
|
||||
@@ -213,13 +219,13 @@ Pocatecni rychlost
|
||||
Upravit pocatecni rychlost
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
Animace dýchání
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
Lineární
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
Nádech / výdech
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Pocatecni rychlost
|
||||
@@ -251,6 +257,9 @@ Kruh
|
||||
[volume_label]
|
||||
Hlasitost
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Zobrazit ovládání hlasitosti v sezeních
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Obnovit výchozí
|
||||
---
|
||||
@@ -303,6 +312,9 @@ Importovat data
|
||||
[import_failed]
|
||||
Import selhal
|
||||
---
|
||||
[imported_data]
|
||||
Data importována
|
||||
---
|
||||
[imported_sessions]
|
||||
Importováno %d sezení
|
||||
---
|
||||
@@ -312,26 +324,38 @@ Neplatný exportní soubor
|
||||
[import_cancelled]
|
||||
Import zrušen
|
||||
---
|
||||
[import_choice_title]
|
||||
Importovat nastavení?
|
||||
---
|
||||
[import_choice_message]
|
||||
Nalezeny data a nastavení.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Data
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Data+Nastavení
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
Export zrušen
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
Žádná data k exportu
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
Žádná data ke smazání
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
Smazat všechna data?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
Tím se trvale smažou všechna uložená sezení.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
Mazání zrušeno
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
Smazáno %lld sezení
|
||||
---
|
||||
[toggle_off]
|
||||
VYP
|
||||
@@ -379,21 +403,20 @@ Nikdy ho nepoužívejte při řízení,
|
||||
vestoje ani ve vodě.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Stačí postupovat ve 4 krocích:
|
||||
Jednoduše postupujte podle 3 kroků:
|
||||
|
||||
1. Dýchejte rytmicky.
|
||||
1. Třicetkrát se nadechněte a vydechněte.
|
||||
2. Vydechněte a zadržte dech.
|
||||
3. Zhluboka se nadechněte a zadržte dech.
|
||||
4. Vydechněte a opakujte.
|
||||
3. Když pocítíte potřebu nadechnout se, nadechněte se a zadržte dech na 15 sekund.
|
||||
|
||||
Pomocí ikony ozubeného kola %i upravíte kola, nádechy, rychlost a pauzy.
|
||||
Vydechněte a postup opakujte.
|
||||
|
||||
Ikonou klíče %i upravíte kola, dechy, rychlost a pauzy.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Naplňte plíce úplně a potom nechte dech volně odejít.
|
||||
Třicetkrát se nadechněte a vydechněte.
|
||||
|
||||
Tímto posuvníkem nastavíte tempo dechového kruhu.
|
||||
|
||||
Najděte rytmus, který vám připadá přirozený.
|
||||
Najděte rytmus, který vám připadá přirozený: stabilní a rychlý, ale stále s plným dechem.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Postupná rychlost usnadňuje vstup do prvního kola.
|
||||
@@ -401,17 +424,14 @@ Postupná rychlost usnadňuje vstup do prvního kola.
|
||||
Když je zapnutá, první kolo začne rychlostí 1 pro prvních 5 nádechů a potom se postupně zvýší na vámi vybranou rychlost.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Po dechovém kole
|
||||
normálně vydechněte a zadržte dech.
|
||||
Po 30 deších vydechněte a zadržte dech tak dlouho, jak můžete.
|
||||
|
||||
Uvolněte se, až si tělo řekne
|
||||
o vzduch. Nenuťte to.
|
||||
Když pocítíte potřebu nadechnout se, stiskněte tlačítko DECH.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Plně se nadechněte a zadržte dech asi na 15 sekund.
|
||||
Plně se nadechněte a zadržte dech na 15 sekund.
|
||||
|
||||
Potom vydechněte a začněte další kolo.
|
||||
Časem může každé kolo působit hlouběji.
|
||||
Vydechněte a začne další kolo.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
PŘESKOČIT
|
||||
@@ -455,3 +475,291 @@ Smazat toto kolo? Tuto akci nelze vrátit.
|
||||
[delete_button]
|
||||
Smazat
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Hudba od Elijah_K.
|
||||
---
|
||||
[theme_system]
|
||||
Systém
|
||||
---
|
||||
[theme_sky]
|
||||
Obloha
|
||||
---
|
||||
[theme_ocean]
|
||||
Oceán
|
||||
---
|
||||
[theme_forest]
|
||||
Les
|
||||
---
|
||||
[theme_sunset]
|
||||
Západ slunce
|
||||
---
|
||||
[theme_lavender]
|
||||
Levandule
|
||||
---
|
||||
[theme_cherry]
|
||||
Třešeň
|
||||
---
|
||||
[theme_dawn]
|
||||
Úsvit
|
||||
---
|
||||
[theme_sage]
|
||||
Šalvěj
|
||||
---
|
||||
[theme_sepia]
|
||||
Sépie
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Máta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Kobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientace
|
||||
---
|
||||
[orientation_system]
|
||||
Systém
|
||||
---
|
||||
[orientation_portrait]
|
||||
Na výšku
|
||||
---
|
||||
[orientation_landscape]
|
||||
Na šířku
|
||||
---
|
||||
[orientation_sensor]
|
||||
Senzor
|
||||
---
|
||||
[back_button]
|
||||
Zpět
|
||||
---
|
||||
[close_button]
|
||||
Zavřít
|
||||
---
|
||||
[sync_account_title]
|
||||
Účet
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Nastavit účet
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Vytvořit účet
|
||||
---
|
||||
[sync_account_created]
|
||||
Účet vytvořen
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Účet se nepodařilo vytvořit
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Importovat soubor .key
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Importovat klíč účtu
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Klíč účtu importován
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Klíč účtu se nepodařilo importovat
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Import klíče účtu zrušen
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs není pro tento cíl sestaveno.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Veřejné ID
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Kopírovat ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
Veřejné ID zkopírováno
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Zálohovat klíč
|
||||
---
|
||||
[sync_remote_label]
|
||||
Vzdálený server
|
||||
---
|
||||
[sync_connect_button]
|
||||
Připojit
|
||||
---
|
||||
[sync_connected_button]
|
||||
Připojeno
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Použijte https:// nebo loopback jako localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Synchronizační server uložen
|
||||
---
|
||||
[sync_connected]
|
||||
Vzdálená synchronizace dokončena
|
||||
---
|
||||
[sync_failed]
|
||||
Vzdálená synchronizace selhala
|
||||
---
|
||||
[sync_unavailable]
|
||||
Vzdálená synchronizace není na této platformě dostupná
|
||||
---
|
||||
[sync_no_account]
|
||||
Před připojením vytvořte účet
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Vzdálený server odmítl tento účet
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Uložte tento soukromý klíč někam, kde jej máte pod kontrolou. Kdokoli s ním může převzít tento účet.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Zálohovat klíč účtu
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Uložit soubor .key
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Uložit klíč účtu
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Záloha klíče účtu uložena
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Zálohu klíče účtu se nepodařilo uložit
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Záloha klíče účtu zrušena
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Smazat účet
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Smazat účet?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Smazat tento účet ze vzdáleného serveru a z tohoto zařízení? Tuto akci nelze vrátit zpět.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Účet smazán
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Smazání účtu zrušeno
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nový návyk
|
||||
---
|
||||
[habit_new_title]
|
||||
Nový návyk
|
||||
---
|
||||
[habit_edit_title]
|
||||
Upravit návyk
|
||||
---
|
||||
[habit_name_label]
|
||||
Název
|
||||
---
|
||||
[habit_underline_label]
|
||||
Podtržení
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Seznam cvičení
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Propojte tento návyk se cvičeními. Dny s odpovídajícími záznamy se zobrazí jako splněné a mohou otevřít editor sezení.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Počítání
|
||||
---
|
||||
[habit_counting_info]
|
||||
Více počtů umožní uložit v jednom dni více než jeden záznam. Nechte vypnuto pro jednoduché sledování splněno nebo nesplněno.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Více počtů
|
||||
---
|
||||
[habit_delete_title]
|
||||
Smazat návyk?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Smazat tento návyk? Tuto akci nelze vrátit zpět.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Smazat návyk
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Přidat nový návyk
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Načíst další
|
||||
---
|
||||
[habit_empty_title]
|
||||
Nejsou vytvořeny žádné návyky
|
||||
---
|
||||
[habit_create_button]
|
||||
Vytvořit návyk
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
Za poslední týden nejsou žádná kola
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Aktuální série
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
Posledních 30 dní
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Kola zádrže dechu Wim Hof
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Vzorec podle dnů v týdnu
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Čas cvičení
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Nejlepší zádrž
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Celková zádrž
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Nejlepší série
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Upravit spodní navigaci
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Spodní navigace
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Přidat položku
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Položka 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Položka 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Položka 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Položka 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Položka 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Položka 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Položka 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Položka 8
|
||||
---
|
||||
[reset_button]
|
||||
Obnovit
|
||||
---
|
||||
@@ -20,11 +20,14 @@ Erledigt
|
||||
Markieren
|
||||
---
|
||||
[tab_manual]
|
||||
Tutorial
|
||||
Anleitung
|
||||
---
|
||||
[tab_settings]
|
||||
Einstellungen
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiken
|
||||
---
|
||||
[play_button]
|
||||
START
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Meditation
|
||||
[meditation_manual_title]
|
||||
Meditation
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Eine einfache Meditationspraxis für Atem, Ruhe und Achtsamkeit.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Wähle Musik, wenn sie die Sitzung ruhiger macht, und setze dich bequem hin. Lass die Aufmerksamkeit auf dem Atem ruhen. Wenn Gedanken dich wegziehen, bemerke es klar und kehre ohne Druck zurück. Ein Gong markiert Anfang und Ende.
|
||||
Wahlen Sie Musik, wenn Sie mochten. Ein Gong markiert Anfang und Ende.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Meditationsmusik
|
||||
@@ -77,19 +83,19 @@ Netzwerk nicht verfügbar
|
||||
Der Meditations-Audioserver konnte nicht erreicht werden. Prüfe die Android-Netzwerkberechtigungen und deine Internetverbindung und versuche es erneut.
|
||||
---
|
||||
[duration_5m]
|
||||
5m
|
||||
5 Min.
|
||||
---
|
||||
[duration_15m]
|
||||
15m
|
||||
15 Min.
|
||||
---
|
||||
[duration_30m]
|
||||
30m
|
||||
30 Min.
|
||||
---
|
||||
[duration_1h]
|
||||
1h
|
||||
1 Std.
|
||||
---
|
||||
[duration_2h]
|
||||
2h
|
||||
2 Std.
|
||||
---
|
||||
[breath_button]
|
||||
ATEM
|
||||
@@ -213,13 +219,13 @@ Startgeschwindigkeit
|
||||
Startgeschwindigkeit andern
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
Atemanimation
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
Gleichmäßig
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
Ein / Aus
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Startgeschwindigkeit
|
||||
@@ -251,6 +257,9 @@ Kreis
|
||||
[volume_label]
|
||||
Lautstärke
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Lautstärkeregler in Sitzungen anzeigen
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Auf Standard zurücksetzen
|
||||
---
|
||||
@@ -303,6 +312,9 @@ Daten importieren
|
||||
[import_failed]
|
||||
Import fehlgeschlagen
|
||||
---
|
||||
[imported_data]
|
||||
Daten importiert
|
||||
---
|
||||
[imported_sessions]
|
||||
%d Sitzungen importiert
|
||||
---
|
||||
@@ -310,28 +322,40 @@ Import fehlgeschlagen
|
||||
Ungültige Exportdatei
|
||||
---
|
||||
[import_cancelled]
|
||||
Import cancelled
|
||||
Import abgebrochen
|
||||
---
|
||||
[import_choice_title]
|
||||
Einstellungen importieren?
|
||||
---
|
||||
[import_choice_message]
|
||||
Daten und Einstellungen gefunden.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Daten
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Daten+Einstellungen
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
Export abgebrochen
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
Keine Daten zum Exportieren
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
Keine Daten zum Löschen
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
Alle Daten löschen?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
Dadurch werden alle gespeicherten Sitzungen dauerhaft gelöscht.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
Löschen abgebrochen
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
%lld Sitzungen gelöscht
|
||||
---
|
||||
[toggle_off]
|
||||
AUS
|
||||
@@ -379,21 +403,20 @@ Benutzen Sie sie niemals beim Fahren,
|
||||
Stehen oder im Wasser.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Folgen Sie einfach 4 Schritten:
|
||||
Folge einfach 3 Schritten:
|
||||
|
||||
1. Atmen Sie rhythmisch.
|
||||
2. Atmen Sie aus und halten Sie.
|
||||
3. Atmen Sie tief ein und halten Sie.
|
||||
4. Atmen Sie aus und wiederholen Sie.
|
||||
1. Atme 30 Mal ein und aus.
|
||||
2. Atme aus und halte.
|
||||
3. Wenn du den Drang zu atmen spürst, atme ein und halte 15 Sekunden.
|
||||
|
||||
Nutzen Sie das Schraubenschlüssel-Symbol %i, um Runden, Atemzüge, Geschwindigkeit und Pausen anzupassen.
|
||||
Atme aus und wiederhole den Ablauf.
|
||||
|
||||
Mit dem Schraubenschlüssel-Symbol %i passt du Runden, Atemzüge, Tempo und Pausen an.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Füllen Sie Ihre Lungen vollständig, dann lassen Sie den Atem herausfließen.
|
||||
Atme 30 Mal ein und aus.
|
||||
|
||||
Nutzen Sie diesen Schieberegler, um das Tempo des Atemkreises einzustellen.
|
||||
|
||||
Finden Sie einen Rhythmus, der sich natürlich für Sie anfühlt.
|
||||
Finde einen Rhythmus, der sich natürlich anfühlt: gleichmäßig und schnell, aber weiterhin vollständig.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Progressive Geschwindigkeit macht den Einstieg in die erste Runde leichter.
|
||||
@@ -401,20 +424,17 @@ Progressive Geschwindigkeit macht den Einstieg in die erste Runde leichter.
|
||||
Wenn sie aktiviert ist, beginnt die erste Runde bei Geschwindigkeit 1 für die ersten 5 Atemzüge und steigt dann schrittweise auf Ihre gewählte Geschwindigkeit.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Nach der Atemrunde,
|
||||
atmen Sie normal aus und halten Sie.
|
||||
Atme nach 30 Atemzügen aus und halte so lange du kannst.
|
||||
|
||||
Lassen Sie los, wenn Ihr Körper
|
||||
nach Luft verlangt. Zwängen Sie es nicht.
|
||||
Wenn du den Drang zu atmen spürst, drücke die ATEM-Taste.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Atmen Sie vollständig ein und halten Sie etwa 15 Sekunden.
|
||||
Atme vollständig ein und halte 15 Sekunden.
|
||||
|
||||
Dann atmen Sie aus und beginnen die nächste Runde.
|
||||
Mit der Zeit kann sich jede Runde tiefer anfühlen.
|
||||
Atme aus, dann beginnt die nächste Runde.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
SKIP
|
||||
ÜBERSPRINGEN
|
||||
---
|
||||
[tutorial_back_button]
|
||||
ZURÜCK
|
||||
@@ -455,3 +475,291 @@ Diese Runde löschen? Das kann nicht rückgängig gemacht werden.
|
||||
[delete_button]
|
||||
Löschen
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musik von Elijah_K.
|
||||
---
|
||||
[theme_system]
|
||||
System
|
||||
---
|
||||
[theme_sky]
|
||||
Himmel
|
||||
---
|
||||
[theme_ocean]
|
||||
Ozean
|
||||
---
|
||||
[theme_forest]
|
||||
Wald
|
||||
---
|
||||
[theme_sunset]
|
||||
Sonnenuntergang
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavendel
|
||||
---
|
||||
[theme_cherry]
|
||||
Kirsche
|
||||
---
|
||||
[theme_dawn]
|
||||
Morgenrot
|
||||
---
|
||||
[theme_sage]
|
||||
Salbei
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Minze
|
||||
---
|
||||
[theme_cobalt]
|
||||
Kobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Ausrichtung
|
||||
---
|
||||
[orientation_system]
|
||||
System
|
||||
---
|
||||
[orientation_portrait]
|
||||
Hochformat
|
||||
---
|
||||
[orientation_landscape]
|
||||
Querformat
|
||||
---
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Zurück
|
||||
---
|
||||
[close_button]
|
||||
Schließen
|
||||
---
|
||||
[sync_account_title]
|
||||
Konto
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Konto einrichten
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Konto erstellen
|
||||
---
|
||||
[sync_account_created]
|
||||
Konto erstellt
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Konto konnte nicht erstellt werden
|
||||
---
|
||||
[sync_import_key_button]
|
||||
.key-Datei importieren
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Kontoschlüssel importieren
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Kontoschlüssel importiert
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Kontoschlüssel konnte nicht importiert werden
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Import des Kontoschlüssels abgebrochen
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs ist für dieses Ziel nicht gebaut.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Öffentliche ID
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
ID kopieren
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
Öffentliche ID kopiert
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Schlüssel sichern
|
||||
---
|
||||
[sync_remote_label]
|
||||
Server
|
||||
---
|
||||
[sync_connect_button]
|
||||
Verbinden
|
||||
---
|
||||
[sync_connected_button]
|
||||
Verbunden
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Nutze https:// oder Loopback wie localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Sync-Server gespeichert
|
||||
---
|
||||
[sync_connected]
|
||||
Remote-Sync abgeschlossen
|
||||
---
|
||||
[sync_failed]
|
||||
Remote-Sync fehlgeschlagen
|
||||
---
|
||||
[sync_unavailable]
|
||||
Remote-Sync ist auf dieser Plattform nicht verfügbar
|
||||
---
|
||||
[sync_no_account]
|
||||
Erstelle ein Konto, bevor du dich verbindest
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Remote hat dieses Konto abgelehnt
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Speichere diesen privaten Schlüssel an einem Ort, den du kontrollierst. Jeder mit diesem Schlüssel kann dieses Konto übernehmen.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Kontoschlüssel sichern
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
.key-Datei speichern
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Kontoschlüssel speichern
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Kontoschlüssel-Sicherung gespeichert
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Kontoschlüssel-Sicherung konnte nicht gespeichert werden
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Kontoschlüssel-Sicherung abgebrochen
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Konto löschen
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Konto löschen?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Dieses Konto vom Remote-Server und von diesem Gerät löschen? Das kann nicht rückgängig gemacht werden.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Konto gelöscht
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Kontolöschung abgebrochen
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Neue Gewohnheit
|
||||
---
|
||||
[habit_new_title]
|
||||
Neue Gewohnheit
|
||||
---
|
||||
[habit_edit_title]
|
||||
Gewohnheit bearbeiten
|
||||
---
|
||||
[habit_name_label]
|
||||
Bezeichnung
|
||||
---
|
||||
[habit_underline_label]
|
||||
Unterstreichung
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Übungsliste
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Verknüpfe diese Gewohnheit mit Übungssitzungen. Tage mit passenden Sitzungen werden als erledigt angezeigt und können den Sitzungseditor öffnen.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Zählen
|
||||
---
|
||||
[habit_counting_info]
|
||||
Mehrfachzählungen erlauben mehr als einen Eintrag pro Tag. Lass es aus für einfaches Erledigt-oder-nicht-Tracking.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Mehrfachzählungen
|
||||
---
|
||||
[habit_delete_title]
|
||||
Gewohnheit löschen?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Diese Gewohnheit löschen? Das kann nicht rückgängig gemacht werden.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Gewohnheit löschen
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Neue Gewohnheit hinzufügen
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Mehr laden
|
||||
---
|
||||
[habit_empty_title]
|
||||
Keine Gewohnheiten erstellt
|
||||
---
|
||||
[habit_create_button]
|
||||
Gewohnheit erstellen
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
Keine Runden in der letzten Woche
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Aktuelle Serie
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
Letzte 30 Tage
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Wim-Hof-Atemhalte-Runden
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Wochentagsmuster
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Übungszeit
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Beste Atemhaltezeit
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Gesamte Atemhaltezeit
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Beste Serie
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Untere Navigation anpassen
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Untere Navigation
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Eintrag hinzufügen
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Eintrag 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Eintrag 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Eintrag 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Eintrag 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Eintrag 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Eintrag 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Eintrag 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Eintrag 8
|
||||
---
|
||||
[reset_button]
|
||||
Zurücksetzen
|
||||
---
|
||||
@@ -25,6 +25,9 @@ Tutorial
|
||||
[tab_settings]
|
||||
Settings
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistics
|
||||
---
|
||||
[play_button]
|
||||
PLAY
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Meditation
|
||||
[meditation_manual_title]
|
||||
Meditation
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Settle into a quiet seat and let this session be simple: arrive, breathe, and begin.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Choose music if it helps the session feel steady, then sit comfortably. Let attention rest on the breath. When thoughts pull you away, notice that clearly and return without force. A gong marks the beginning and end.
|
||||
Choose music if you want it. A gong marks the beginning and end.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Meditation Music
|
||||
@@ -206,6 +212,42 @@ Theme mode
|
||||
[theme_system]
|
||||
System
|
||||
---
|
||||
[theme_sky]
|
||||
Sky
|
||||
---
|
||||
[theme_ocean]
|
||||
Ocean
|
||||
---
|
||||
[theme_forest]
|
||||
Forest
|
||||
---
|
||||
[theme_sunset]
|
||||
Sunset
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavender
|
||||
---
|
||||
[theme_cherry]
|
||||
Cherry
|
||||
---
|
||||
[theme_dawn]
|
||||
Dawn
|
||||
---
|
||||
[theme_sage]
|
||||
Sage
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Mint
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientation
|
||||
---
|
||||
@@ -272,6 +314,9 @@ Circle
|
||||
[volume_label]
|
||||
Volume
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Show volume control in sessions
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Reset to defaults
|
||||
---
|
||||
@@ -324,6 +369,9 @@ Import Data
|
||||
[import_failed]
|
||||
Import failed
|
||||
---
|
||||
[imported_data]
|
||||
Imported data
|
||||
---
|
||||
[imported_sessions]
|
||||
Imported %d sessions
|
||||
---
|
||||
@@ -333,6 +381,18 @@ Invalid export file
|
||||
[import_cancelled]
|
||||
Import cancelled
|
||||
---
|
||||
[import_choice_title]
|
||||
Import settings?
|
||||
---
|
||||
[import_choice_message]
|
||||
Data and settings found.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Data
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Data+Settings
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
---
|
||||
@@ -400,21 +460,20 @@ Never use it while driving,
|
||||
standing, or in water.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Simply follow 4 steps:
|
||||
Simply follow 3 steps:
|
||||
|
||||
1. Breathe rhythmically.
|
||||
1. Breathe in and out 30 times.
|
||||
2. Exhale and hold.
|
||||
3. Inhale deeply and hold.
|
||||
4. Exhale and repeat.
|
||||
3. When you feel the urge to breathe, breathe in and hold for 15 seconds.
|
||||
|
||||
Exhale, then repeat the process.
|
||||
|
||||
Use the wrench icon %i to adjust rounds, breaths, speed, and pauses.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Fill your lungs fully, then let the breath flow out.
|
||||
Breathe in and out 30 times.
|
||||
|
||||
Use this slider to set the pace of the breathing circle.
|
||||
|
||||
Find a rhythm that feels natural for you.
|
||||
Find a rhythm that feels natural to you: steady and quick, while still breathing fully.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Progressive speed makes the first round easier to enter.
|
||||
@@ -422,17 +481,14 @@ Progressive speed makes the first round easier to enter.
|
||||
When it is on, the first round starts slower, then gradually increases to your selected speed.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Exhale normally and hold.
|
||||
After 30 breaths, exhale and hold as long as you can.
|
||||
|
||||
The center number keeps counting. Circle mode adds layered progress lines.
|
||||
|
||||
Release when your body asks for air.
|
||||
When you feel the urge to breathe, press the BREATH button.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Inhale fully and hold for about 15 seconds.
|
||||
Inhale fully and hold for 15 seconds.
|
||||
|
||||
Then exhale and begin the next round.
|
||||
Over time, each round may feel deeper.
|
||||
Exhale, and the next round will begin.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
SKIP
|
||||
@@ -476,3 +532,235 @@ Delete this round? This cannot be undone.
|
||||
[delete_button]
|
||||
Delete
|
||||
---
|
||||
[back_button]
|
||||
Back
|
||||
---
|
||||
[close_button]
|
||||
Close
|
||||
---
|
||||
[sync_account_title]
|
||||
Account
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Configure Account
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Create Account
|
||||
---
|
||||
[sync_account_created]
|
||||
Account created
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Could not create account
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Import .key File
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Import Account Key
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Account key imported
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Could not import account key
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Account key import cancelled
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs is not built for this target.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Public ID
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Copy ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
Public ID copied
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Backup Key
|
||||
---
|
||||
[sync_remote_label]
|
||||
Remote
|
||||
---
|
||||
[sync_connect_button]
|
||||
Connect
|
||||
---
|
||||
[sync_connected_button]
|
||||
Connected
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Use https:// or loopback like localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Sync server saved
|
||||
---
|
||||
[sync_connected]
|
||||
Remote sync complete
|
||||
---
|
||||
[sync_failed]
|
||||
Remote sync failed
|
||||
---
|
||||
[sync_unavailable]
|
||||
Remote sync is not available on this platform
|
||||
---
|
||||
[sync_no_account]
|
||||
Create an account before connecting
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Remote rejected this account
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Save this private key somewhere you control. Anyone with it can claim this account.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Backup Account Key
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Save .key File
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Save Account Key
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Account key backup saved
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Could not save account key backup
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Account key backup cancelled
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Delete Account
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Delete Account?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Delete this account from the remote server and this device? This cannot be undone.
|
||||
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Account deleted
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Account deletion cancelled
|
||||
---
|
||||
[habit_new_default_name]
|
||||
New Habit
|
||||
---
|
||||
[habit_new_title]
|
||||
New Habit
|
||||
---
|
||||
[habit_edit_title]
|
||||
Edit Habit
|
||||
---
|
||||
[habit_name_label]
|
||||
Name
|
||||
---
|
||||
[habit_underline_label]
|
||||
Underline
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Practice list
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Link this habit to practice sessions. Days with matching sessions will show as completed and can open the session editor.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Counting
|
||||
---
|
||||
[habit_counting_info]
|
||||
Multiple counts lets one day store more than one count. Leave it off for simple done or not done habit tracking.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Multiple counts
|
||||
---
|
||||
[habit_delete_title]
|
||||
Delete habit?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Delete this habit? This cannot be undone.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Delete Habit
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Add new habit
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Load more
|
||||
---
|
||||
[habit_empty_title]
|
||||
No habits created
|
||||
---
|
||||
[habit_create_button]
|
||||
Create habit
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
No rounds in the last week
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Current streak
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
Last 30 days
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Wim Hof hold rounds
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Weekday pattern
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Practice time
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Best hold
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Total hold
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Best streak
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Customize bottom navigation
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Bottom Navigation
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Add item
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Item 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Item 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Item 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Item 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Item 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Item 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Item 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Item 8
|
||||
---
|
||||
[reset_button]
|
||||
Reset
|
||||
---
|
||||
@@ -20,11 +20,14 @@ Hecho
|
||||
Marcar
|
||||
---
|
||||
[tab_manual]
|
||||
Tutorial
|
||||
Manual
|
||||
---
|
||||
[tab_settings]
|
||||
Configuración
|
||||
---
|
||||
[tab_statistics]
|
||||
Estadísticas
|
||||
---
|
||||
[play_button]
|
||||
REPRODUCIR
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Meditación
|
||||
[meditation_manual_title]
|
||||
Meditación
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Una práctica de meditación simple para respirar, calmarte y estar presente.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Elige música si ayuda a que la sesión se sienta estable y siéntate cómodamente. Deja que la atención descanse en la respiración. Cuando los pensamientos te arrastren, obsérvalo con claridad y vuelve sin forzar. Un gong marca el inicio y el final.
|
||||
Elige musica si quieres. Un gong marca el inicio y el final.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Música de meditación
|
||||
@@ -77,19 +83,19 @@ Red no disponible
|
||||
No se pudo acceder al servidor de audio de meditación. Revisa los permisos de red de Android y tu conexión a internet, e inténtalo de nuevo.
|
||||
---
|
||||
[duration_5m]
|
||||
5m
|
||||
5 min
|
||||
---
|
||||
[duration_15m]
|
||||
15m
|
||||
15 min
|
||||
---
|
||||
[duration_30m]
|
||||
30m
|
||||
30 min
|
||||
---
|
||||
[duration_1h]
|
||||
1h
|
||||
1 h
|
||||
---
|
||||
[duration_2h]
|
||||
2h
|
||||
2 h
|
||||
---
|
||||
[breath_button]
|
||||
RESPIRACIÓN
|
||||
@@ -213,13 +219,13 @@ Velocidad inicial
|
||||
Modificar velocidad inicial
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
Animación de respiración
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
Lineal
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
Entrada / salida
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Velocidad inicial
|
||||
@@ -251,6 +257,9 @@ Circulo
|
||||
[volume_label]
|
||||
Volumen
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Mostrar control de volumen en las sesiones
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Restablecer valores predeterminados
|
||||
---
|
||||
@@ -303,6 +312,9 @@ Importar datos
|
||||
[import_failed]
|
||||
Error al importar
|
||||
---
|
||||
[imported_data]
|
||||
Datos importados
|
||||
---
|
||||
[imported_sessions]
|
||||
%d sesiones importadas
|
||||
---
|
||||
@@ -310,28 +322,40 @@ Error al importar
|
||||
Archivo de exportación no válido
|
||||
---
|
||||
[import_cancelled]
|
||||
Import cancelled
|
||||
Importación cancelada
|
||||
---
|
||||
[import_choice_title]
|
||||
¿Importar ajustes?
|
||||
---
|
||||
[import_choice_message]
|
||||
Datos y ajustes encontrados.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Datos
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Datos+Ajustes
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
Exportación cancelada
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
No hay datos para exportar
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
No hay datos para eliminar
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
¿Eliminar todos los datos?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
Esto eliminará permanentemente todas las sesiones guardadas.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
Eliminación cancelada
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
%lld sesiones eliminadas
|
||||
---
|
||||
[toggle_off]
|
||||
APAGADO
|
||||
@@ -379,21 +403,20 @@ Nunca la use mientras conduce,
|
||||
de pie o en el agua.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Simplemente siga 4 pasos:
|
||||
Sigue 3 pasos:
|
||||
|
||||
1. Respire rítmicamente.
|
||||
2. Exhale y retenga.
|
||||
3. Inhale profundamente y retenga.
|
||||
4. Exhale y repita.
|
||||
1. Inhala y exhala 30 veces.
|
||||
2. Exhala y mantén.
|
||||
3. Cuando sientas la necesidad de respirar, inhala y mantén durante 15 segundos.
|
||||
|
||||
Use el icono de llave %i para ajustar rondas, respiraciones, velocidad y pausas.
|
||||
Exhala y repite el proceso.
|
||||
|
||||
Usa el icono de llave %i para ajustar rondas, respiraciones, velocidad y pausas.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Llene sus pulmones completamente, luego deje que el respiración fluya hacia afuera.
|
||||
Inhala y exhala 30 veces.
|
||||
|
||||
Use este control deslizante para establecer el ritmo del círculo de respiración.
|
||||
|
||||
Encuentre un ritmo que se sienta natural para usted.
|
||||
Encuentra un ritmo que se sienta natural: estable y rápido, pero respirando completamente.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
La velocidad progresiva hace que la primera ronda sea más fácil de empezar.
|
||||
@@ -401,17 +424,14 @@ La velocidad progresiva hace que la primera ronda sea más fácil de empezar.
|
||||
Cuando está activada, la primera ronda comienza en velocidad 1 durante las primeras 5 respiraciones y luego aumenta gradualmente hasta la velocidad elegida.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Después de la ronda de respiración,
|
||||
exhale normalmente y retenga.
|
||||
Después de 30 respiraciones, exhala y mantén todo lo que puedas.
|
||||
|
||||
Suelte cuando su cuerpo pida
|
||||
aire. No lo fuerce.
|
||||
Cuando sientas la necesidad de respirar, presiona el botón RESPIRAR.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Inhale completamente y retenga unos 15 segundos.
|
||||
Inhala completamente y mantén durante 15 segundos.
|
||||
|
||||
Luego exhale y comience la siguiente ronda.
|
||||
Con el tiempo, cada ronda puede sentirse más profunda.
|
||||
Exhala y comenzará la siguiente ronda.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
OMITIR
|
||||
@@ -455,3 +475,291 @@ Recuento de sesiones: %d
|
||||
[delete_button]
|
||||
Eliminar
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Música de Elijah_K.
|
||||
---
|
||||
[theme_system]
|
||||
Sistema
|
||||
---
|
||||
[theme_sky]
|
||||
Cielo
|
||||
---
|
||||
[theme_ocean]
|
||||
Océano
|
||||
---
|
||||
[theme_forest]
|
||||
Bosque
|
||||
---
|
||||
[theme_sunset]
|
||||
Atardecer
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavanda
|
||||
---
|
||||
[theme_cherry]
|
||||
Cereza
|
||||
---
|
||||
[theme_dawn]
|
||||
Amanecer
|
||||
---
|
||||
[theme_sage]
|
||||
Salvia
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalto
|
||||
---
|
||||
[orientation_label]
|
||||
Orientación
|
||||
---
|
||||
[orientation_system]
|
||||
Sistema
|
||||
---
|
||||
[orientation_portrait]
|
||||
Vertical
|
||||
---
|
||||
[orientation_landscape]
|
||||
Horizontal
|
||||
---
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Atrás
|
||||
---
|
||||
[close_button]
|
||||
Cerrar
|
||||
---
|
||||
[sync_account_title]
|
||||
Cuenta
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Configurar cuenta
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Crear cuenta
|
||||
---
|
||||
[sync_account_created]
|
||||
Cuenta creada
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
No se pudo crear la cuenta
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Importar archivo .key
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Importar clave de cuenta
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Clave de cuenta importada
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
No se pudo importar la clave de cuenta
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Importación de clave cancelada
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs no está compilado para este destino.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID público
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Copiar ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
ID público copiado
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Respaldar clave
|
||||
---
|
||||
[sync_remote_label]
|
||||
Remoto
|
||||
---
|
||||
[sync_connect_button]
|
||||
Conectar
|
||||
---
|
||||
[sync_connected_button]
|
||||
Conectado
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Usa https:// o loopback como localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Servidor de sincronización guardado
|
||||
---
|
||||
[sync_connected]
|
||||
Sincronización remota completa
|
||||
---
|
||||
[sync_failed]
|
||||
Falló la sincronización remota
|
||||
---
|
||||
[sync_unavailable]
|
||||
La sincronización remota no está disponible en esta plataforma
|
||||
---
|
||||
[sync_no_account]
|
||||
Crea una cuenta antes de conectar
|
||||
---
|
||||
[sync_auth_failed]
|
||||
El servidor remoto rechazó esta cuenta
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Guarda esta clave privada en un lugar que controles. Cualquiera con ella puede reclamar esta cuenta.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Respaldar clave de cuenta
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Guardar archivo .key
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Guardar clave de cuenta
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Respaldo de clave guardado
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
No se pudo guardar el respaldo de la clave
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Respaldo de clave cancelado
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Eliminar cuenta
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
¿Eliminar cuenta?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
¿Eliminar esta cuenta del servidor remoto y de este dispositivo? Esta acción no se puede deshacer.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Cuenta eliminada
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Eliminación de cuenta cancelada
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nuevo hábito
|
||||
---
|
||||
[habit_new_title]
|
||||
Nuevo hábito
|
||||
---
|
||||
[habit_edit_title]
|
||||
Editar hábito
|
||||
---
|
||||
[habit_name_label]
|
||||
Nombre
|
||||
---
|
||||
[habit_underline_label]
|
||||
Subrayado
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Lista de prácticas
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Vincula este hábito con sesiones de práctica. Los días con sesiones coincidentes aparecerán como completados y podrán abrir el editor de sesión.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Conteo
|
||||
---
|
||||
[habit_counting_info]
|
||||
Múltiples conteos permite guardar más de un conteo en un día. Déjalo apagado para un seguimiento simple de hecho o no hecho.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Múltiples conteos
|
||||
---
|
||||
[habit_delete_title]
|
||||
¿Eliminar hábito?
|
||||
---
|
||||
[habit_delete_message]
|
||||
¿Eliminar este hábito? Esta acción no se puede deshacer.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Eliminar hábito
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Agregar nuevo hábito
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Cargar más
|
||||
---
|
||||
[habit_empty_title]
|
||||
No hay hábitos creados
|
||||
---
|
||||
[habit_create_button]
|
||||
Crear hábito
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
No hay rondas en la última semana
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Racha actual
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
Últimos 30 días
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Rondas de retención Wim Hof
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Patrón semanal
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Tiempo de práctica
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Mejor retención
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Retención total
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Mejor racha
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Personalizar navegación inferior
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Navegación inferior
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Añadir elemento
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Elemento 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Elemento 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Elemento 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Elemento 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Elemento 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Elemento 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Elemento 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Elemento 8
|
||||
---
|
||||
[reset_button]
|
||||
Restablecer
|
||||
---
|
||||
@@ -25,6 +25,9 @@ Tutoriel
|
||||
[tab_settings]
|
||||
Réglages
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiques
|
||||
---
|
||||
[play_button]
|
||||
DÉMARRER
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Méditation
|
||||
[meditation_manual_title]
|
||||
Méditation
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Une pratique de méditation simple pour respirer, se calmer et être présent.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Choisissez une musique si elle aide la séance à rester stable, puis asseyez-vous confortablement. Laissez l’attention se poser sur le souffle. Quand les pensées vous emportent, voyez-le clairement et revenez sans forcer. Un gong marque le début et la fin.
|
||||
Choisissez de la musique si vous le souhaitez. Un gong marque le debut et la fin.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Musique de méditation
|
||||
@@ -77,19 +83,19 @@ Réseau indisponible
|
||||
Impossible de joindre le serveur audio de méditation. Vérifiez les autorisations réseau d'Android et votre connexion internet, puis réessayez.
|
||||
---
|
||||
[duration_5m]
|
||||
5m
|
||||
5 min
|
||||
---
|
||||
[duration_15m]
|
||||
15m
|
||||
15 min
|
||||
---
|
||||
[duration_30m]
|
||||
30m
|
||||
30 min
|
||||
---
|
||||
[duration_1h]
|
||||
1h
|
||||
1 h
|
||||
---
|
||||
[duration_2h]
|
||||
2h
|
||||
2 h
|
||||
---
|
||||
[breath_button]
|
||||
RESPIRER
|
||||
@@ -167,7 +173,7 @@ Respiration
|
||||
Séance
|
||||
---
|
||||
[settings_tab_app]
|
||||
App
|
||||
Appli
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Thème
|
||||
@@ -213,13 +219,13 @@ Vitesse de depart
|
||||
Modifier la vitesse de depart
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
Animation de respiration
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
Linéaire
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
Inspiration / expiration
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Vitesse de depart
|
||||
@@ -251,6 +257,9 @@ Cercle
|
||||
[volume_label]
|
||||
Volume
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Afficher le contrôle du volume pendant les séances
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Réinitialiser
|
||||
---
|
||||
@@ -303,6 +312,9 @@ Importer les données
|
||||
[import_failed]
|
||||
Échec de l'import
|
||||
---
|
||||
[imported_data]
|
||||
Données importées
|
||||
---
|
||||
[imported_sessions]
|
||||
%d sessions importées
|
||||
---
|
||||
@@ -312,32 +324,44 @@ Fichier d'export invalide
|
||||
[import_cancelled]
|
||||
Import annulé
|
||||
---
|
||||
[import_choice_title]
|
||||
Importer les réglages ?
|
||||
---
|
||||
[import_choice_message]
|
||||
Données et réglages trouvés.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Données
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Données+Réglages
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
Exportation annulée
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
Aucune donnée à exporter
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
Aucune donnée à supprimer
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
Supprimer toutes les données ?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
Cela supprimera définitivement toutes les séances enregistrées.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
Suppression annulée
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
%lld séances supprimées
|
||||
---
|
||||
[toggle_off]
|
||||
OFF
|
||||
DÉSACTIVÉ
|
||||
---
|
||||
[toggle_on]
|
||||
ON
|
||||
ACTIVÉ
|
||||
---
|
||||
[theme_light]
|
||||
Clair
|
||||
@@ -379,21 +403,20 @@ Ne l'utilisez jamais en conduisant,
|
||||
debout ou dans l'eau.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Suivez simplement 4 étapes :
|
||||
Suivez simplement 3 étapes :
|
||||
|
||||
1. Respirez en rythme.
|
||||
2. Expirez et retenez.
|
||||
3. Inspirez profondément et retenez.
|
||||
4. Expirez et répétez.
|
||||
1. Inspirez et expirez 30 fois.
|
||||
2. Expirez et retenez votre souffle.
|
||||
3. Quand vous ressentez le besoin de respirer, inspirez et retenez 15 secondes.
|
||||
|
||||
Utilisez l'icône de clé %i pour régler les cycles, respirations, vitesse et pauses.
|
||||
Expirez, puis recommencez.
|
||||
|
||||
Utilisez l’icône clé %i pour ajuster les séries, respirations, vitesse et pauses.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Remplissez complètement vos poumons, puis laissez le souffle sortir.
|
||||
Inspirez et expirez 30 fois.
|
||||
|
||||
Utilisez ce curseur pour régler le rythme du cercle de respiration.
|
||||
|
||||
Trouvez un rythme naturel pour vous.
|
||||
Trouvez un rythme naturel : régulier et rapide, tout en respirant pleinement.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
La vitesse progressive rend le premier cycle plus facile à commencer.
|
||||
@@ -401,20 +424,17 @@ La vitesse progressive rend le premier cycle plus facile à commencer.
|
||||
Quand elle est activée, le premier cycle commence à la vitesse 1 pendant les 5 premières respirations, puis augmente progressivement jusqu'à la vitesse choisie.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Après le cycle de respiration,
|
||||
expirez normalement et retenez.
|
||||
Après 30 respirations, expirez et retenez aussi longtemps que possible.
|
||||
|
||||
Relâchez quand votre corps demande
|
||||
de l'air. Ne forcez pas.
|
||||
Quand vous ressentez le besoin de respirer, appuyez sur le bouton RESPIRER.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Inspirez complètement et retenez environ 15 secondes.
|
||||
Inspirez pleinement et retenez 15 secondes.
|
||||
|
||||
Puis expirez et commencez le cycle suivant.
|
||||
Avec le temps, chaque cycle peut sembler plus profond.
|
||||
Expirez, puis la série suivante commencera.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
SKIP
|
||||
PASSER
|
||||
---
|
||||
[tutorial_back_button]
|
||||
RETOUR
|
||||
@@ -455,3 +475,291 @@ Supprimer ce cycle ? Cette action est irréversible.
|
||||
[delete_button]
|
||||
Supprimer
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musique par Elijah_K.
|
||||
---
|
||||
[theme_system]
|
||||
Système
|
||||
---
|
||||
[theme_sky]
|
||||
Ciel
|
||||
---
|
||||
[theme_ocean]
|
||||
Océan
|
||||
---
|
||||
[theme_forest]
|
||||
Forêt
|
||||
---
|
||||
[theme_sunset]
|
||||
Coucher de soleil
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavande
|
||||
---
|
||||
[theme_cherry]
|
||||
Cerise
|
||||
---
|
||||
[theme_dawn]
|
||||
Aube
|
||||
---
|
||||
[theme_sage]
|
||||
Sauge
|
||||
---
|
||||
[theme_sepia]
|
||||
Sépia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menthe
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientation
|
||||
---
|
||||
[orientation_system]
|
||||
Système
|
||||
---
|
||||
[orientation_portrait]
|
||||
Portrait
|
||||
---
|
||||
[orientation_landscape]
|
||||
Paysage
|
||||
---
|
||||
[orientation_sensor]
|
||||
Capteur
|
||||
---
|
||||
[back_button]
|
||||
Retour
|
||||
---
|
||||
[close_button]
|
||||
Fermer
|
||||
---
|
||||
[sync_account_title]
|
||||
Compte
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Configurer le compte
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Créer un compte
|
||||
---
|
||||
[sync_account_created]
|
||||
Compte créé
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Impossible de créer le compte
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Importer un fichier .key
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Importer la clé du compte
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Clé du compte importée
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Impossible d’importer la clé du compte
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Importation de la clé annulée
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs n’est pas compilé pour cette cible.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID public
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Copier l’ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
ID public copié
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Sauvegarder la clé
|
||||
---
|
||||
[sync_remote_label]
|
||||
Distant
|
||||
---
|
||||
[sync_connect_button]
|
||||
Connecter
|
||||
---
|
||||
[sync_connected_button]
|
||||
Connecté
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Utilisez https:// ou une boucle locale comme localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Serveur de synchronisation enregistré
|
||||
---
|
||||
[sync_connected]
|
||||
Synchronisation distante terminée
|
||||
---
|
||||
[sync_failed]
|
||||
Échec de la synchronisation distante
|
||||
---
|
||||
[sync_unavailable]
|
||||
La synchronisation distante n’est pas disponible sur cette plateforme
|
||||
---
|
||||
[sync_no_account]
|
||||
Créez un compte avant de vous connecter
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Le serveur distant a rejeté ce compte
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Enregistrez cette clé privée dans un endroit que vous contrôlez. Toute personne qui la possède peut revendiquer ce compte.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Sauvegarder la clé du compte
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Enregistrer le fichier .key
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Enregistrer la clé du compte
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Sauvegarde de la clé enregistrée
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Impossible d’enregistrer la sauvegarde de la clé
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Sauvegarde de la clé annulée
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Supprimer le compte
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Supprimer le compte ?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Supprimer ce compte du serveur distant et de cet appareil ? Cette action est irréversible.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Compte supprimé
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Suppression du compte annulée
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nouvelle habitude
|
||||
---
|
||||
[habit_new_title]
|
||||
Nouvelle habitude
|
||||
---
|
||||
[habit_edit_title]
|
||||
Modifier l'habitude
|
||||
---
|
||||
[habit_name_label]
|
||||
Nom
|
||||
---
|
||||
[habit_underline_label]
|
||||
Soulignement
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Liste des pratiques
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Associez cette habitude aux séances de pratique. Les jours avec des séances correspondantes apparaîtront comme terminés et pourront ouvrir l'éditeur de séance.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Comptage
|
||||
---
|
||||
[habit_counting_info]
|
||||
Les comptages multiples permettent d'enregistrer plus d'un compte dans une journée. Laissez désactivé pour un suivi simple fait ou non fait.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Comptages multiples
|
||||
---
|
||||
[habit_delete_title]
|
||||
Supprimer l'habitude ?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Supprimer cette habitude ? Cette action est irréversible.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Supprimer l'habitude
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Ajouter une nouvelle habitude
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Charger plus
|
||||
---
|
||||
[habit_empty_title]
|
||||
Aucune habitude créée
|
||||
---
|
||||
[habit_create_button]
|
||||
Créer une habitude
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
Aucune série la semaine dernière
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Série actuelle
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
30 derniers jours
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Séries de rétention Wim Hof
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Rythme par jour
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Temps de pratique
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Meilleure rétention
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Rétention totale
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Meilleure série
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Personnaliser la navigation du bas
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Navigation du bas
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Ajouter un élément
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Élément 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Élément 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Élément 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Élément 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Élément 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Élément 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Élément 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Élément 8
|
||||
---
|
||||
[reset_button]
|
||||
Réinitialiser
|
||||
---
|
||||
@@ -20,11 +20,14 @@ Selesai
|
||||
Tandai
|
||||
---
|
||||
[tab_manual]
|
||||
Tutorial
|
||||
Manual
|
||||
---
|
||||
[tab_settings]
|
||||
Pengaturan
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistik
|
||||
---
|
||||
[play_button]
|
||||
MULAI
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Meditasi
|
||||
[meditation_manual_title]
|
||||
Meditasi
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Latihan meditasi sederhana untuk napas, tenang, dan sadar.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Pilih musik jika membantu sesi terasa stabil, lalu duduk dengan nyaman. Biarkan perhatian beristirahat pada napas. Saat pikiran menarikmu pergi, sadari dengan jelas dan kembali tanpa memaksa. Gong menandai awal dan akhir.
|
||||
Pilih musik jika Anda mau. Gong menandai awal dan akhir.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Musik meditasi
|
||||
@@ -77,13 +83,13 @@ Jaringan tidak tersedia
|
||||
Tidak dapat menjangkau server audio meditasi. Periksa izin jaringan Android dan koneksi internetmu, lalu coba lagi.
|
||||
---
|
||||
[duration_5m]
|
||||
5m
|
||||
5 mnt
|
||||
---
|
||||
[duration_15m]
|
||||
15m
|
||||
15 mnt
|
||||
---
|
||||
[duration_30m]
|
||||
30m
|
||||
30 mnt
|
||||
---
|
||||
[duration_1h]
|
||||
1j
|
||||
@@ -213,13 +219,13 @@ Kecepatan awal
|
||||
Ubah kecepatan awal
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
Animasi napas
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
Lurus
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
Masuk / keluar
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Kecepatan awal
|
||||
@@ -251,6 +257,9 @@ Lingkaran
|
||||
[volume_label]
|
||||
Volume
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Tampilkan kontrol volume di sesi
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Reset ke default
|
||||
---
|
||||
@@ -303,6 +312,9 @@ Impor Data
|
||||
[import_failed]
|
||||
Impor gagal
|
||||
---
|
||||
[imported_data]
|
||||
Data diimpor
|
||||
---
|
||||
[imported_sessions]
|
||||
Mengimpor %d sesi
|
||||
---
|
||||
@@ -312,26 +324,38 @@ File ekspor tidak valid
|
||||
[import_cancelled]
|
||||
Impor dibatalkan
|
||||
---
|
||||
[import_choice_title]
|
||||
Impor pengaturan?
|
||||
---
|
||||
[import_choice_message]
|
||||
Data dan pengaturan ditemukan.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Data
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Data+Pengaturan
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
Ekspor dibatalkan
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
Tidak ada data untuk diekspor
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
Tidak ada data untuk dihapus
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
Hapus semua data?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
Ini akan menghapus semua sesi tersimpan secara permanen.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
Penghapusan dibatalkan
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
%lld sesi dihapus
|
||||
---
|
||||
[toggle_off]
|
||||
MATI
|
||||
@@ -379,21 +403,20 @@ Jangan gunakan saat mengemudi,
|
||||
berdiri, atau di dalam air.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Ikuti 4 langkah sederhana:
|
||||
Ikuti 3 langkah:
|
||||
|
||||
1. Bernapas secara ritmis.
|
||||
2. Buang napas dan tahan.
|
||||
3. Tarik napas dalam dan tahan.
|
||||
4. Buang napas dan ulangi.
|
||||
1. Tarik dan hembuskan napas 30 kali.
|
||||
2. Hembuskan dan tahan.
|
||||
3. Saat ingin bernapas, tarik napas dan tahan selama 15 detik.
|
||||
|
||||
Gunakan ikon kunci pas %i untuk menyesuaikan ronde, nafas, kecepatan, dan jeda.
|
||||
Hembuskan, lalu ulangi prosesnya.
|
||||
|
||||
Gunakan ikon kunci pas %i untuk mengatur ronde, napas, kecepatan, dan jeda.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Isi paru-paru Anda sepenuhnya, lalu biarkan napas keluar.
|
||||
Tarik dan hembuskan napas 30 kali.
|
||||
|
||||
Gunakan slider ini untuk mengatur kecepatan lingkaran pernapasan.
|
||||
|
||||
Temukan ritme yang terasa alami bagi Anda.
|
||||
Temukan ritme yang terasa alami: stabil dan cepat, tetapi tetap bernapas penuh.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Kecepatan progresif membuat ronde pertama lebih mudah dimulai.
|
||||
@@ -401,17 +424,14 @@ Kecepatan progresif membuat ronde pertama lebih mudah dimulai.
|
||||
Saat aktif, ronde pertama dimulai pada kecepatan 1 untuk 5 nafas pertama, lalu bertambah hingga kecepatan yang dipilih.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Setelah ronde pernapasan,
|
||||
buang napas secara normal dan tahan.
|
||||
Setelah 30 napas, hembuskan dan tahan selama mungkin.
|
||||
|
||||
Lepaskan saat tubuh Anda
|
||||
meminta udara. Jangan dipaksa.
|
||||
Saat ingin bernapas, tekan tombol NAPAS.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Tarik napas sepenuhnya dan tahan sekitar 15 detik.
|
||||
Tarik napas penuh dan tahan selama 15 detik.
|
||||
|
||||
Lalu buang napas dan mulai ronde berikutnya.
|
||||
Seiring waktu, setiap ronde mungkin terasa lebih dalam.
|
||||
Hembuskan, lalu ronde berikutnya akan mulai.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
LEWATI
|
||||
@@ -455,3 +475,291 @@ Hapus ronde ini? Tidak dapat dibatalkan.
|
||||
[delete_button]
|
||||
Hapus
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musik oleh Elijah_K.
|
||||
---
|
||||
[theme_system]
|
||||
Sistem
|
||||
---
|
||||
[theme_sky]
|
||||
Langit
|
||||
---
|
||||
[theme_ocean]
|
||||
Samudra
|
||||
---
|
||||
[theme_forest]
|
||||
Hutan
|
||||
---
|
||||
[theme_sunset]
|
||||
Senja
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavender
|
||||
---
|
||||
[theme_cherry]
|
||||
Ceri
|
||||
---
|
||||
[theme_dawn]
|
||||
Fajar
|
||||
---
|
||||
[theme_sage]
|
||||
Sage
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Mint
|
||||
---
|
||||
[theme_cobalt]
|
||||
Kobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientasi
|
||||
---
|
||||
[orientation_system]
|
||||
Sistem
|
||||
---
|
||||
[orientation_portrait]
|
||||
Potret
|
||||
---
|
||||
[orientation_landscape]
|
||||
Lanskap
|
||||
---
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Kembali
|
||||
---
|
||||
[close_button]
|
||||
Tutup
|
||||
---
|
||||
[sync_account_title]
|
||||
Akun
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Konfigurasi akun
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Buat akun
|
||||
---
|
||||
[sync_account_created]
|
||||
Akun dibuat
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Tidak dapat membuat akun
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Impor file .key
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Impor kunci akun
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Kunci akun diimpor
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Tidak dapat mengimpor kunci akun
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Impor kunci akun dibatalkan
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs tidak dibangun untuk target ini.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID publik
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Salin ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
ID publik disalin
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Cadangkan kunci
|
||||
---
|
||||
[sync_remote_label]
|
||||
Jarak jauh
|
||||
---
|
||||
[sync_connect_button]
|
||||
Hubungkan
|
||||
---
|
||||
[sync_connected_button]
|
||||
Terhubung
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Gunakan https:// atau loopback seperti localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Server sinkronisasi disimpan
|
||||
---
|
||||
[sync_connected]
|
||||
Sinkronisasi remote selesai
|
||||
---
|
||||
[sync_failed]
|
||||
Sinkronisasi remote gagal
|
||||
---
|
||||
[sync_unavailable]
|
||||
Sinkronisasi remote tidak tersedia di platform ini
|
||||
---
|
||||
[sync_no_account]
|
||||
Buat akun sebelum menghubungkan
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Remote menolak akun ini
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Simpan kunci pribadi ini di tempat yang Anda kendalikan. Siapa pun yang memilikinya dapat mengambil akun ini.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Cadangkan kunci akun
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Simpan file .key
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Simpan kunci akun
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Cadangan kunci akun disimpan
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Tidak dapat menyimpan cadangan kunci akun
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Cadangan kunci akun dibatalkan
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Hapus akun
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Hapus akun?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Hapus akun ini dari server remote dan perangkat ini? Tindakan ini tidak dapat dibatalkan.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Akun dihapus
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Penghapusan akun dibatalkan
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Kebiasaan baru
|
||||
---
|
||||
[habit_new_title]
|
||||
Kebiasaan baru
|
||||
---
|
||||
[habit_edit_title]
|
||||
Edit kebiasaan
|
||||
---
|
||||
[habit_name_label]
|
||||
Nama
|
||||
---
|
||||
[habit_underline_label]
|
||||
Garis bawah
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Daftar latihan
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Hubungkan kebiasaan ini ke sesi latihan. Hari dengan sesi yang cocok akan tampil selesai dan dapat membuka editor sesi.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Penghitungan
|
||||
---
|
||||
[habit_counting_info]
|
||||
Beberapa hitungan memungkinkan satu hari menyimpan lebih dari satu hitungan. Matikan untuk pelacakan sederhana selesai atau belum.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Beberapa hitungan
|
||||
---
|
||||
[habit_delete_title]
|
||||
Hapus kebiasaan?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Hapus kebiasaan ini? Tindakan ini tidak dapat dibatalkan.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Hapus kebiasaan
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Tambah kebiasaan baru
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Muat lagi
|
||||
---
|
||||
[habit_empty_title]
|
||||
Belum ada kebiasaan
|
||||
---
|
||||
[habit_create_button]
|
||||
Buat kebiasaan
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
Tidak ada ronde minggu lalu
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Rangkaian saat ini
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
30 hari terakhir
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Ronde tahan napas Wim Hof
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Pola hari
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Waktu latihan
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Tahan terbaik
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Total tahan
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Rangkaian terbaik
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Sesuaikan navigasi bawah
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Navigasi bawah
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Tambah item
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Item 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Item 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Item 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Item 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Item 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Item 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Item 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Item 8
|
||||
---
|
||||
[reset_button]
|
||||
Reset
|
||||
---
|
||||
@@ -6,6 +6,7 @@ fr|Français
|
||||
id|Bahasa Indonesia
|
||||
it|Italiano
|
||||
pt|Português
|
||||
ru|Русский
|
||||
ja|日本語
|
||||
ko|한국어
|
||||
zh|中文
|
||||
@@ -20,11 +20,14 @@ Fatto
|
||||
Segna Come Fatto
|
||||
---
|
||||
[tab_manual]
|
||||
Tutorial
|
||||
Manuale
|
||||
---
|
||||
[tab_settings]
|
||||
Impostazioni
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiche
|
||||
---
|
||||
[play_button]
|
||||
AVVIA
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Meditazione
|
||||
[meditation_manual_title]
|
||||
Meditazione
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Una pratica di meditazione semplice per respiro, calma e presenza.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Scegli la musica se aiuta la sessione a sentirsi stabile, poi siediti comodamente. Lascia che l'attenzione riposi sul respiro. Quando i pensieri ti portano via, notalo con chiarezza e torna senza forzare. Un gong segna l'inizio e la fine.
|
||||
Scegli la musica se vuoi. Un gong segna l inizio e la fine.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Musica Meditazione
|
||||
@@ -65,7 +71,7 @@ Scarica audio
|
||||
Riscarica audio
|
||||
---
|
||||
[meditation_music_test_button]
|
||||
Test audio
|
||||
Prova musica
|
||||
---
|
||||
[meditation_music_stop_test_button]
|
||||
Ferma test
|
||||
@@ -98,7 +104,7 @@ RESPIRO
|
||||
RISULTATI
|
||||
---
|
||||
[home_button]
|
||||
HOME
|
||||
Home
|
||||
---
|
||||
[exit_session_title]
|
||||
Esci dalla Sessione?
|
||||
@@ -146,13 +152,13 @@ migliore %ds
|
||||
media %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Round %d %ds
|
||||
Round
|
||||
---
|
||||
[starting_in]
|
||||
INIZIA IN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
ROUND %d
|
||||
Round
|
||||
---
|
||||
[settings_title]
|
||||
Impostazioni
|
||||
@@ -202,6 +208,42 @@ Modalità tema
|
||||
[theme_system]
|
||||
Sistema
|
||||
---
|
||||
[theme_sky]
|
||||
Cielo
|
||||
---
|
||||
[theme_ocean]
|
||||
Oceano
|
||||
---
|
||||
[theme_forest]
|
||||
Foresta
|
||||
---
|
||||
[theme_sunset]
|
||||
Tramonto
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavanda
|
||||
---
|
||||
[theme_cherry]
|
||||
Ciliegia
|
||||
---
|
||||
[theme_dawn]
|
||||
Alba
|
||||
---
|
||||
[theme_sage]
|
||||
Salvia
|
||||
---
|
||||
[theme_sepia]
|
||||
Seppia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalto
|
||||
---
|
||||
[orientation_label]
|
||||
Orientamento
|
||||
---
|
||||
@@ -230,13 +272,13 @@ Velocità iniziale
|
||||
Modifica velocità iniziale
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
Animazione del respiro
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
Lineare
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
Dentro / fuori
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Velocità iniziale
|
||||
@@ -268,6 +310,9 @@ Cerchio
|
||||
[volume_label]
|
||||
Volume
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Mostra il controllo volume nelle sessioni
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Ripristina predefiniti
|
||||
---
|
||||
@@ -319,6 +364,9 @@ Importa Dati
|
||||
[import_failed]
|
||||
Importazione fallita
|
||||
---
|
||||
[imported_data]
|
||||
Dati importati
|
||||
---
|
||||
[imported_sessions]
|
||||
Importate %d sessioni
|
||||
---
|
||||
@@ -328,6 +376,18 @@ File di esportazione non valido
|
||||
[import_cancelled]
|
||||
Importazione annullata
|
||||
---
|
||||
[import_choice_title]
|
||||
Importare impostazioni?
|
||||
---
|
||||
[import_choice_message]
|
||||
Dati e impostazioni trovati.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Dati
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Dati+Impostazioni
|
||||
---
|
||||
[export_cancelled]
|
||||
Esportazione annullata
|
||||
---
|
||||
@@ -350,10 +410,10 @@ Eliminazione annullata
|
||||
Eliminate %lld sessioni
|
||||
---
|
||||
[toggle_off]
|
||||
OFF
|
||||
SPENTO
|
||||
---
|
||||
[toggle_on]
|
||||
ON
|
||||
ACCESO
|
||||
---
|
||||
[theme_light]
|
||||
Chiaro
|
||||
@@ -395,21 +455,20 @@ Non usarla mai mentre guidi,
|
||||
in piedi o in acqua.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Segui semplicemente 4 passi:
|
||||
Segui 3 passaggi:
|
||||
|
||||
1. Respira ritmicamente.
|
||||
1. Inspira ed espira 30 volte.
|
||||
2. Espira e trattieni.
|
||||
3. Inspira profondamente e trattieni.
|
||||
4. Espira e ripeti.
|
||||
3. Quando senti il bisogno di respirare, inspira e trattieni per 15 secondi.
|
||||
|
||||
Usa l'icona ingranaggio %i per regolare round, respiri, velocità e pause.
|
||||
Espira, poi ripeti il processo.
|
||||
|
||||
Usa l’icona chiave inglese %i per regolare round, respiri, velocità e pause.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Riempi completamente i polmoni, poi lascia uscire il respiro.
|
||||
Inspira ed espira 30 volte.
|
||||
|
||||
Usa questo slider per impostare il ritmo del cerchio respiratorio.
|
||||
|
||||
Trova un ritmo che ti sembri naturale.
|
||||
Trova un ritmo naturale: stabile e rapido, continuando a respirare a fondo.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
La velocità progressiva rende il primo round più facile da affrontare.
|
||||
@@ -417,17 +476,14 @@ La velocità progressiva rende il primo round più facile da affrontare.
|
||||
Quando è attiva, il primo round inizia più lentamente, poi aumenta gradualmente fino alla velocità selezionata.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Espira normalmente e trattieni.
|
||||
Dopo 30 respiri, espira e trattieni il più a lungo possibile.
|
||||
|
||||
Il numero centrale continua a contare. La modalità cerchio aggiunge linee di progresso sovrapposte.
|
||||
|
||||
Rilascia quando il corpo richiede aria.
|
||||
Quando senti il bisogno di respirare, premi il pulsante RESPIRA.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Inspira completamente e trattieni per circa 15 secondi.
|
||||
Inspira completamente e trattieni per 15 secondi.
|
||||
|
||||
Poi espira e inizia il prossimo round.
|
||||
Col tempo, ogni round potrebbe sembrare più profondo.
|
||||
Espira e inizierà il round successivo.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
SALTA
|
||||
@@ -471,3 +527,237 @@ Eliminare questo round? Questa azione non può essere annullata.
|
||||
[delete_button]
|
||||
Elimina
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musica di Elijah_K.
|
||||
---
|
||||
[back_button]
|
||||
Indietro
|
||||
---
|
||||
[close_button]
|
||||
Chiudi
|
||||
---
|
||||
[sync_account_title]
|
||||
Profilo
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Configura account
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Crea account
|
||||
---
|
||||
[sync_account_created]
|
||||
Account creato
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Impossibile creare l’account
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Importa file .key
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Importa chiave account
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Chiave account importata
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Impossibile importare la chiave account
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Importazione chiave account annullata
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs non è compilato per questo target.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID pubblico
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Copia ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
ID pubblico copiato
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Backup chiave
|
||||
---
|
||||
[sync_remote_label]
|
||||
Remoto
|
||||
---
|
||||
[sync_connect_button]
|
||||
Connetti
|
||||
---
|
||||
[sync_connected_button]
|
||||
Connesso
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Usa https:// o loopback come localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Server di sincronizzazione salvato
|
||||
---
|
||||
[sync_connected]
|
||||
Sincronizzazione remota completata
|
||||
---
|
||||
[sync_failed]
|
||||
Sincronizzazione remota fallita
|
||||
---
|
||||
[sync_unavailable]
|
||||
La sincronizzazione remota non è disponibile su questa piattaforma
|
||||
---
|
||||
[sync_no_account]
|
||||
Crea un account prima di connetterti
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Il remoto ha rifiutato questo account
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Salva questa chiave privata in un luogo che controlli. Chiunque la possieda può rivendicare questo account.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Backup chiave account
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Salva file .key
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Salva chiave account
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Backup chiave account salvato
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Impossibile salvare il backup della chiave account
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Backup chiave account annullato
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Elimina account
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Eliminare account?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Eliminare questo account dal server remoto e da questo dispositivo? L’azione non può essere annullata.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Account eliminato
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Eliminazione account annullata
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nuova abitudine
|
||||
---
|
||||
[habit_new_title]
|
||||
Nuova abitudine
|
||||
---
|
||||
[habit_edit_title]
|
||||
Modifica abitudine
|
||||
---
|
||||
[habit_name_label]
|
||||
Nome
|
||||
---
|
||||
[habit_underline_label]
|
||||
Sottolineatura
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Elenco pratiche
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Collega questa abitudine alle sessioni di pratica. I giorni con sessioni corrispondenti verranno mostrati come completati e potranno aprire l'editor della sessione.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Conteggio
|
||||
---
|
||||
[habit_counting_info]
|
||||
Conteggi multipli permette di salvare più di un conteggio nello stesso giorno. Lascialo spento per un tracciamento semplice fatto o non fatto.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Conteggi multipli
|
||||
---
|
||||
[habit_delete_title]
|
||||
Eliminare abitudine?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Eliminare questa abitudine? L'azione non può essere annullata.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Elimina abitudine
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Aggiungi nuova abitudine
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Carica altro
|
||||
---
|
||||
[habit_empty_title]
|
||||
Nessuna abitudine creata
|
||||
---
|
||||
[habit_create_button]
|
||||
Crea abitudine
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
Nessun round nell'ultima settimana
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Serie attuale
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
Ultimi 30 giorni
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Round di apnea Wim Hof
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Schema settimanale
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Tempo di pratica
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Migliore apnea
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Apnea totale
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Migliore serie
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Personalizza navigazione inferiore
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Navigazione inferiore
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Aggiungi elemento
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Elemento 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Elemento 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Elemento 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Elemento 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Elemento 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Elemento 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Elemento 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Elemento 8
|
||||
---
|
||||
[reset_button]
|
||||
Ripristina
|
||||
---
|
||||
@@ -25,6 +25,9 @@
|
||||
[tab_settings]
|
||||
設定
|
||||
---
|
||||
[tab_statistics]
|
||||
統計
|
||||
---
|
||||
[play_button]
|
||||
開始
|
||||
---
|
||||
@@ -40,8 +43,11 @@
|
||||
[meditation_manual_title]
|
||||
瞑想
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
呼吸、落ち着き、気づきのためのシンプルな瞑想練習です。
|
||||
---
|
||||
[meditation_manual_text]
|
||||
音楽が集中を支えてくれるなら選び、楽な姿勢で座ります。注意を呼吸に置きます。思考に引かれたら、はっきり気づき、力まず戻ります。ゴングが始まりと終わりを知らせます。
|
||||
必要なら音楽を選んでください。ゴングが始まりと終わりを知らせます。
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
瞑想音楽
|
||||
@@ -213,13 +219,13 @@ OK
|
||||
開始速度を変更
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
呼吸アニメーション
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
リニア
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
吸う / 吐く
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
開始速度
|
||||
@@ -251,6 +257,9 @@ In / Out
|
||||
[volume_label]
|
||||
音量
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
セッション中に音量コントロールを表示
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
デフォルトに戻す
|
||||
---
|
||||
@@ -303,6 +312,9 @@ In / Out
|
||||
[import_failed]
|
||||
インポートに失敗しました
|
||||
---
|
||||
[imported_data]
|
||||
データをインポートしました
|
||||
---
|
||||
[imported_sessions]
|
||||
%dセッションをインポートしました
|
||||
---
|
||||
@@ -310,34 +322,46 @@ In / Out
|
||||
無効なエクスポートファイル
|
||||
---
|
||||
[import_cancelled]
|
||||
Import cancelled
|
||||
インポートをキャンセルしました
|
||||
---
|
||||
[import_choice_title]
|
||||
設定もインポートしますか?
|
||||
---
|
||||
[import_choice_message]
|
||||
データと設定があります。
|
||||
---
|
||||
[import_data_only_button]
|
||||
データ
|
||||
---
|
||||
[import_data_settings_button]
|
||||
データ+設定
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
エクスポートをキャンセルしました
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
エクスポートするデータがありません
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
削除するデータがありません
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
すべてのデータを削除しますか?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
保存済みのすべてのセッションが完全に削除されます。
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
削除をキャンセルしました
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
%lld 件のセッションを削除しました
|
||||
---
|
||||
[toggle_off]
|
||||
OFF
|
||||
オフ
|
||||
---
|
||||
[toggle_on]
|
||||
ON
|
||||
オン
|
||||
---
|
||||
[theme_light]
|
||||
ライト
|
||||
@@ -381,31 +405,33 @@ ON
|
||||
立っているとき、水中では行わないでください。
|
||||
---
|
||||
[tutorial_step_method]
|
||||
次の 4 つの手順に従います。
|
||||
3つの手順に従ってください:
|
||||
|
||||
1. リズミカルに呼吸します。
|
||||
2. 吐いて止めます。
|
||||
3. 深く吸って止めます。
|
||||
4. 吐いて繰り返します。
|
||||
1. 30回、吸って吐きます。
|
||||
2. 息を吐いて止めます。
|
||||
3. 息を吸いたくなったら、吸って15秒止めます。
|
||||
|
||||
歯車アイコン %i でラウンド数、呼吸数、速度、一時停止を調整できます。
|
||||
吐いてから、この流れを繰り返します。
|
||||
|
||||
レンチアイコン %i でラウンド、呼吸数、速度、一時停止を調整できます。
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
肺をいっぱいに満たしてから、息を自然に吐き出します。
|
||||
30回、吸って吐きます。
|
||||
|
||||
このスライダーで呼吸のテンポを設定します。
|
||||
自然に感じるリズムを見つけてください。安定して速く、ただししっかり呼吸します。
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
段階的速度は、最初のラウンドに入りやすくします。
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
呼吸ラウンドの後、
|
||||
息を吐いて止めます。
|
||||
30回呼吸したら、吐いて、できるだけ長く息を止めます。
|
||||
|
||||
吸う必要を感じるまで止めます。
|
||||
息を吸いたくなったら、呼吸ボタンを押します。
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
深く吸って、約 15 秒止めます。
|
||||
しっかり吸って15秒止めます。
|
||||
|
||||
吐くと次のラウンドが始まります。
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
スキップ
|
||||
@@ -448,3 +474,292 @@ Inner Breeze データ書き出し
|
||||
---
|
||||
[delete_button]
|
||||
削除
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
音楽: Elijah_K.
|
||||
---
|
||||
[theme_system]
|
||||
システム
|
||||
---
|
||||
[theme_sky]
|
||||
空
|
||||
---
|
||||
[theme_ocean]
|
||||
海
|
||||
---
|
||||
[theme_forest]
|
||||
森
|
||||
---
|
||||
[theme_sunset]
|
||||
夕焼け
|
||||
---
|
||||
[theme_lavender]
|
||||
ラベンダー
|
||||
---
|
||||
[theme_cherry]
|
||||
チェリー
|
||||
---
|
||||
[theme_dawn]
|
||||
夜明け
|
||||
---
|
||||
[theme_sage]
|
||||
セージ
|
||||
---
|
||||
[theme_sepia]
|
||||
セピア
|
||||
---
|
||||
[theme_mono]
|
||||
モノ
|
||||
---
|
||||
[theme_mint]
|
||||
ミント
|
||||
---
|
||||
[theme_cobalt]
|
||||
コバルト
|
||||
---
|
||||
[orientation_label]
|
||||
向き
|
||||
---
|
||||
[orientation_system]
|
||||
システム
|
||||
---
|
||||
[orientation_portrait]
|
||||
縦向き
|
||||
---
|
||||
[orientation_landscape]
|
||||
横向き
|
||||
---
|
||||
[orientation_sensor]
|
||||
センサー
|
||||
---
|
||||
[back_button]
|
||||
戻る
|
||||
---
|
||||
[close_button]
|
||||
閉じる
|
||||
---
|
||||
[sync_account_title]
|
||||
アカウント
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
アカウントを設定
|
||||
---
|
||||
[sync_create_account_button]
|
||||
アカウントを作成
|
||||
---
|
||||
[sync_account_created]
|
||||
アカウントを作成しました
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
アカウントを作成できませんでした
|
||||
---
|
||||
[sync_import_key_button]
|
||||
.keyファイルをインポート
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
アカウントキーをインポート
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
アカウントキーをインポートしました
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
アカウントキーをインポートできませんでした
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
アカウントキーのインポートをキャンセルしました
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs はこの対象向けにビルドされていません。
|
||||
---
|
||||
[sync_public_id_label]
|
||||
公開ID
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
IDをコピー
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
公開IDをコピーしました
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
キーをバックアップ
|
||||
---
|
||||
[sync_remote_label]
|
||||
リモート
|
||||
---
|
||||
[sync_connect_button]
|
||||
接続
|
||||
---
|
||||
[sync_connected_button]
|
||||
接続済み
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
https:// または localhost:8080 のようなループバックを使用してください
|
||||
---
|
||||
[sync_server_saved]
|
||||
同期サーバーを保存しました
|
||||
---
|
||||
[sync_connected]
|
||||
リモート同期が完了しました
|
||||
---
|
||||
[sync_failed]
|
||||
リモート同期に失敗しました
|
||||
---
|
||||
[sync_unavailable]
|
||||
このプラットフォームではリモート同期を利用できません
|
||||
---
|
||||
[sync_no_account]
|
||||
接続する前にアカウントを作成してください
|
||||
---
|
||||
[sync_auth_failed]
|
||||
リモートがこのアカウントを拒否しました
|
||||
---
|
||||
[sync_backup_warning]
|
||||
この秘密キーは自分で管理できる場所に保存してください。これを持つ人は誰でもこのアカウントを取得できます。
|
||||
---
|
||||
[sync_backup_title]
|
||||
アカウントキーをバックアップ
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
.keyファイルを保存
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
アカウントキーを保存
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
アカウントキーのバックアップを保存しました
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
アカウントキーのバックアップを保存できませんでした
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
アカウントキーのバックアップをキャンセルしました
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
アカウントを削除
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
アカウントを削除しますか?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
このアカウントをリモートサーバーとこのデバイスから削除しますか?この操作は元に戻せません。
|
||||
---
|
||||
[sync_account_deleted]
|
||||
アカウントを削除しました
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
アカウント削除をキャンセルしました
|
||||
---
|
||||
[habit_new_default_name]
|
||||
新しい習慣
|
||||
---
|
||||
[habit_new_title]
|
||||
新しい習慣
|
||||
---
|
||||
[habit_edit_title]
|
||||
習慣を編集
|
||||
---
|
||||
[habit_name_label]
|
||||
名前
|
||||
---
|
||||
[habit_underline_label]
|
||||
下線
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
練習リスト
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
この習慣を練習セッションに関連付けます。一致するセッションがある日は完了として表示され、セッション編集画面を開けます。
|
||||
---
|
||||
[habit_counting_title]
|
||||
カウント
|
||||
---
|
||||
[habit_counting_info]
|
||||
複数カウントを使うと、1日に複数回分を記録できます。単純に完了か未完了だけを追跡する場合はオフのままにしてください。
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
複数カウント
|
||||
---
|
||||
[habit_delete_title]
|
||||
習慣を削除しますか?
|
||||
---
|
||||
[habit_delete_message]
|
||||
この習慣を削除しますか?この操作は元に戻せません。
|
||||
---
|
||||
[habit_delete_button]
|
||||
習慣を削除
|
||||
---
|
||||
[habit_add_new_option]
|
||||
新しい習慣を追加
|
||||
---
|
||||
[habit_load_more_button]
|
||||
さらに読み込む
|
||||
---
|
||||
[habit_empty_title]
|
||||
習慣がありません
|
||||
---
|
||||
[habit_create_button]
|
||||
習慣を作成
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
過去1週間にラウンドはありません
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
現在の連続記録
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
過去30日
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
ヴィム・ホフ息止めラウンド
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
曜日の傾向
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
練習時間
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
最長息止め
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
合計息止め
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
最長連続記録
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
下部ナビゲーションをカスタマイズ
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
下部ナビゲーション
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
項目を追加
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
項目1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
項目2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
項目3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
項目4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
項目5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
項目6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
項目7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
項目8
|
||||
---
|
||||
[reset_button]
|
||||
リセット
|
||||
---
|
||||
@@ -25,6 +25,9 @@ Inner Breeze
|
||||
[tab_settings]
|
||||
설정
|
||||
---
|
||||
[tab_statistics]
|
||||
통계
|
||||
---
|
||||
[play_button]
|
||||
시작
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Inner Breeze
|
||||
[meditation_manual_title]
|
||||
명상
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
호흡, 안정, 알아차림을 위한 간단한 명상 연습입니다.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
음악이 세션을 안정되게 해 준다면 선택한 뒤 편안하게 앉으세요. 주의를 호흡에 둡니다. 생각에 끌려가면 분명히 알아차리고 힘주지 말고 돌아오세요. 공 소리가 시작과 끝을 알립니다.
|
||||
원하면 음악을 선택하세요. 징 소리가 시작과 끝을 알립니다.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
명상 음악
|
||||
@@ -202,6 +208,42 @@ Inner Breeze
|
||||
[theme_system]
|
||||
시스템
|
||||
---
|
||||
[theme_sky]
|
||||
하늘
|
||||
---
|
||||
[theme_ocean]
|
||||
바다
|
||||
---
|
||||
[theme_forest]
|
||||
숲
|
||||
---
|
||||
[theme_sunset]
|
||||
일몰
|
||||
---
|
||||
[theme_lavender]
|
||||
라벤더
|
||||
---
|
||||
[theme_cherry]
|
||||
체리
|
||||
---
|
||||
[theme_dawn]
|
||||
새벽
|
||||
---
|
||||
[theme_sage]
|
||||
세이지
|
||||
---
|
||||
[theme_sepia]
|
||||
세피아
|
||||
---
|
||||
[theme_mono]
|
||||
모노
|
||||
---
|
||||
[theme_mint]
|
||||
민트
|
||||
---
|
||||
[theme_cobalt]
|
||||
코발트
|
||||
---
|
||||
[orientation_label]
|
||||
화면 방향
|
||||
---
|
||||
@@ -230,13 +272,13 @@ Inner Breeze
|
||||
시작 속도 수정
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
호흡 애니메이션
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
선형
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
들이마심 / 내쉼
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
시작 속도
|
||||
@@ -268,6 +310,9 @@ In / Out
|
||||
[volume_label]
|
||||
음량
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
세션에서 볼륨 조절 표시
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
기본값으로 재설정
|
||||
---
|
||||
@@ -319,6 +364,9 @@ In / Out
|
||||
[import_failed]
|
||||
가져오기 실패
|
||||
---
|
||||
[imported_data]
|
||||
데이터를 가져왔습니다
|
||||
---
|
||||
[imported_sessions]
|
||||
%d개 세션을 가져왔습니다
|
||||
---
|
||||
@@ -328,6 +376,18 @@ In / Out
|
||||
[import_cancelled]
|
||||
가져오기 취소됨
|
||||
---
|
||||
[import_choice_title]
|
||||
설정을 가져올까요?
|
||||
---
|
||||
[import_choice_message]
|
||||
데이터와 설정을 찾았습니다.
|
||||
---
|
||||
[import_data_only_button]
|
||||
데이터
|
||||
---
|
||||
[import_data_settings_button]
|
||||
데이터+설정
|
||||
---
|
||||
[export_cancelled]
|
||||
내보내기 취소됨
|
||||
---
|
||||
@@ -394,21 +454,20 @@ In / Out
|
||||
운전 중, 서 있거나 물속에서는 사용하지 마세요.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
다음 4단계를 따르세요:
|
||||
3단계를 따라 하세요:
|
||||
|
||||
1. 리듬적으로 호흡합니다.
|
||||
2. 내뱉고 참습니다.
|
||||
3. 깊게 들이마시고 참습니다.
|
||||
4. 내뱉고 반복합니다.
|
||||
1. 30번 들이마시고 내쉽니다.
|
||||
2. 내쉬고 멈춥니다.
|
||||
3. 숨을 쉬고 싶어지면 들이마시고 15초 동안 멈춥니다.
|
||||
|
||||
톱니바퀴 아이콘 %i을 사용하여 라운드, 호흡, 속도 및 일시정지를 조정할 수 있습니다.
|
||||
내쉰 뒤 과정을 반복합니다.
|
||||
|
||||
렌치 아이콘 %i 로 라운드, 호흡 수, 속도, 일시정지를 조정할 수 있습니다.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
폐를 완전히 채운 후 자연스럽게 내뱉으세요.
|
||||
30번 들이마시고 내쉽니다.
|
||||
|
||||
이 슬라이더로 호흡 원의 속도를 설정합니다.
|
||||
|
||||
자연스러운 리듬을 찾아보세요.
|
||||
자연스럽게 느껴지는 리듬을 찾으세요. 안정적이고 빠르되, 충분히 호흡하세요.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
점진적 속도는 첫 라운드를 쉽게 시작할 수 있게 해줍니다.
|
||||
@@ -416,17 +475,14 @@ In / Out
|
||||
켜면 첫 라운드가 느리게 시작된 후 점차 선택한 속도까지 증가합니다.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
자연스럽게 내뱉고 참습니다.
|
||||
30번 호흡한 뒤 내쉬고 가능한 한 오래 멈춥니다.
|
||||
|
||||
중앙 숫자가 계속 카운트됩니다. 원형 모드는 여러 진행 막대를 표시합니다.
|
||||
|
||||
몸이 공기를 필요로 할 때 놓으세요.
|
||||
숨을 쉬고 싶어지면 호흡 버튼을 누르세요.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
완전히 들이마시고 약 15초간 참으세요.
|
||||
깊게 들이마시고 15초 동안 멈춥니다.
|
||||
|
||||
그 후 내뱉고 다음 라운드를 시작하세요.
|
||||
시간이 지날수록 각 라운드가 더 깊어질 수 있습니다.
|
||||
내쉬면 다음 라운드가 시작됩니다.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
건너뛰기
|
||||
@@ -470,3 +526,237 @@ Inner Breeze 데이터 내보내기
|
||||
[delete_button]
|
||||
삭제
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
음악: Elijah_K.
|
||||
---
|
||||
[back_button]
|
||||
뒤로
|
||||
---
|
||||
[close_button]
|
||||
닫기
|
||||
---
|
||||
[sync_account_title]
|
||||
계정
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
계정 설정
|
||||
---
|
||||
[sync_create_account_button]
|
||||
계정 만들기
|
||||
---
|
||||
[sync_account_created]
|
||||
계정 생성됨
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
계정을 만들 수 없음
|
||||
---
|
||||
[sync_import_key_button]
|
||||
.key 파일 가져오기
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
계정 키 가져오기
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
계정 키를 가져왔습니다
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
계정 키를 가져올 수 없음
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
계정 키 가져오기가 취소됨
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs가 이 대상용으로 빌드되지 않았습니다.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
공개 ID
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
ID 복사
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
공개 ID 복사됨
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
키 백업
|
||||
---
|
||||
[sync_remote_label]
|
||||
원격
|
||||
---
|
||||
[sync_connect_button]
|
||||
연결
|
||||
---
|
||||
[sync_connected_button]
|
||||
연결됨
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
https:// 또는 localhost:8080 같은 루프백을 사용하세요
|
||||
---
|
||||
[sync_server_saved]
|
||||
동기화 서버 저장됨
|
||||
---
|
||||
[sync_connected]
|
||||
원격 동기화 완료
|
||||
---
|
||||
[sync_failed]
|
||||
원격 동기화 실패
|
||||
---
|
||||
[sync_unavailable]
|
||||
이 플랫폼에서는 원격 동기화를 사용할 수 없습니다
|
||||
---
|
||||
[sync_no_account]
|
||||
연결하기 전에 계정을 만드세요
|
||||
---
|
||||
[sync_auth_failed]
|
||||
원격에서 이 계정을 거부했습니다
|
||||
---
|
||||
[sync_backup_warning]
|
||||
이 개인 키를 직접 관리하는 곳에 저장하세요. 이 키를 가진 사람은 누구나 이 계정을 가져갈 수 있습니다.
|
||||
---
|
||||
[sync_backup_title]
|
||||
계정 키 백업
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
.key 파일 저장
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
계정 키 저장
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
계정 키 백업 저장됨
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
계정 키 백업을 저장할 수 없음
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
계정 키 백업 취소됨
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
계정 삭제
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
계정을 삭제할까요?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
원격 서버와 이 기기에서 이 계정을 삭제할까요? 이 작업은 되돌릴 수 없습니다.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
계정 삭제됨
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
계정 삭제 취소됨
|
||||
---
|
||||
[habit_new_default_name]
|
||||
새 습관
|
||||
---
|
||||
[habit_new_title]
|
||||
새 습관
|
||||
---
|
||||
[habit_edit_title]
|
||||
습관 편집
|
||||
---
|
||||
[habit_name_label]
|
||||
이름
|
||||
---
|
||||
[habit_underline_label]
|
||||
밑줄
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
연습 목록
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
이 습관을 연습 세션에 연결합니다. 일치하는 세션이 있는 날은 완료로 표시되며 세션 편집기를 열 수 있습니다.
|
||||
---
|
||||
[habit_counting_title]
|
||||
횟수
|
||||
---
|
||||
[habit_counting_info]
|
||||
여러 횟수를 켜면 하루에 둘 이상의 횟수를 저장할 수 있습니다. 단순히 완료 여부만 추적하려면 꺼 두세요.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
여러 횟수
|
||||
---
|
||||
[habit_delete_title]
|
||||
습관을 삭제할까요?
|
||||
---
|
||||
[habit_delete_message]
|
||||
이 습관을 삭제할까요? 이 작업은 되돌릴 수 없습니다.
|
||||
---
|
||||
[habit_delete_button]
|
||||
습관 삭제
|
||||
---
|
||||
[habit_add_new_option]
|
||||
새 습관 추가
|
||||
---
|
||||
[habit_load_more_button]
|
||||
더 불러오기
|
||||
---
|
||||
[habit_empty_title]
|
||||
생성된 습관 없음
|
||||
---
|
||||
[habit_create_button]
|
||||
습관 만들기
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
지난주 라운드 없음
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
현재 연속 기록
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
지난 30일
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
윔 호프 숨 참기 라운드
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
요일 패턴
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
연습 시간
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
최고 숨 참기
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
총 숨 참기
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
최고 연속 기록
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
하단 내비게이션 사용자화
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
하단 내비게이션
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
항목 추가
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
항목 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
항목 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
항목 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
항목 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
항목 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
항목 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
항목 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
항목 8
|
||||
---
|
||||
[reset_button]
|
||||
초기화
|
||||
---
|
||||
@@ -20,11 +20,14 @@ Feito
|
||||
Marcar
|
||||
---
|
||||
[tab_manual]
|
||||
Tutorial
|
||||
Manual
|
||||
---
|
||||
[tab_settings]
|
||||
Configurações
|
||||
---
|
||||
[tab_statistics]
|
||||
Estatísticas
|
||||
---
|
||||
[play_button]
|
||||
INICIAR
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Meditação
|
||||
[meditation_manual_title]
|
||||
Meditação
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Uma prática de meditação simples para respirar, acalmar e estar presente.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Escolha uma música se ela ajudar a sessão a ficar estável e sente-se confortavelmente. Deixe a atenção repousar na respiração. Quando os pensamentos puxarem você, perceba com clareza e volte sem forçar. Um gongo marca o começo e o fim.
|
||||
Escolha musica se quiser. Um gongo marca o inicio e o fim.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Música de meditação
|
||||
@@ -77,19 +83,19 @@ Rede indisponível
|
||||
Não foi possível acessar o servidor de áudio de meditação. Verifique as permissões de rede do Android e sua conexão com a internet, depois tente novamente.
|
||||
---
|
||||
[duration_5m]
|
||||
5m
|
||||
5 min
|
||||
---
|
||||
[duration_15m]
|
||||
15m
|
||||
15 min
|
||||
---
|
||||
[duration_30m]
|
||||
30m
|
||||
30 min
|
||||
---
|
||||
[duration_1h]
|
||||
1h
|
||||
1 h
|
||||
---
|
||||
[duration_2h]
|
||||
2h
|
||||
2 h
|
||||
---
|
||||
[breath_button]
|
||||
RESPIRAR
|
||||
@@ -213,13 +219,13 @@ Velocidade inicial
|
||||
Modificar velocidade inicial
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
Animação da respiração
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
Constante
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
Entrada / saída
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Velocidade inicial
|
||||
@@ -251,6 +257,9 @@ Circulo
|
||||
[volume_label]
|
||||
Volume
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Mostrar controle de volume nas sessões
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Restaurar padrões
|
||||
---
|
||||
@@ -303,6 +312,9 @@ Importar dados
|
||||
[import_failed]
|
||||
Falha ao importar
|
||||
---
|
||||
[imported_data]
|
||||
Dados importados
|
||||
---
|
||||
[imported_sessions]
|
||||
%d sessões importadas
|
||||
---
|
||||
@@ -312,32 +324,44 @@ Arquivo de exportação inválido
|
||||
[import_cancelled]
|
||||
Importação cancelada
|
||||
---
|
||||
[import_choice_title]
|
||||
Importar configurações?
|
||||
---
|
||||
[import_choice_message]
|
||||
Dados e configurações encontrados.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Dados
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Dados+Config.
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
Exportação cancelada
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
Não há dados para exportar
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
Não há dados para excluir
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
Excluir todos os dados?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
Isso excluirá permanentemente todas as sessões salvas.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
Exclusão cancelada
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
%lld sessões excluídas
|
||||
---
|
||||
[toggle_off]
|
||||
OFF
|
||||
DESLIGADO
|
||||
---
|
||||
[toggle_on]
|
||||
ON
|
||||
LIGADO
|
||||
---
|
||||
[theme_light]
|
||||
Claro
|
||||
@@ -379,21 +403,20 @@ Nunca use enquanto dirige,
|
||||
em pé ou na água.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Basta seguir 4 passos:
|
||||
Siga 3 passos:
|
||||
|
||||
1. Respire ritmicamente.
|
||||
1. Inspire e expire 30 vezes.
|
||||
2. Expire e segure.
|
||||
3. Inspire profundamente e segure.
|
||||
4. Expire e repita.
|
||||
3. Quando sentir vontade de respirar, inspire e segure por 15 segundos.
|
||||
|
||||
Use o ícone de chave inglesa %i para ajustar rodadas, respirações, velocidade e pausas.
|
||||
Expire e repita o processo.
|
||||
|
||||
Use o ícone de chave %i para ajustar rodadas, respirações, velocidade e pausas.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Encha totalmente os pulmões e deixe o ar sair.
|
||||
Inspire e expire 30 vezes.
|
||||
|
||||
Use este controle para definir o ritmo do círculo de respiração.
|
||||
|
||||
Encontre um ritmo que pareça natural para você.
|
||||
Encontre um ritmo natural: constante e rápido, mas ainda respirando profundamente.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
A velocidade progressiva torna a primeira rodada mais fácil de começar.
|
||||
@@ -401,20 +424,17 @@ A velocidade progressiva torna a primeira rodada mais fácil de começar.
|
||||
Quando ativada, a primeira rodada começa na velocidade 1 nas primeiras 5 respirações e depois aumenta gradualmente até a velocidade escolhida.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Depois da rodada de respiração,
|
||||
expire normalmente e segure.
|
||||
Depois de 30 respirações, expire e segure o máximo que puder.
|
||||
|
||||
Solte quando seu corpo pedir
|
||||
ar. Não force.
|
||||
Quando sentir vontade de respirar, pressione o botão RESPIRAR.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Inspire totalmente e segure por cerca de 15 segundos.
|
||||
Inspire completamente e segure por 15 segundos.
|
||||
|
||||
Depois expire e comece a próxima rodada.
|
||||
Com o tempo, cada rodada pode parecer mais profunda.
|
||||
Expire e a próxima rodada começará.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
SKIP
|
||||
PULAR
|
||||
---
|
||||
[tutorial_back_button]
|
||||
VOLTAR
|
||||
@@ -455,3 +475,291 @@ Excluir esta rodada? Isso não pode ser desfeito.
|
||||
[delete_button]
|
||||
Excluir
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Música por Elijah_K.
|
||||
---
|
||||
[theme_system]
|
||||
Sistema
|
||||
---
|
||||
[theme_sky]
|
||||
Céu
|
||||
---
|
||||
[theme_ocean]
|
||||
Oceano
|
||||
---
|
||||
[theme_forest]
|
||||
Floresta
|
||||
---
|
||||
[theme_sunset]
|
||||
Pôr do sol
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavanda
|
||||
---
|
||||
[theme_cherry]
|
||||
Cereja
|
||||
---
|
||||
[theme_dawn]
|
||||
Amanhecer
|
||||
---
|
||||
[theme_sage]
|
||||
Sálvia
|
||||
---
|
||||
[theme_sepia]
|
||||
Sépia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalto
|
||||
---
|
||||
[orientation_label]
|
||||
Orientação
|
||||
---
|
||||
[orientation_system]
|
||||
Sistema
|
||||
---
|
||||
[orientation_portrait]
|
||||
Retrato
|
||||
---
|
||||
[orientation_landscape]
|
||||
Paisagem
|
||||
---
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Voltar
|
||||
---
|
||||
[close_button]
|
||||
Fechar
|
||||
---
|
||||
[sync_account_title]
|
||||
Conta
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Configurar conta
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Criar conta
|
||||
---
|
||||
[sync_account_created]
|
||||
Conta criada
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Não foi possível criar a conta
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Importar arquivo .key
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Importar chave da conta
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Chave da conta importada
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Não foi possível importar a chave da conta
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Importação da chave cancelada
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs não foi compilado para este alvo.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID público
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Copiar ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
ID público copiado
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Fazer backup da chave
|
||||
---
|
||||
[sync_remote_label]
|
||||
Remoto
|
||||
---
|
||||
[sync_connect_button]
|
||||
Conectar
|
||||
---
|
||||
[sync_connected_button]
|
||||
Conectado
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Use https:// ou loopback como localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Servidor de sincronização salvo
|
||||
---
|
||||
[sync_connected]
|
||||
Sincronização remota concluída
|
||||
---
|
||||
[sync_failed]
|
||||
Falha na sincronização remota
|
||||
---
|
||||
[sync_unavailable]
|
||||
A sincronização remota não está disponível nesta plataforma
|
||||
---
|
||||
[sync_no_account]
|
||||
Crie uma conta antes de conectar
|
||||
---
|
||||
[sync_auth_failed]
|
||||
O remoto rejeitou esta conta
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Salve esta chave privada em um local que você controla. Qualquer pessoa com ela pode reivindicar esta conta.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Backup da chave da conta
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Salvar arquivo .key
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Salvar chave da conta
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Backup da chave da conta salvo
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Não foi possível salvar o backup da chave da conta
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Backup da chave da conta cancelado
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Excluir conta
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Excluir conta?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Excluir esta conta do servidor remoto e deste dispositivo? Esta ação não pode ser desfeita.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Conta excluída
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Exclusão da conta cancelada
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Novo hábito
|
||||
---
|
||||
[habit_new_title]
|
||||
Novo hábito
|
||||
---
|
||||
[habit_edit_title]
|
||||
Editar hábito
|
||||
---
|
||||
[habit_name_label]
|
||||
Nome
|
||||
---
|
||||
[habit_underline_label]
|
||||
Sublinhado
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Lista de práticas
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Vincule este hábito às sessões de prática. Dias com sessões correspondentes aparecerão como concluídos e poderão abrir o editor de sessão.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Contagem
|
||||
---
|
||||
[habit_counting_info]
|
||||
Contagens múltiplas permitem salvar mais de uma contagem em um dia. Deixe desligado para acompanhar apenas feito ou não feito.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Contagens múltiplas
|
||||
---
|
||||
[habit_delete_title]
|
||||
Excluir hábito?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Excluir este hábito? Esta ação não pode ser desfeita.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Excluir hábito
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Adicionar novo hábito
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Carregar mais
|
||||
---
|
||||
[habit_empty_title]
|
||||
Nenhum hábito criado
|
||||
---
|
||||
[habit_create_button]
|
||||
Criar hábito
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
Nenhuma rodada na última semana
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Sequência atual
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
Últimos 30 dias
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Rodadas de retenção Wim Hof
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Padrão por dia da semana
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Tempo de prática
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Melhor retenção
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Retenção total
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Melhor sequência
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Personalizar navegação inferior
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Navegação inferior
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Adicionar item
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Item 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Item 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Item 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Item 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Item 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Item 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Item 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Item 8
|
||||
---
|
||||
[reset_button]
|
||||
Redefinir
|
||||
---
|
||||
@@ -0,0 +1,766 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
История
|
||||
---
|
||||
[tab_habits]
|
||||
Привычки
|
||||
---
|
||||
[tab_practice]
|
||||
Практика
|
||||
---
|
||||
[habit_add_button]
|
||||
Добавить привычку
|
||||
---
|
||||
[habit_done_button]
|
||||
Готово
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Отметить
|
||||
---
|
||||
[tab_manual]
|
||||
Обучение
|
||||
---
|
||||
[tab_settings]
|
||||
Настройки
|
||||
---
|
||||
[tab_statistics]
|
||||
Статистика
|
||||
---
|
||||
[play_button]
|
||||
СТАРТ
|
||||
---
|
||||
[exercise_wim_hof]
|
||||
Дыхание Вима Хофа
|
||||
---
|
||||
[exercise_meditation]
|
||||
Медитация
|
||||
---
|
||||
[meditation_title]
|
||||
Медитация
|
||||
---
|
||||
[meditation_manual_title]
|
||||
Медитация
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
Сядьте спокойно и сделайте эту сессию простой: остановитесь, подышите и начните.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Включите музыку, если хотите. Гонг отмечает начало и конец.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Музыка для медитации
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Фоновая музыка
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Воспроизводить фоновую музыку
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Случайный трек
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Трек
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Скачать аудио
|
||||
---
|
||||
[meditation_music_redownload_button]
|
||||
Скачать заново
|
||||
---
|
||||
[meditation_music_test_button]
|
||||
Проверить звук
|
||||
---
|
||||
[meditation_music_stop_test_button]
|
||||
Остановить проверку
|
||||
---
|
||||
[meditation_music_network_error_title]
|
||||
Нет сети
|
||||
---
|
||||
[meditation_music_network_error_message]
|
||||
Не удалось подключиться к серверу аудио для медитации. Проверьте разрешения сети Android и подключение к интернету, затем попробуйте снова.
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Музыка: Elijah_K.
|
||||
---
|
||||
[duration_5m]
|
||||
5 мин
|
||||
---
|
||||
[duration_15m]
|
||||
15 мин
|
||||
---
|
||||
[duration_30m]
|
||||
30 мин
|
||||
---
|
||||
[duration_1h]
|
||||
1 ч
|
||||
---
|
||||
[duration_2h]
|
||||
2 ч
|
||||
---
|
||||
[breath_button]
|
||||
ДЫШАТЬ
|
||||
---
|
||||
[results_title]
|
||||
ИТОГИ
|
||||
---
|
||||
[home_button]
|
||||
ДОМОЙ
|
||||
---
|
||||
[exit_session_title]
|
||||
Выйти из сессии?
|
||||
---
|
||||
[save_completed_rounds_message]
|
||||
Сохранить завершенные раунды перед выходом?
|
||||
---
|
||||
[cancel_button]
|
||||
Отмена
|
||||
---
|
||||
[ok_button]
|
||||
OK
|
||||
---
|
||||
[save_button]
|
||||
Сохранить
|
||||
---
|
||||
[save_results_button]
|
||||
Сохранить
|
||||
---
|
||||
[discard_button]
|
||||
Сбросить
|
||||
---
|
||||
[all_progress_lost_message]
|
||||
Весь прогресс будет потерян.
|
||||
---
|
||||
[meditation_under_minute_exit_message]
|
||||
Это не будет сохранено.
|
||||
---
|
||||
[meditation_save_elapsed_message]
|
||||
Сохранить эту медитацию перед выходом?
|
||||
---
|
||||
[exit_button]
|
||||
Выйти
|
||||
---
|
||||
[round_times_title]
|
||||
Время раундов
|
||||
---
|
||||
[results_rounds]
|
||||
%d раундов
|
||||
---
|
||||
[results_best]
|
||||
лучшее %dс
|
||||
---
|
||||
[results_avg]
|
||||
среднее %dс
|
||||
---
|
||||
[round_result_label]
|
||||
Раунд %d %dс
|
||||
---
|
||||
[starting_in]
|
||||
НАЧАЛО ЧЕРЕЗ %2d
|
||||
---
|
||||
[session_round_label]
|
||||
РАУНД %d
|
||||
---
|
||||
[settings_title]
|
||||
Настройки
|
||||
---
|
||||
[practice_config_title]
|
||||
Практика
|
||||
---
|
||||
[settings_section_breathing]
|
||||
Дыхание
|
||||
---
|
||||
[settings_section_session]
|
||||
Сессия
|
||||
---
|
||||
[settings_tab_app]
|
||||
Приложение
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Тема
|
||||
---
|
||||
[settings_tab_device]
|
||||
Устройство
|
||||
---
|
||||
[settings_section_sound]
|
||||
Звук
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Внешний вид
|
||||
---
|
||||
[settings_section_language]
|
||||
Язык
|
||||
---
|
||||
[settings_tab_data]
|
||||
Данные
|
||||
---
|
||||
[settings_section_data]
|
||||
Данные
|
||||
---
|
||||
[settings_tab_about]
|
||||
О приложении
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Тема
|
||||
---
|
||||
[theme_mode_label]
|
||||
Режим темы
|
||||
---
|
||||
[theme_system]
|
||||
Системная
|
||||
---
|
||||
[theme_sky]
|
||||
Небо
|
||||
---
|
||||
[theme_ocean]
|
||||
Океан
|
||||
---
|
||||
[theme_forest]
|
||||
Лес
|
||||
---
|
||||
[theme_sunset]
|
||||
Закат
|
||||
---
|
||||
[theme_lavender]
|
||||
Лаванда
|
||||
---
|
||||
[theme_cherry]
|
||||
Вишня
|
||||
---
|
||||
[theme_dawn]
|
||||
Рассвет
|
||||
---
|
||||
[theme_sage]
|
||||
Шалфей
|
||||
---
|
||||
[theme_sepia]
|
||||
Сепия
|
||||
---
|
||||
[theme_mono]
|
||||
Моно
|
||||
---
|
||||
[theme_mint]
|
||||
Мята
|
||||
---
|
||||
[theme_cobalt]
|
||||
Кобальт
|
||||
---
|
||||
[orientation_label]
|
||||
Ориентация
|
||||
---
|
||||
[orientation_system]
|
||||
Системная
|
||||
---
|
||||
[orientation_portrait]
|
||||
Портретная
|
||||
---
|
||||
[orientation_landscape]
|
||||
Альбомная
|
||||
---
|
||||
[orientation_sensor]
|
||||
Датчик
|
||||
---
|
||||
[speed_label]
|
||||
Скорость
|
||||
---
|
||||
[progressive_speed_label]
|
||||
Постепенная скорость
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
Начальная скорость
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Изменить начальную скорость
|
||||
---
|
||||
[breath_animation_label]
|
||||
Анимация дыхания
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Линейная
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
Вдох / выдох
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Начальная скорость
|
||||
---
|
||||
[play_in_background_label]
|
||||
Воспроизводить в фоне
|
||||
---
|
||||
[max_rounds_label]
|
||||
Макс. раундов
|
||||
---
|
||||
[max_breaths_label]
|
||||
Макс. вдохов
|
||||
---
|
||||
[pause_after_round_label]
|
||||
Пауза после раунда
|
||||
---
|
||||
[advanced_session_controls_label]
|
||||
Расширенное управление сессией
|
||||
---
|
||||
[hold_display_label]
|
||||
Отображение задержки
|
||||
---
|
||||
[hold_display_stopwatch]
|
||||
Секундомер
|
||||
---
|
||||
[hold_display_circle]
|
||||
Круг
|
||||
---
|
||||
[volume_label]
|
||||
Громкость
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
Показывать регулятор громкости в сеансах
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
Сбросить настройки
|
||||
---
|
||||
[fullscreen_label]
|
||||
Полный экран
|
||||
---
|
||||
[language_label]
|
||||
Язык
|
||||
---
|
||||
[language_picker_title]
|
||||
Выберите язык
|
||||
---
|
||||
[next_button]
|
||||
Далее
|
||||
---
|
||||
[coming_soon_label]
|
||||
Скоро...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Всего сессий: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Размер данных: %s
|
||||
---
|
||||
[storage_label]
|
||||
Хранилище: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Экспорт данных
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Удалить все данные
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Экспорт данных
|
||||
---
|
||||
[export_failed]
|
||||
Экспорт не удался
|
||||
---
|
||||
[exported_label]
|
||||
Экспортировано
|
||||
---
|
||||
[import_data_button]
|
||||
Импорт данных
|
||||
---
|
||||
[import_data_dialog_title]
|
||||
Импорт данных
|
||||
---
|
||||
[import_failed]
|
||||
Импорт не удался
|
||||
---
|
||||
[imported_data]
|
||||
Данные импортированы
|
||||
---
|
||||
[imported_sessions]
|
||||
Импортировано сессий: %d
|
||||
---
|
||||
[import_invalid_file]
|
||||
Недопустимый файл экспорта
|
||||
---
|
||||
[import_cancelled]
|
||||
Импорт отменен
|
||||
---
|
||||
[import_choice_title]
|
||||
Импортировать настройки?
|
||||
---
|
||||
[import_choice_message]
|
||||
Найдены данные и настройки.
|
||||
---
|
||||
[import_data_only_button]
|
||||
Данные
|
||||
---
|
||||
[import_data_settings_button]
|
||||
Данные+настройки
|
||||
---
|
||||
[export_cancelled]
|
||||
Экспорт отменен
|
||||
---
|
||||
[no_data_to_export]
|
||||
Нет данных для экспорта
|
||||
---
|
||||
[no_data_to_delete]
|
||||
Нет данных для удаления
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Удалить все данные?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Это навсегда удалит все сохраненные сессии.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Удаление отменено
|
||||
---
|
||||
[deleted_sessions]
|
||||
Удалено сессий: %lld
|
||||
---
|
||||
[toggle_off]
|
||||
ВЫКЛ
|
||||
---
|
||||
[toggle_on]
|
||||
ВКЛ
|
||||
---
|
||||
[theme_light]
|
||||
Светлая
|
||||
---
|
||||
[theme_dark]
|
||||
Темная
|
||||
---
|
||||
[on_screen_keyboard_label]
|
||||
Экранная клавиатура
|
||||
---
|
||||
[tutorial_title]
|
||||
Обучение
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Метод
|
||||
---
|
||||
[tutorial_step1_title]
|
||||
Шаг 1: вдох и выдох
|
||||
---
|
||||
[tutorial_step2_title]
|
||||
Шаг 2: выдох и задержка
|
||||
---
|
||||
[tutorial_step3_title]
|
||||
Шаг 3: вдох и задержка
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Постепенная скорость
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Эта дыхательная практика основана на методе Вима Хофа.
|
||||
|
||||
Она может быть мощной. Выполняйте ее осторожно.
|
||||
|
||||
Практикуйте сидя или лежа.
|
||||
Никогда не выполняйте ее за рулем,
|
||||
стоя или в воде.
|
||||
---
|
||||
[tutorial_step_method]
|
||||
Просто следуйте 3 шагам:
|
||||
|
||||
1. Вдохните и выдохните 30 раз.
|
||||
2. Выдохните и задержите дыхание.
|
||||
3. Когда почувствуете желание вдохнуть, вдохните и задержите дыхание на 15 секунд.
|
||||
|
||||
Выдохните, затем повторите процесс.
|
||||
|
||||
Используйте значок ключа %i, чтобы настроить раунды, вдохи, скорость и паузы.
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
Вдохните и выдохните 30 раз.
|
||||
|
||||
Найдите ритм, который ощущается естественно: ровный и быстрый, но с полным дыханием.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Постепенная скорость помогает легче войти в первый раунд.
|
||||
|
||||
Когда она включена, первый раунд начинается медленнее, а затем постепенно ускоряется до выбранной скорости.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
После 30 вдохов выдохните и задержите дыхание так долго, как сможете.
|
||||
|
||||
Когда почувствуете желание вдохнуть, нажмите кнопку ДЫШАТЬ.
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
Вдохните полностью и задержите дыхание на 15 секунд.
|
||||
|
||||
Выдохните, и начнется следующий раунд.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
ПРОПУСТИТЬ
|
||||
---
|
||||
[tutorial_back_button]
|
||||
НАЗАД
|
||||
---
|
||||
[tutorial_next_button]
|
||||
ДАЛЕЕ
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
ГОТОВО
|
||||
---
|
||||
[tutorial_start_button]
|
||||
НАЧАТЬ
|
||||
---
|
||||
[share_sheet_title]
|
||||
Экспорт данных сессии
|
||||
---
|
||||
[export_metadata_header]
|
||||
Экспорт данных Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Версия: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Дата экспорта: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Количество сессий: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Удалить?
|
||||
---
|
||||
[delete_session_message]
|
||||
Удалить эту сессию? Это нельзя отменить.
|
||||
---
|
||||
[delete_round_message]
|
||||
Удалить этот раунд? Это нельзя отменить.
|
||||
---
|
||||
[delete_button]
|
||||
Удалить
|
||||
---
|
||||
[back_button]
|
||||
Назад
|
||||
---
|
||||
[close_button]
|
||||
Закрыть
|
||||
---
|
||||
[sync_account_title]
|
||||
Аккаунт
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
Настроить аккаунт
|
||||
---
|
||||
[sync_create_account_button]
|
||||
Создать аккаунт
|
||||
---
|
||||
[sync_account_created]
|
||||
Аккаунт создан
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
Не удалось создать аккаунт
|
||||
---
|
||||
[sync_import_key_button]
|
||||
Импорт .key файла
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
Импорт ключа аккаунта
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
Ключ аккаунта импортирован
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
Не удалось импортировать ключ аккаунта
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
Импорт ключа аккаунта отменен
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs не собран для этой платформы.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Публичный ID
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
Копировать ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
Публичный ID скопирован
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
Резервная копия ключа
|
||||
---
|
||||
[sync_remote_label]
|
||||
Сервер
|
||||
---
|
||||
[sync_connect_button]
|
||||
Подключить
|
||||
---
|
||||
[sync_connected_button]
|
||||
Подключено
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
Используйте https:// или loopback, например localhost:8080
|
||||
---
|
||||
[sync_server_saved]
|
||||
Сервер синхронизации сохранен
|
||||
---
|
||||
[sync_connected]
|
||||
Удаленная синхронизация завершена
|
||||
---
|
||||
[sync_failed]
|
||||
Удаленная синхронизация не удалась
|
||||
---
|
||||
[sync_unavailable]
|
||||
Удаленная синхронизация недоступна на этой платформе
|
||||
---
|
||||
[sync_no_account]
|
||||
Создайте аккаунт перед подключением
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Сервер отклонил этот аккаунт
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Сохраните этот приватный ключ там, где только вы им управляете. Любой, у кого он есть, сможет получить доступ к аккаунту.
|
||||
---
|
||||
[sync_backup_title]
|
||||
Резервная копия ключа аккаунта
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
Сохранить .key файл
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
Сохранить ключ аккаунта
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
Резервная копия ключа аккаунта сохранена
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
Не удалось сохранить резервную копию ключа аккаунта
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
Сохранение резервной копии ключа аккаунта отменено
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Удалить аккаунт
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Удалить аккаунт?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Удалить этот аккаунт с удаленного сервера и с этого устройства? Это нельзя отменить.
|
||||
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Аккаунт удален
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Удаление аккаунта отменено
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Новая привычка
|
||||
---
|
||||
[habit_new_title]
|
||||
Новая привычка
|
||||
---
|
||||
[habit_edit_title]
|
||||
Изменить привычку
|
||||
---
|
||||
[habit_name_label]
|
||||
Название
|
||||
---
|
||||
[habit_underline_label]
|
||||
Подчеркивание
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
Список практик
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
Свяжите эту привычку с сеансами практики. Дни с подходящими сеансами будут отмечены как выполненные и смогут открыть редактор сеанса.
|
||||
---
|
||||
[habit_counting_title]
|
||||
Подсчет
|
||||
---
|
||||
[habit_counting_info]
|
||||
Несколько счетчиков позволяют сохранить больше одного значения за день. Оставьте выключенным для простого отслеживания выполнено или не выполнено.
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
Несколько счетчиков
|
||||
---
|
||||
[habit_delete_title]
|
||||
Удалить привычку?
|
||||
---
|
||||
[habit_delete_message]
|
||||
Удалить эту привычку? Это действие нельзя отменить.
|
||||
---
|
||||
[habit_delete_button]
|
||||
Удалить привычку
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Добавить новую привычку
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Загрузить еще
|
||||
---
|
||||
[habit_empty_title]
|
||||
Привычки не созданы
|
||||
---
|
||||
[habit_create_button]
|
||||
Создать привычку
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
За последнюю неделю раундов нет
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
Текущая серия
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
Последние 30 дней
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Раунды задержки дыхания Вима Хофа
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
Шаблон по дням недели
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
Время практики
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
Лучшая задержка
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
Общая задержка
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
Лучшая серия
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
Настроить нижнюю навигацию
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
Нижняя навигация
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
Добавить пункт
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
Пункт 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
Пункт 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
Пункт 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
Пункт 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
Пункт 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
Пункт 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
Пункт 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
Пункт 8
|
||||
---
|
||||
[reset_button]
|
||||
Сбросить
|
||||
---
|
||||
@@ -25,6 +25,9 @@
|
||||
[tab_settings]
|
||||
设置
|
||||
---
|
||||
[tab_statistics]
|
||||
统计
|
||||
---
|
||||
[play_button]
|
||||
开始
|
||||
---
|
||||
@@ -40,8 +43,11 @@ Wim Hof 呼吸
|
||||
[meditation_manual_title]
|
||||
冥想
|
||||
---
|
||||
[meditation_manual_intro_text]
|
||||
一个用于呼吸、平静与觉察的简单冥想练习。
|
||||
---
|
||||
[meditation_manual_text]
|
||||
如果音乐能让练习更安稳,就先选择音乐,然后舒适地坐下。把注意力放在呼吸上。被念头带走时,清楚地觉察,再不费力地回来。钟声会提示开始和结束。
|
||||
如果需要,可以选择音乐。锣声会提示开始和结束。
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
冥想音乐
|
||||
@@ -213,13 +219,13 @@ Wim Hof 呼吸
|
||||
修改起始速度
|
||||
---
|
||||
[breath_animation_label]
|
||||
Breathing animation
|
||||
呼吸动画
|
||||
---
|
||||
[breath_animation_linear]
|
||||
Linear
|
||||
线性
|
||||
---
|
||||
[breath_animation_in_out]
|
||||
In / Out
|
||||
吸气 / 呼气
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
起始速度
|
||||
@@ -251,6 +257,9 @@ In / Out
|
||||
[volume_label]
|
||||
音量
|
||||
---
|
||||
[show_session_volume_control_label]
|
||||
在会话中显示音量控制
|
||||
---
|
||||
[reset_to_defaults_label]
|
||||
恢复默认
|
||||
---
|
||||
@@ -303,6 +312,9 @@ In / Out
|
||||
[import_failed]
|
||||
导入失败
|
||||
---
|
||||
[imported_data]
|
||||
数据已导入
|
||||
---
|
||||
[imported_sessions]
|
||||
已导入 %d 个会话
|
||||
---
|
||||
@@ -310,28 +322,40 @@ In / Out
|
||||
无效的导出文件
|
||||
---
|
||||
[import_cancelled]
|
||||
Import cancelled
|
||||
导入已取消
|
||||
---
|
||||
[import_choice_title]
|
||||
导入设置?
|
||||
---
|
||||
[import_choice_message]
|
||||
找到数据和设置。
|
||||
---
|
||||
[import_data_only_button]
|
||||
数据
|
||||
---
|
||||
[import_data_settings_button]
|
||||
数据+设置
|
||||
---
|
||||
[export_cancelled]
|
||||
Export cancelled
|
||||
导出已取消
|
||||
---
|
||||
[no_data_to_export]
|
||||
No data to export
|
||||
没有可导出的数据
|
||||
---
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
没有可删除的数据
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
删除所有数据?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
这将永久删除所有已保存的会话。
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
删除已取消
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
已删除 %lld 个会话
|
||||
---
|
||||
[toggle_off]
|
||||
关
|
||||
@@ -379,31 +403,33 @@ Deleted %lld sessions
|
||||
站立或水中时进行。
|
||||
---
|
||||
[tutorial_step_method]
|
||||
按照 4 个步骤进行:
|
||||
只需按照 3 个步骤:
|
||||
|
||||
1. 有节奏地呼吸。
|
||||
1. 吸气和呼气 30 次。
|
||||
2. 呼气并屏息。
|
||||
3. 深吸气并屏息。
|
||||
4. 呼气并重复。
|
||||
3. 当你想呼吸时,吸气并保持 15 秒。
|
||||
|
||||
使用齿轮图标 %i 调整轮次、呼吸次数、速度和暂停时间。
|
||||
呼气,然后重复这个过程。
|
||||
|
||||
使用扳手图标 %i 调整轮次、呼吸次数、速度和暂停。
|
||||
---
|
||||
[tutorial_step_breathe]
|
||||
充分充满肺部,然后让呼吸自然流出。
|
||||
吸气和呼气 30 次。
|
||||
|
||||
使用这个滑块设置呼吸圆的节奏。
|
||||
找到自然的节奏:稳定且快速,同时保持充分呼吸。
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
递进速度会让第一轮更容易进入。
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
完成一轮呼吸后,
|
||||
呼气并屏住。
|
||||
30 次呼吸后,呼气并尽可能长时间屏息。
|
||||
|
||||
屏息到需要吸气为止。
|
||||
当你想呼吸时,按下呼吸按钮。
|
||||
---
|
||||
[tutorial_step_inhale_hold]
|
||||
充分吸气并屏住约 15 秒。
|
||||
充分吸气并保持 15 秒。
|
||||
|
||||
呼气后,下一轮将开始。
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
跳过
|
||||
@@ -446,3 +472,292 @@ Inner Breeze 数据导出
|
||||
---
|
||||
[delete_button]
|
||||
删除
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
音乐来自 Elijah_K。
|
||||
---
|
||||
[theme_system]
|
||||
系统
|
||||
---
|
||||
[theme_sky]
|
||||
天空
|
||||
---
|
||||
[theme_ocean]
|
||||
海洋
|
||||
---
|
||||
[theme_forest]
|
||||
森林
|
||||
---
|
||||
[theme_sunset]
|
||||
日落
|
||||
---
|
||||
[theme_lavender]
|
||||
薰衣草
|
||||
---
|
||||
[theme_cherry]
|
||||
樱桃
|
||||
---
|
||||
[theme_dawn]
|
||||
黎明
|
||||
---
|
||||
[theme_sage]
|
||||
鼠尾草
|
||||
---
|
||||
[theme_sepia]
|
||||
棕褐
|
||||
---
|
||||
[theme_mono]
|
||||
单色
|
||||
---
|
||||
[theme_mint]
|
||||
薄荷
|
||||
---
|
||||
[theme_cobalt]
|
||||
钴蓝
|
||||
---
|
||||
[orientation_label]
|
||||
方向
|
||||
---
|
||||
[orientation_system]
|
||||
系统
|
||||
---
|
||||
[orientation_portrait]
|
||||
竖屏
|
||||
---
|
||||
[orientation_landscape]
|
||||
横屏
|
||||
---
|
||||
[orientation_sensor]
|
||||
传感器
|
||||
---
|
||||
[back_button]
|
||||
返回
|
||||
---
|
||||
[close_button]
|
||||
关闭
|
||||
---
|
||||
[sync_account_title]
|
||||
账户
|
||||
---
|
||||
[sync_configure_account_button]
|
||||
配置账户
|
||||
---
|
||||
[sync_create_account_button]
|
||||
创建账户
|
||||
---
|
||||
[sync_account_created]
|
||||
账户已创建
|
||||
---
|
||||
[sync_account_create_failed]
|
||||
无法创建账户
|
||||
---
|
||||
[sync_import_key_button]
|
||||
导入 .key 文件
|
||||
---
|
||||
[sync_import_key_dialog_title]
|
||||
导入账户密钥
|
||||
---
|
||||
[sync_private_key_imported]
|
||||
账户密钥已导入
|
||||
---
|
||||
[sync_private_key_import_failed]
|
||||
无法导入账户密钥
|
||||
---
|
||||
[sync_private_key_import_cancelled]
|
||||
账户密钥导入已取消
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs 未为此目标构建。
|
||||
---
|
||||
[sync_public_id_label]
|
||||
公开 ID
|
||||
---
|
||||
[sync_copy_id_button]
|
||||
复制 ID
|
||||
---
|
||||
[sync_public_id_copied]
|
||||
公开 ID 已复制
|
||||
---
|
||||
[sync_backup_key_button]
|
||||
备份密钥
|
||||
---
|
||||
[sync_remote_label]
|
||||
远程
|
||||
---
|
||||
[sync_connect_button]
|
||||
连接
|
||||
---
|
||||
[sync_connected_button]
|
||||
已连接
|
||||
---
|
||||
[sync_server_url_invalid]
|
||||
请使用 https:// 或 localhost:8080 这样的回环地址
|
||||
---
|
||||
[sync_server_saved]
|
||||
同步服务器已保存
|
||||
---
|
||||
[sync_connected]
|
||||
远程同步完成
|
||||
---
|
||||
[sync_failed]
|
||||
远程同步失败
|
||||
---
|
||||
[sync_unavailable]
|
||||
此平台不支持远程同步
|
||||
---
|
||||
[sync_no_account]
|
||||
连接前请先创建账户
|
||||
---
|
||||
[sync_auth_failed]
|
||||
远程服务器拒绝了此账户
|
||||
---
|
||||
[sync_backup_warning]
|
||||
请将此私钥保存到你可控制的位置。任何拥有它的人都可以认领此账户。
|
||||
---
|
||||
[sync_backup_title]
|
||||
备份账户密钥
|
||||
---
|
||||
[sync_save_key_file_button]
|
||||
保存 .key 文件
|
||||
---
|
||||
[sync_save_key_dialog_title]
|
||||
保存账户密钥
|
||||
---
|
||||
[sync_private_key_backup_saved]
|
||||
账户密钥备份已保存
|
||||
---
|
||||
[sync_private_key_backup_failed]
|
||||
无法保存账户密钥备份
|
||||
---
|
||||
[sync_private_key_backup_cancelled]
|
||||
账户密钥备份已取消
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
删除账户
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
删除账户?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
从远程服务器和此设备删除此账户?此操作无法撤销。
|
||||
---
|
||||
[sync_account_deleted]
|
||||
账户已删除
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
账户删除已取消
|
||||
---
|
||||
[habit_new_default_name]
|
||||
新习惯
|
||||
---
|
||||
[habit_new_title]
|
||||
新习惯
|
||||
---
|
||||
[habit_edit_title]
|
||||
编辑习惯
|
||||
---
|
||||
[habit_name_label]
|
||||
名称
|
||||
---
|
||||
[habit_underline_label]
|
||||
下划线
|
||||
---
|
||||
[habit_practice_list_title]
|
||||
练习列表
|
||||
---
|
||||
[habit_practice_list_info]
|
||||
将此习惯关联到练习会话。有匹配会话的日期会显示为已完成,并可打开会话编辑器。
|
||||
---
|
||||
[habit_counting_title]
|
||||
计数
|
||||
---
|
||||
[habit_counting_info]
|
||||
多次计数允许一天保存多个次数。若只需要简单记录完成或未完成,请保持关闭。
|
||||
---
|
||||
[habit_multiple_counts_label]
|
||||
多次计数
|
||||
---
|
||||
[habit_delete_title]
|
||||
删除习惯?
|
||||
---
|
||||
[habit_delete_message]
|
||||
删除此习惯?此操作无法撤销。
|
||||
---
|
||||
[habit_delete_button]
|
||||
删除习惯
|
||||
---
|
||||
[habit_add_new_option]
|
||||
添加新习惯
|
||||
---
|
||||
[habit_load_more_button]
|
||||
加载更多
|
||||
---
|
||||
[habit_empty_title]
|
||||
尚未创建习惯
|
||||
---
|
||||
[habit_create_button]
|
||||
创建习惯
|
||||
---
|
||||
[habit_stats_no_rounds_week]
|
||||
过去一周没有轮次
|
||||
---
|
||||
[habit_stats_current_streak]
|
||||
当前连续记录
|
||||
---
|
||||
[habit_stats_last_30_days]
|
||||
过去30天
|
||||
---
|
||||
[habit_stats_wim_hof_hold_rounds]
|
||||
Wim Hof 屏息轮次
|
||||
---
|
||||
[habit_stats_weekday_pattern]
|
||||
星期模式
|
||||
---
|
||||
[habit_stats_practice_time]
|
||||
练习时间
|
||||
---
|
||||
[habit_stats_best_hold]
|
||||
最佳屏息
|
||||
---
|
||||
[habit_stats_total_hold]
|
||||
屏息总时长
|
||||
---
|
||||
[habit_stats_best_streak]
|
||||
最佳连续记录
|
||||
---
|
||||
[bottom_nav_customize_button]
|
||||
自定义底部导航
|
||||
---
|
||||
[bottom_nav_customize_title]
|
||||
底部导航
|
||||
---
|
||||
[bottom_nav_add_button]
|
||||
添加项目
|
||||
---
|
||||
[bottom_nav_slot_1]
|
||||
项目 1
|
||||
---
|
||||
[bottom_nav_slot_2]
|
||||
项目 2
|
||||
---
|
||||
[bottom_nav_slot_3]
|
||||
项目 3
|
||||
---
|
||||
[bottom_nav_slot_4]
|
||||
项目 4
|
||||
---
|
||||
[bottom_nav_slot_5]
|
||||
项目 5
|
||||
---
|
||||
[bottom_nav_slot_6]
|
||||
项目 6
|
||||
---
|
||||
[bottom_nav_slot_7]
|
||||
项目 7
|
||||
---
|
||||
[bottom_nav_slot_8]
|
||||
项目 8
|
||||
---
|
||||
[reset_button]
|
||||
重置
|
||||
---
|
||||
|
After Width: | Height: | Size: 756 B |
|
After Width: | Height: | Size: 453 B |
|
After Width: | Height: | Size: 636 B |
|
After Width: | Height: | Size: 723 B |
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Inner Breeze",
|
||||
"short_name": "Inbe",
|
||||
"version": "__APP_VERSION__",
|
||||
"description": "Breathing, meditation, habit tracking, and encrypted sync.",
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
|
||||
},
|
||||
"icons": {
|
||||
"16": "icons/icon-16.png",
|
||||
"32": "icons/icon-32.png",
|
||||
"48": "icons/icon-48.png",
|
||||
"128": "icons/icon-128.png"
|
||||
},
|
||||
"action": {
|
||||
"default_title": "Open Inner Breeze",
|
||||
"default_icon": {
|
||||
"16": "icons/icon-16.png",
|
||||
"32": "icons/icon-32.png",
|
||||
"48": "icons/icon-48.png",
|
||||
"128": "icons/icon-128.png"
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"service_worker": "service_worker.js"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
const appUrl = chrome.runtime.getURL("index.html");
|
||||
|
||||
chrome.action.onClicked.addListener(() => {
|
||||
chrome.tabs.create({ url: appUrl });
|
||||
});
|
||||
|
||||
chrome.runtime.onInstalled.addListener((details) => {
|
||||
if (details.reason === "install")
|
||||
chrome.tabs.create({ url: appUrl });
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
Package: __CLICK_PACKAGE__
|
||||
Version: __APP_VERSION__
|
||||
Architecture: __CLICK_ARCH__
|
||||
Maintainer: __CLICK_MAINTAINER__
|
||||
Click-Version: 0.4
|
||||
Installed-Size: __INSTALLED_SIZE__
|
||||
Description: __CLICK_TITLE__
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"policy_groups": [
|
||||
"networking"
|
||||
],
|
||||
"policy_version": __CLICK_POLICY_VERSION__
|
||||
}
|
||||