Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92777d5425 | ||
|
|
05170a2846 | ||
|
|
c34ad06050 | ||
|
|
3cef21ab54 | ||
|
|
1b0a50e248 | ||
|
|
a6616d3cb2 | ||
|
|
0cf6f436e1 | ||
|
|
06358b5bfb | ||
|
|
201dced542 | ||
|
|
c580bc28ed | ||
|
|
7b0ecd1e13 | ||
|
|
53fdc50827 | ||
|
|
0fb6e98993 | ||
|
|
2a95e1652f | ||
|
|
9a04b9893b | ||
|
|
4b093aef18 | ||
|
|
9f0a136689 | ||
|
|
78507b44eb | ||
|
|
7b7fb07717 | ||
|
|
0f34ddc97d | ||
|
|
c679b11b73 | ||
|
|
82ccb092c2 | ||
|
|
8bbbfe0be0 | ||
|
|
ee89a9623a | ||
|
|
df91739754 | ||
|
|
5fadbcacea | ||
|
|
c0912d29f0 | ||
|
|
a6648a51d1 | ||
|
|
37cee8b105 | ||
|
|
c766b84796 | ||
|
|
663ad10fba | ||
|
|
1072d38690 | ||
|
|
fd1ac9403b | ||
|
|
43286f23c9 | ||
|
|
c2f63faee6 | ||
|
|
081357578b | ||
|
|
a047d036f3 | ||
|
|
cdd14267f2 | ||
|
|
6ab4bd6e61 | ||
|
|
376c2ee40b | ||
|
|
779699ac43 | ||
|
|
ce01d33aac |
No files matched your search
@@ -0,0 +1,2 @@
|
||||
build-essential
|
||||
zlib1g-dev
|
||||
@@ -0,0 +1,3 @@
|
||||
build-essential
|
||||
zlib1g-dev
|
||||
zip
|
||||
@@ -0,0 +1,5 @@
|
||||
build-essential
|
||||
gcc-mingw-w64-i686-win32
|
||||
gcc-mingw-w64-x86-64-win32
|
||||
zlib1g-dev
|
||||
zip
|
||||
@@ -20,6 +20,8 @@ jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
APT_CACHE_DIR: /tmp/apt-cache
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
@@ -28,10 +30,75 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Test apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIR }}
|
||||
key: test-apt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/apt/test-packages.txt') }}
|
||||
restore-keys: |
|
||||
test-apt-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Test Dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t packages < .github/apt/test-packages.txt
|
||||
mkdir -p "$APT_CACHE_DIR/partial"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential zlib1g-dev
|
||||
sudo apt-get \
|
||||
-o Dir::Cache::archives="$APT_CACHE_DIR" \
|
||||
install -y "${packages[@]}"
|
||||
sudo chown -R "$USER:$USER" "$APT_CACHE_DIR"
|
||||
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
build-chrome-extension:
|
||||
name: Build Chrome Extension
|
||||
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 Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIR }}
|
||||
key: web-apt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/apt/web-packages.txt') }}
|
||||
restore-keys: |
|
||||
web-apt-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Web Dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t packages < .github/apt/web-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: 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
|
||||
@@ -17,6 +17,8 @@ jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
APT_CACHE_DIR: /tmp/apt-cache
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
@@ -25,10 +27,24 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Test apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIR }}
|
||||
key: test-apt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/apt/test-packages.txt') }}
|
||||
restore-keys: |
|
||||
test-apt-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Test Dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t packages < .github/apt/test-packages.txt
|
||||
mkdir -p "$APT_CACHE_DIR/partial"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential zlib1g-dev
|
||||
sudo apt-get \
|
||||
-o Dir::Cache::archives="$APT_CACHE_DIR" \
|
||||
install -y "${packages[@]}"
|
||||
sudo chown -R "$USER:$USER" "$APT_CACHE_DIR"
|
||||
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
@@ -37,6 +53,8 @@ jobs:
|
||||
name: Build Web
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
env:
|
||||
APT_CACHE_DIR: /tmp/apt-cache
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
@@ -45,10 +63,24 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIR }}
|
||||
key: web-apt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/apt/web-packages.txt') }}
|
||||
restore-keys: |
|
||||
web-apt-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Web Dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t packages < .github/apt/web-packages.txt
|
||||
mkdir -p "$APT_CACHE_DIR/partial"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential zlib1g-dev zip
|
||||
sudo apt-get \
|
||||
-o Dir::Cache::archives="$APT_CACHE_DIR" \
|
||||
install -y "${packages[@]}"
|
||||
sudo chown -R "$USER:$USER" "$APT_CACHE_DIR"
|
||||
|
||||
- name: Set up Emscripten
|
||||
run: |
|
||||
@@ -76,6 +108,65 @@ jobs:
|
||||
path: build/release/web/*
|
||||
if-no-files-found: error
|
||||
|
||||
build-chrome-extension:
|
||||
name: Build Chrome Extension
|
||||
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 Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIR }}
|
||||
key: web-apt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/apt/web-packages.txt') }}
|
||||
restore-keys: |
|
||||
web-apt-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Web Dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t packages < .github/apt/web-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: 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
|
||||
mkdir -p build/release/chrome-web-store
|
||||
cp build/dist/inbe-chrome-web-store.zip build/release/chrome-web-store/
|
||||
|
||||
- name: Upload Chrome Extension Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-chrome-web-store
|
||||
path: build/release/chrome-web-store/*
|
||||
if-no-files-found: error
|
||||
|
||||
build-linux:
|
||||
name: Build Linux
|
||||
runs-on: ubuntu-latest
|
||||
@@ -149,6 +240,8 @@ jobs:
|
||||
name: Build Windows
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
env:
|
||||
APT_CACHE_DIR: /tmp/apt-cache
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
@@ -157,15 +250,34 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Windows apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIR }}
|
||||
key: windows-apt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/apt/windows-packages.txt') }}
|
||||
restore-keys: |
|
||||
windows-apt-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Cache Windows vendor builds
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
vendor-builds/windows
|
||||
vendor-builds/sqlite
|
||||
key: windows-vendor-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile', 'vendor/raylib/src/**', 'vendor/curl/**', 'vendor/sqlite/**') }}
|
||||
restore-keys: |
|
||||
windows-vendor-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Windows Dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t packages < .github/apt/windows-packages.txt
|
||||
mkdir -p "$APT_CACHE_DIR/partial"
|
||||
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
|
||||
sudo apt-get \
|
||||
-o Dir::Cache::archives="$APT_CACHE_DIR" \
|
||||
install -y "${packages[@]}"
|
||||
sudo chown -R "$USER:$USER" "$APT_CACHE_DIR"
|
||||
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
|
||||
@@ -209,6 +321,29 @@ jobs:
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Cache Android SDK packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ env.ANDROID_HOME }}/platforms/android-35
|
||||
${{ env.ANDROID_HOME }}/build-tools/34.0.0
|
||||
${{ env.ANDROID_HOME }}/ndk/25.1.8937393
|
||||
${{ env.ANDROID_HOME }}/ndk/28.2.13676358
|
||||
${{ env.ANDROID_HOME }}/cmake/3.22.1
|
||||
key: android-sdk-${{ runner.os }}-${{ runner.arch }}-api35-bt34-ndk25-ndk28-cmake322
|
||||
restore-keys: |
|
||||
android-sdk-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Cache Android native build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
droid/app/.cxx
|
||||
droid/app/build/intermediates/cxx
|
||||
key: android-native-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('droid/app/src/main/cpp/CMakeLists.txt', 'droid/app/build.gradle', 'src/**/*.c', 'src/**/*.h', 'flint/src/**/*.c', 'flint/include/**/*.h', 'vendor/raylib/src/**') }}
|
||||
restore-keys: |
|
||||
android-native-${{ runner.os }}-${{ runner.arch }}-
|
||||
|
||||
- name: Install Android SDK Components
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -264,6 +399,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-web
|
||||
- build-chrome-extension
|
||||
- build-linux
|
||||
- build-windows
|
||||
- build-android
|
||||
|
||||
@@ -10,8 +10,10 @@
|
||||
.codex/
|
||||
.agents/
|
||||
.cache/
|
||||
.ccache
|
||||
*.wasm
|
||||
build/
|
||||
tmp/
|
||||
vendor-builds/
|
||||
node_modules
|
||||
*.nix-defexpr
|
||||
@@ -19,6 +21,7 @@ node_modules
|
||||
*.nix-profile
|
||||
.claude.json
|
||||
.bash_history
|
||||
.env
|
||||
|
||||
|
||||
*.exe
|
||||
|
||||
@@ -1,4 +1,69 @@
|
||||
# Changelog
|
||||
## [1.5.0] - 2026-06-22
|
||||
### Changed
|
||||
- New logo
|
||||
- improve tabbar ui
|
||||
### Fixed
|
||||
- sync issues
|
||||
|
||||
## [1.4.11] - 2026-06-21
|
||||
### Added
|
||||
- tab bar mode for habits and exercises
|
||||
### Changed
|
||||
- fix ut click file
|
||||
|
||||
## [1.4.10] - 2026-06-21
|
||||
### Added
|
||||
- Added guide to habits page
|
||||
### Changed
|
||||
- fix orientation issues
|
||||
|
||||
## [1.4.9] - 2026-06-21
|
||||
### Fixed
|
||||
- Fix Practice startup, manual navigation, configuration scrolling, and sync backfill issues.
|
||||
- Add skip feature to on screen guide
|
||||
|
||||
## [1.4.8] - 2026-06-21
|
||||
### Changed
|
||||
- Fixed start screen
|
||||
- Fixed schema on first sync
|
||||
|
||||
## [1.4.7] - 2026-06-21
|
||||
### Changed
|
||||
- Rework Practice into Manual, start, and configuration tabs with a new localized first-run guide.
|
||||
- Simplify Meditation's manual to one page and make bottom navigation more compact.
|
||||
|
||||
## [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.
|
||||
|
||||
@@ -8,6 +8,7 @@ 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
|
||||
ADB ?= adb
|
||||
ARCH := $(shell uname -m)
|
||||
ANDROID_KEYSTORE ?= $(HOME)/.android/flint-release.keystore
|
||||
ANDROID_KEY_ALIAS ?= inbe-key
|
||||
@@ -26,10 +27,34 @@ 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_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
|
||||
ANDROID_FAST_ABI ?= $(shell $(ADB) shell getprop ro.product.cpu.abi 2>/dev/null | tr -d '\r' | head -n 1)
|
||||
ANDROID_DEBUG_ABIS ?= $(if $(strip $(ANDROID_FAST_ABI)),$(ANDROID_FAST_ABI),arm64-v8a)
|
||||
WEB_OBJ_DIR := $(BUILD_OBJ_DIR)/web
|
||||
WEB_DIST_DIR := $(BUILD_DIST_DIR)/web
|
||||
CHROME_WEB_STORE_DIR := $(BUILD_DIST_DIR)/chrome-web-store
|
||||
@@ -72,7 +97,8 @@ RAYLIB_SOURCES := $(shell find $(RAYLIB_DIR) -type f \( -name '*.c' -o -name '*.
|
||||
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_ICON_STAMP := $(BUILD_OBJ_DIR)/flint-icons.sha256
|
||||
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
|
||||
@@ -108,10 +134,10 @@ 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
|
||||
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
|
||||
GUIDE_OVERLAY_TEST := $(TEST_BIN_DIR)/guide_overlay_test
|
||||
FLINT_RUNTIME_ASSET_CFLAGS := $(FLINT_CURL_CFLAGS)
|
||||
FLINT_RUNTIME_ASSET_LDLIBS := $(FLINT_CURL_LDLIBS)
|
||||
|
||||
@@ -131,9 +157,13 @@ APP_SRCS := \
|
||||
src/practices/meditation/meditation_manual.c \
|
||||
src/practices/meditation/meditation_config.c \
|
||||
src/screens/habits_screen.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 \
|
||||
@@ -151,7 +181,7 @@ APP_SRCS := \
|
||||
LOCALE_FILES := $(wildcard locales/*.txt)
|
||||
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
|
||||
@@ -160,10 +190,11 @@ EMBEDDED_ASSET_FILES := $(LOCALE_FILES) $(IMAGE_FILES) $(SOUND_FILES) $(FONT_OUT
|
||||
SRC := $(APP_SRCS) $(EMBEDDED_ASSETS_C)
|
||||
|
||||
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
|
||||
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=%,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=0
|
||||
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 -lwininet -lws2_32 -liphlpapi -lcrypt32 -lsecur32 -lbcrypt -ladvapi32 -lm
|
||||
@@ -192,20 +223,25 @@ WEB_CC ?= emcc
|
||||
WEB_AR ?= emar
|
||||
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 := web-assets/icons/icon-512x512.png
|
||||
MAGICK ?= magick
|
||||
WEB_ASSET_FILES := $(shell find web-assets -type f 2>/dev/null)
|
||||
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 site-icons -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 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
|
||||
.PHONY: all native run run-fresh 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-avd android-check-keystore android-copy-assets android-local-properties android-debug android-debug-fast android-release android-bundle android-install android-install-fast 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
|
||||
|
||||
@@ -228,6 +264,7 @@ dist:
|
||||
$(MAKE) package-unpackaged-assets && \
|
||||
$(MAKE) web && \
|
||||
$(MAKE) chrome-web-store && \
|
||||
$(MAKE) click && \
|
||||
$(MAKE) appimage && \
|
||||
$(MAKE) windows && \
|
||||
$(MAKE) android-release PASSWORD="$$password" && \
|
||||
@@ -235,6 +272,15 @@ 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)
|
||||
@@ -246,27 +292,29 @@ vendor-prebuilds-windows: $(WIN64_RAYLIB_A) $(WIN32_RAYLIB_A) $(WIN64_CURL_A) $(
|
||||
run: $(TARGET)
|
||||
./$(TARGET)
|
||||
|
||||
test: $(STORAGE_IMPORT_TEST) $(FLINT_TEXT_SCALING_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST)
|
||||
run-fresh: $(TARGET)
|
||||
@root=$$(mktemp -d /tmp/inbe-fresh.XXXXXX); \
|
||||
echo "INBE_DATA_ROOT=$$root"; \
|
||||
INBE_FORCE_DARK_MODE=1 INBE_DATA_ROOT="$$root" ./$(TARGET)
|
||||
|
||||
screenshot: $(TARGET)
|
||||
./scripts/generate-screenshots.sh "$(TARGET)"
|
||||
|
||||
|
||||
test: $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST) $(GUIDE_OVERLAY_TEST)
|
||||
$(STORAGE_IMPORT_TEST)
|
||||
$(FLINT_TEXT_SCALING_TEST)
|
||||
$(LOCALE_KEYS_TEST)
|
||||
$(SYNC_URL_TEST)
|
||||
$(SYNC_ACCOUNT_TEST)
|
||||
$(GUIDE_OVERLAY_TEST)
|
||||
|
||||
$(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)
|
||||
$(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/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 \
|
||||
-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
|
||||
|
||||
$(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-o $@ \
|
||||
@@ -274,18 +322,24 @@ $(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_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 $@ \
|
||||
-Isrc/storage -Isrc -Isrc/core -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/storage.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(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/third_party/miniz.c $(SQLITE_SRC) \
|
||||
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) $(WINDOWS_DIST_DIR) $(ANDROID_BUILD_DIR) $(TEST_BIN_DIR) $(WEB_OBJ_DIR) $(WEB_DIST_DIR) $(CHROME_WEB_STORE_DIR):
|
||||
$(GUIDE_OVERLAY_TEST): tests/guide_overlay_test.c flint/src/ui/guide.c flint/include/flint_ui.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-Iflint/include -Ivendor/raylib/src \
|
||||
-o $@ \
|
||||
tests/guide_overlay_test.c
|
||||
|
||||
$(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):
|
||||
@@ -294,19 +348,23 @@ $(WINDOWS_BIN_DIR)/$(WIN64_ARCH) $(WINDOWS_BIN_DIR)/$(WIN32_ARCH):
|
||||
assets/fonts:
|
||||
mkdir -p $@
|
||||
|
||||
FORCE:
|
||||
|
||||
$(FONT_TOOL): vendor/otfchop/otfchop.c vendor/otfchop/stb_truetype.h vendor/otfchop/stb_image_write.h
|
||||
$(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)
|
||||
|
||||
$(FLINT_ICON_ASSETS_C): $(FLINT_ICON_FILES) $(FLINT_DIR)/scripts/embed-icons.sh
|
||||
$(FLINT_ICON_STAMP): FORCE $(FLINT_ICON_FILES) | $(BUILD_OBJ_DIR)
|
||||
@tmp="$@.tmp"; \
|
||||
find $(FLINT_DIR)/icons -maxdepth 1 -type f -name '*.png' | LC_ALL=C sort | while IFS= read -r file; do sha256sum "$$file"; done > "$$tmp"; \
|
||||
if ! cmp -s "$$tmp" "$@"; then mv "$$tmp" "$@"; else rm "$$tmp"; fi
|
||||
|
||||
$(FLINT_ICON_ASSETS_C): $(FLINT_ICON_STAMP) $(FLINT_DIR)/scripts/embed-icons.sh
|
||||
sh $(FLINT_DIR)/scripts/embed-icons.sh $(FLINT_DIR)/icons $@
|
||||
|
||||
$(RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
@@ -338,6 +396,24 @@ $(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 $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src
|
||||
mkdir -p $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src $(WIN64_RAYLIB_BUILD_DIR)
|
||||
@@ -509,7 +585,7 @@ $(WIN32_CURL_A): $(CURL_DIR)/CMakeLists.txt
|
||||
-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)
|
||||
$(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(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) \
|
||||
@@ -520,7 +596,7 @@ $(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H)
|
||||
-DINBE_HAS_LIBOQS=1 \
|
||||
-DSUPPORT_MODULE_RAUDIO=1 \
|
||||
-DSUPPORT_FILEFORMAT_OGG=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=0 \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_SRCS) \
|
||||
@@ -532,7 +608,63 @@ $(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H)
|
||||
-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) $(WIN64_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
|
||||
$(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(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=0 \
|
||||
-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 zip >/dev/null || { \
|
||||
echo "zip is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
}
|
||||
rm -rf $(CLICK_ROOT)
|
||||
rm -f $(CLICK_DIST_DIR)/$(CLICK_PACKAGE)_*_$(CLICK_ARCH).click
|
||||
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
|
||||
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
|
||||
cp $(CLICK_DIR)/manifest.json $(CLICK_ROOT)/manifest.json
|
||||
cp $(CLICK_DIR)/inbe.apparmor $(CLICK_ROOT)/inbe.apparmor
|
||||
cp $(CLICK_DIR)/inbe.desktop $(CLICK_ROOT)/inbe.desktop
|
||||
@if [ "$(CLICK_INCLUDE_METAINFO)" = "1" ]; then \
|
||||
mkdir -p $(CLICK_ROOT)/usr/share/metainfo; \
|
||||
cp $(CLICK_DIR)/inbe.metainfo.xml $(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) && zip -qr $(abspath $@) .
|
||||
|
||||
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(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) \
|
||||
@@ -552,7 +684,7 @@ $(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AM
|
||||
$(WINDOWS_LDFLAGS)
|
||||
$(WIN64_STRIP) $@
|
||||
|
||||
$(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_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(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) \
|
||||
@@ -572,7 +704,7 @@ $(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AM
|
||||
$(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; \
|
||||
@@ -588,13 +720,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) \
|
||||
@@ -605,7 +753,7 @@ $(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) $(WEB_LIBOQS_A) src/web_shell.html manifest.json $(WEB_ASSET_FILES) $(MEDITATION_AUDIO_ZIP) | $(WEB_DIST_DIR)
|
||||
$(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(FLINT_ICON_STAMP) $(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) \
|
||||
@@ -617,7 +765,7 @@ $(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMA
|
||||
-DPLATFORM_WEB \
|
||||
-DSUPPORT_MODULE_RAUDIO=1 \
|
||||
-DSUPPORT_FILEFORMAT_OGG=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=0 \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_WEB_SRCS) \
|
||||
@@ -630,12 +778,17 @@ $(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMA
|
||||
-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
|
||||
rm -rf $(WEB_DIST_DIR)/web-assets $(WEB_DIST_DIR)/site-icons
|
||||
cp -R web-assets $(WEB_DIST_DIR)/
|
||||
cp manifest.json $(WEB_DIST_DIR)/
|
||||
cp -R site-icons $(WEB_DIST_DIR)/
|
||||
cp manifest.json $(WEB_DIST_DIR)/webmanifest.json
|
||||
|
||||
android-copy-assets:
|
||||
$(MAKE) $(FONT_OUTPUTS)
|
||||
@@ -678,6 +831,10 @@ android-debug: android-copy-assets android-local-properties
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid assembleDebug
|
||||
$(MAKE) android-copy-debug-apks
|
||||
|
||||
android-debug-fast: android-copy-assets android-local-properties
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid assembleDebug -Pinbe.abis="$(ANDROID_DEBUG_ABIS)"
|
||||
$(MAKE) android-copy-debug-apks
|
||||
|
||||
android-release:
|
||||
$(MAKE) android-check-keystore PASSWORD="$(PASSWORD)"
|
||||
$(MAKE) android-copy-assets
|
||||
@@ -754,18 +911,37 @@ android-copy-bundle: | $(ANDROID_BUILD_DIR)
|
||||
fi
|
||||
|
||||
android-install: android-debug
|
||||
@ABI=$$(adb shell getprop ro.product.cpu.abi | tr -d '\r'); \
|
||||
@ABI=$$($(ADB) shell getprop ro.product.cpu.abi | tr -d '\r'); \
|
||||
APK=droid/app/build/outputs/apk/debug/app-$${ABI}-debug.apk; \
|
||||
if [ ! -f "$$APK" ]; then APK=droid/app/build/outputs/apk/debug/app-debug.apk; fi; \
|
||||
adb install -r "$$APK"; \
|
||||
adb shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
|
||||
$(ADB) install -r "$$APK"; \
|
||||
$(ADB) shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
|
||||
|
||||
android-install-fast: android-debug-fast
|
||||
@ABI=$$($(ADB) shell getprop ro.product.cpu.abi | tr -d '\r'); \
|
||||
APK=droid/app/build/outputs/apk/debug/app-$${ABI}-debug.apk; \
|
||||
if [ ! -f "$$APK" ]; then APK=droid/app/build/outputs/apk/debug/app-debug.apk; fi; \
|
||||
$(ADB) install -r "$$APK"; \
|
||||
$(ADB) shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
|
||||
|
||||
android-install-release: android-release
|
||||
@ABI=$$(adb shell getprop ro.product.cpu.abi | tr -d '\r'); \
|
||||
@ABI=$$($(ADB) shell getprop ro.product.cpu.abi | tr -d '\r'); \
|
||||
APK=droid/app/build/outputs/apk/release/app-$${ABI}-release.apk; \
|
||||
if [ ! -f "$$APK" ]; then APK=droid/app/build/outputs/apk/release/app-release.apk; fi; \
|
||||
adb install -r "$$APK"; \
|
||||
adb shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
|
||||
$(ADB) install -r "$$APK"; \
|
||||
$(ADB) shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
|
||||
|
||||
android-avd:
|
||||
bash scripts/emulator.sh
|
||||
@adb_cmd="$$HOME/.android-sdk-writable/platform-tools/adb"; \
|
||||
if [ ! -x "$$adb_cmd" ]; then adb_cmd="$${ANDROID_SDK_ROOT:-$${ANDROID_HOME}}/platform-tools/adb"; fi; \
|
||||
if [ ! -x "$$adb_cmd" ]; then adb_cmd=adb; fi; \
|
||||
abi=$$("$$adb_cmd" -e shell getprop ro.product.cpu.abi | tr -d '\r'); \
|
||||
if [ -z "$$abi" ]; then \
|
||||
echo "No emulator ABI detected. Is the AVD running?"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
$(MAKE) android-install-fast ADB="$$adb_cmd -e" ANDROID_DEBUG_ABIS="$$abi"
|
||||
|
||||
android-clean:
|
||||
$(GRADLE) -p droid clean
|
||||
@@ -802,17 +978,14 @@ web:
|
||||
|
||||
chrome-web-store: $(CHROME_WEB_STORE_ZIP)
|
||||
|
||||
$(CHROME_WEB_STORE_ZIP): $(CHROME_WEB_STORE_MANIFEST) $(CHROME_WEB_STORE_WORKER) $(CHROME_WEB_STORE_ICON) | $(CHROME_WEB_STORE_DIR)
|
||||
$(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
|
||||
sed -e 's#__WEB_APP_URL__#$(WEB_APP_URL)#g' \
|
||||
$(CHROME_WEB_STORE_WORKER) > $(CHROME_WEB_STORE_DIR)/service_worker.js
|
||||
$(MAGICK) $(CHROME_WEB_STORE_ICON) -filter point -resize 16x16 $(CHROME_WEB_STORE_DIR)/icons/icon-16.png
|
||||
$(MAGICK) $(CHROME_WEB_STORE_ICON) -filter point -resize 32x32 $(CHROME_WEB_STORE_DIR)/icons/icon-32.png
|
||||
$(MAGICK) $(CHROME_WEB_STORE_ICON) -filter point -resize 48x48 $(CHROME_WEB_STORE_DIR)/icons/icon-48.png
|
||||
$(MAGICK) $(CHROME_WEB_STORE_ICON) -filter point -resize 128x128 $(CHROME_WEB_STORE_DIR)/icons/icon-128.png
|
||||
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)) .
|
||||
|
||||
@@ -825,7 +998,7 @@ clean-linux:
|
||||
clean-vendor-builds:
|
||||
rm -rf $(VENDOR_BUILD_DIR)
|
||||
|
||||
NEEDS_NATIVE_ENV := $(if $(MAKECMDGOALS),$(filter all native run dist appimage vendor-prebuilds vendor-prebuilds-native,$(MAKECMDGOALS)),native)
|
||||
NEEDS_NATIVE_ENV := $(if $(MAKECMDGOALS),$(filter all native run run-fresh 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')
|
||||
@@ -849,3 +1022,30 @@ ifneq ($(shell v='$(FLINT_CURL_VERSION_HEX)'; if [ "$$v" = 075600 ] || [ "$$v" \
|
||||
$(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: 35 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 249 B |
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 323 B |
|
After Width: | Height: | Size: 265 B |
|
After Width: | Height: | Size: 294 B |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 328 B |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 131 KiB |
@@ -35,8 +35,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 35
|
||||
versionCode 38
|
||||
versionName "1.4.3"
|
||||
versionCode 46
|
||||
versionName "1.5.0"
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,12 @@ android {
|
||||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
||||
universalApk true
|
||||
def selectedAbis = (project.findProperty('inbe.abis') ?: 'arm64-v8a,armeabi-v7a,x86,x86_64')
|
||||
.split(',')
|
||||
.collect { it.trim() }
|
||||
.findAll { it.length() > 0 }
|
||||
include(*selectedAbis)
|
||||
universalApk !project.hasProperty('inbe.abis')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round">
|
||||
<activity
|
||||
android:name="xyz.waozi.inbe.MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize|uiMode"
|
||||
android:configChanges="keyboardHidden|uiMode"
|
||||
android:exported="true"
|
||||
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
|
||||
android:windowLayoutInDisplayCutoutMode="never">
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(Inbe C)
|
||||
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if(CCACHE_PROGRAM)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
|
||||
set(REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../../..")
|
||||
set(SRC_DIR "${REPO_ROOT}/src")
|
||||
set(RAYLIB_DIR "${REPO_ROOT}/vendor/raylib/src")
|
||||
@@ -14,7 +19,7 @@ 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")
|
||||
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")
|
||||
@@ -25,8 +30,6 @@ set(INBE_EMBEDDED_INPUTS
|
||||
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)
|
||||
@@ -105,9 +108,13 @@ add_library(main SHARED
|
||||
"${SRC_DIR}/practices/meditation/meditation_manual.c"
|
||||
"${SRC_DIR}/practices/meditation/meditation_config.c"
|
||||
"${SRC_DIR}/screens/habits_screen.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"
|
||||
|
||||
@@ -77,6 +77,7 @@ public class MainActivity extends NativeActivity {
|
||||
private native void nativeTextInputCommit(int codepoint);
|
||||
private native void nativeTextInputBackspace();
|
||||
private native void nativeTextInputEnter();
|
||||
private native void nativeInvalidateGraphicsResources();
|
||||
|
||||
private void requestDownloadNotificationPermissionIfNeeded() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
|
||||
@@ -658,6 +659,7 @@ public class MainActivity extends NativeActivity {
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
nativeInvalidateGraphicsResources();
|
||||
pushDeviceConfiguration();
|
||||
requestInsetRefresh();
|
||||
}
|
||||
@@ -856,6 +858,7 @@ public class MainActivity extends NativeActivity {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
activityPaused = false;
|
||||
nativeInvalidateGraphicsResources();
|
||||
syncLifecycleState("onResume");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#E2EEFC" />
|
||||
<solid android:color="#87CEEB" />
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 22 KiB |
@@ -2,3 +2,4 @@ android.useAndroidX=true
|
||||
android.suppressUnsupportedCompileSdk=35
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
android.nativeBuildCache.enabled=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.
|
||||
@@ -1,2 +1,3 @@
|
||||
### Fixed
|
||||
Fixed
|
||||
---
|
||||
- Import now restores habits, habit sync settings, and optionally app settings from Inbe SQLite exports.
|
||||
@@ -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.
|
||||
@@ -0,0 +1,3 @@
|
||||
### Changed
|
||||
- Rework Practice into Manual, start, and configuration tabs with a new localized first-run guide.
|
||||
- Simplify Meditation's manual to one page and make bottom navigation more compact.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Changed
|
||||
- Fixed start screen
|
||||
@@ -0,0 +1,2 @@
|
||||
### Fixed
|
||||
- Fix Practice startup, manual navigation, configuration scrolling, and sync backfill issues.
|
||||
@@ -0,0 +1,4 @@
|
||||
### Added
|
||||
- Added guide to habits page
|
||||
### Changed
|
||||
- fix orientation issues
|
||||
@@ -0,0 +1,4 @@
|
||||
### Added
|
||||
- tab bar mode for habits and exercises
|
||||
### Changed
|
||||
- fix ut click file
|
||||
@@ -0,0 +1,3 @@
|
||||
### Changed
|
||||
- New logo
|
||||
- improve tabbar ui
|
||||
@@ -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: 50 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 249 KiB |
|
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.
|
||||
@@ -86,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 [
|
||||
@@ -190,6 +193,9 @@ EOF
|
||||
sdl2Pkgs.SDL2
|
||||
sdl2Pkgs.SDL2.dev
|
||||
butler
|
||||
binutils
|
||||
ubports-click
|
||||
ccache
|
||||
cmake
|
||||
curl
|
||||
curl.dev
|
||||
@@ -200,6 +206,7 @@ EOF
|
||||
gradle
|
||||
imagemagick
|
||||
jdk17
|
||||
libxml2
|
||||
libdrm
|
||||
libdrm.dev
|
||||
libgbm
|
||||
@@ -215,19 +222,27 @@ EOF
|
||||
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 = ''
|
||||
@@ -240,6 +255,9 @@ EOF
|
||||
export ANDROID_HOME="${sdk}/libexec/android-sdk"
|
||||
export ANDROID_SDK_ROOT="${sdk}/libexec/android-sdk"
|
||||
export ANDROID_NDK_ROOT="${ndkPath}"
|
||||
export CCACHE_DIR="$PWD/.ccache"
|
||||
export CCACHE_BASEDIR="$PWD"
|
||||
export CCACHE_COMPRESS=1
|
||||
|
||||
export PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:${pkgConfigPath}:$PKG_CONFIG_PATH"
|
||||
|
||||
@@ -264,6 +282,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"
|
||||
@@ -272,6 +291,9 @@ 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}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 995 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 136 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 150 B |
|
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 197 B |
@@ -10,6 +10,7 @@
|
||||
#include "flint_text.h"
|
||||
#include "flint_ui.h"
|
||||
#include "flint_text_layout.h"
|
||||
#include "flint_transition.h"
|
||||
#include "flint_locale.h"
|
||||
#include "flint_theme.h"
|
||||
#include "flint_theme_meta.h"
|
||||
|
||||
@@ -24,6 +24,7 @@ typedef struct FlintDpiState {
|
||||
extern FlintDpiState flint_dpi_state;
|
||||
|
||||
void flint_dpi_init(void);
|
||||
void flint_dpi_invalidate(void);
|
||||
void flint_dpi_update(int view_width, int view_height);
|
||||
int flint_dpi_is_dirty(void);
|
||||
static inline float flint_dpi_scale(void) { return flint_dpi_state.ui_scale_clamped; }
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -57,4 +57,14 @@ void flint_theme_set_dark_mode(bool dark);
|
||||
bool flint_theme_get_dark_mode(void);
|
||||
void flint_theme_reload_themes(void);
|
||||
|
||||
void flint_theme_set_current(int theme_id, int dark_mode);
|
||||
Color flint_theme_current_color(const char *key);
|
||||
Color flint_theme_get_text(void);
|
||||
Color flint_theme_get_bg(void);
|
||||
Color flint_theme_get_surface(void);
|
||||
Color flint_theme_get_circle(void);
|
||||
Color flint_theme_get_button(void);
|
||||
Color flint_theme_get_button_hover(void);
|
||||
Color flint_theme_get_icon(void);
|
||||
|
||||
#endif
|
||||
@@ -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 {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef FLINT_TRANSITION_H
|
||||
#define FLINT_TRANSITION_H
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
typedef enum FlintTransitionPhase {
|
||||
FLINT_TRANSITION_NONE = 0,
|
||||
FLINT_TRANSITION_OUT = 1,
|
||||
FLINT_TRANSITION_IN = 2
|
||||
} FlintTransitionPhase;
|
||||
|
||||
typedef struct FlintTransition {
|
||||
int active;
|
||||
int phase;
|
||||
int ticks;
|
||||
int duration;
|
||||
} FlintTransition;
|
||||
|
||||
void flint_transition_reset(FlintTransition *transition);
|
||||
void flint_transition_begin(FlintTransition *transition, int duration);
|
||||
void flint_transition_reverse_to_out(FlintTransition *transition);
|
||||
float flint_transition_alpha(const FlintTransition *transition);
|
||||
int flint_transition_step(FlintTransition *transition);
|
||||
void flint_transition_draw_fade(const FlintTransition *transition,
|
||||
int width, int height, Color color);
|
||||
|
||||
#endif
|
||||
@@ -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;
|
||||
@@ -123,6 +340,55 @@ typedef struct {
|
||||
int font;
|
||||
} FlintUISubtabBar;
|
||||
|
||||
typedef struct {
|
||||
const char *label;
|
||||
Texture2D icon;
|
||||
int icon_size;
|
||||
int disabled;
|
||||
Color accent;
|
||||
} FlintUITab;
|
||||
|
||||
typedef struct {
|
||||
Rectangle bounds;
|
||||
const FlintUITab *tabs;
|
||||
int count;
|
||||
int selected_index;
|
||||
int font;
|
||||
int min_tab_width;
|
||||
int max_tab_width;
|
||||
int *scroll_offset;
|
||||
int focus_selected;
|
||||
} FlintUITabBar;
|
||||
|
||||
typedef struct {
|
||||
Rectangle anchor;
|
||||
const char *text;
|
||||
} FlintUIGuideStep;
|
||||
|
||||
typedef struct {
|
||||
const FlintUIGuideStep *steps;
|
||||
int count;
|
||||
int *step;
|
||||
int view_width;
|
||||
int view_height;
|
||||
int reserved_top;
|
||||
int reserved_bottom;
|
||||
int max_width;
|
||||
int line_gap;
|
||||
int paragraph_font;
|
||||
Texture2D close_icon;
|
||||
Texture2D back_icon;
|
||||
Texture2D next_icon;
|
||||
Texture2D done_icon;
|
||||
} FlintUIGuideOverlay;
|
||||
|
||||
typedef struct {
|
||||
int closed;
|
||||
int finished;
|
||||
int changed;
|
||||
int step;
|
||||
} FlintUIGuideResult;
|
||||
|
||||
typedef struct {
|
||||
Rectangle bounds;
|
||||
int content_height;
|
||||
@@ -161,10 +427,36 @@ 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);
|
||||
void ui_set_colors(Color text, Color bg, Color surface, Color circle, Color button, Color button_hover, Color icon);
|
||||
int ui_is_desktop_mode(void);
|
||||
void ui_set_frame(Camera2D camera);
|
||||
void flint_ui_set_text_input_platform_callback(FlintUITextInputPlatformCallback callback);
|
||||
void ui_set_cursor_clickable(int *cursor_clickable);
|
||||
@@ -172,12 +464,15 @@ 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);
|
||||
void ui_draw_fitted_text_in_rect(const char *text, Rectangle rect, int preferred_size, int min_size, Color color);
|
||||
void flint_ui_draw_text_input(Rectangle bounds, const char *text, int cursor_position,
|
||||
int focused, int cursor_visible, int font,
|
||||
FlintUITextInputStyle style);
|
||||
@@ -191,6 +486,7 @@ int flint_ui_text_input(FlintUITextInput input);
|
||||
int flint_ui_text_field(FlintUITextField field);
|
||||
int flint_ui_paragraph_height(FlintUIParagraph paragraph);
|
||||
void flint_ui_paragraph_draw(FlintUIParagraph paragraph, int x, int *y);
|
||||
FlintUIGuideResult flint_ui_draw_guide_overlay(FlintUIGuideOverlay guide);
|
||||
void ui_draw_bevel(int x, int y, int w, int h, Color light, Color dark);
|
||||
void ui_draw_text_lines(const char **lines, int count, int x, int *y, int font, int line_h, Color color);
|
||||
/* Icon fallback drawing now from Flint: flint_draw_icon_fallback */
|
||||
@@ -198,12 +494,31 @@ 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 */
|
||||
int ui_draw_generic_button(int x, int y, int w, int h, const char *label,
|
||||
UIButtonStyle style, int disabled, int *hover);
|
||||
int ui_draw_subtab_bar(FlintUISubtabBar bar);
|
||||
int ui_draw_tab_bar(FlintUITabBar bar);
|
||||
int ui_tab_bar_height(void);
|
||||
|
||||
void ui_draw_icon_link(int x, int y, int icon_size, Texture2D icon, const char *url);
|
||||
int ui_draw_slider(int id, int x, int y, int w, const char *label, int min, int max, int *value, const char *suffix);
|
||||
@@ -222,31 +537,17 @@ int ui_draw_dropdown_button(int id, int x, int y, int w, int h, const char **opt
|
||||
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_draw_theme_picker(int x, int y, int w, int dark_mode, int *theme_id);
|
||||
int ui_theme_picker_height(int w);
|
||||
typedef struct UITab {
|
||||
const char *label;
|
||||
Texture2D icon;
|
||||
UIIconType icon_type;
|
||||
} 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);
|
||||
int 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 +563,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);
|
||||
|
||||
@@ -50,4 +50,8 @@ icon_enum()
|
||||
printf 'const unsigned int flint_icon_asset_count = %su;\n' "$count"
|
||||
} > "$tmp"
|
||||
|
||||
mv "$tmp" "$out"
|
||||
if [ -f "$out" ] && cmp -s "$tmp" "$out"; then
|
||||
rm "$tmp"
|
||||
else
|
||||
mv "$tmp" "$out"
|
||||
fi
|
||||
@@ -15,6 +15,14 @@ flint_dpi_init(void)
|
||||
flint_dpi_state.needs_update = 0;
|
||||
}
|
||||
|
||||
void
|
||||
flint_dpi_invalidate(void)
|
||||
{
|
||||
flint_dpi_state.view_width = -1;
|
||||
flint_dpi_state.view_height = -1;
|
||||
flint_dpi_state.needs_update = 1;
|
||||
}
|
||||
|
||||
void
|
||||
flint_dpi_update(int view_width, int view_height)
|
||||
{
|
||||
|
||||
@@ -105,15 +105,19 @@ static const unsigned char flint_icon_droid[] = {
|
||||
|
||||
static const unsigned char flint_icon_edit[] = {
|
||||
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, 0x66, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xb5, 0x52, 0x5b, 0x0e, 0xc0, 0x20, 0x08, 0x13,
|
||||
0xef, 0x7f, 0xe7, 0xed, 0x47, 0x13, 0x84, 0xae, 0x6d, 0x4c, 0xc6, 0xa7, 0xf4, 0x41, 0x91, 0x31,
|
||||
0x8c, 0x7a, 0x56, 0xa1, 0x5e, 0x38, 0xe4, 0x83, 0x10, 0x21, 0x39, 0x9f, 0xce, 0x68, 0x92, 0xe9,
|
||||
0x3a, 0x67, 0xf7, 0xdc, 0x83, 0x02, 0x1b, 0x80, 0x08, 0xf5, 0xad, 0x09, 0x54, 0x32, 0x12, 0x39,
|
||||
0xa6, 0x62, 0x64, 0x16, 0xa9, 0x61, 0xd8, 0x57, 0x59, 0x98, 0x5b, 0xf2, 0xac, 0x20, 0x26, 0x8e,
|
||||
0xa2, 0xc1, 0x05, 0x65, 0x20, 0x23, 0x43, 0xe7, 0x3c, 0xaa, 0xb3, 0x17, 0x79, 0x48, 0xea, 0x74,
|
||||
0x65, 0x84, 0xdf, 0x2b, 0x54, 0x46, 0x55, 0x2f, 0xf8, 0xdc, 0x8b, 0xb8, 0x5d, 0x5e, 0xd7, 0x7f,
|
||||
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x14, 0x08, 0x06, 0x00, 0x00, 0x00, 0x8d, 0x89, 0x1d,
|
||||
0x0d, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x00, 0xa6, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xb5, 0xd3, 0x51, 0x0e, 0xc3, 0x20, 0x0c, 0x03,
|
||||
0x50, 0x67, 0xea, 0x41, 0xe1, 0x64, 0x70, 0xd3, 0xf4, 0xa3, 0x43, 0x4b, 0x43, 0xdc, 0x80, 0xb6,
|
||||
0xf9, 0xaf, 0x2a, 0x7d, 0x32, 0x89, 0x0a, 0xfc, 0x38, 0xb2, 0x7a, 0xb0, 0xb5, 0xa6, 0xf6, 0xb9,
|
||||
0xd6, 0x1a, 0x7e, 0xbb, 0x04, 0x0e, 0xac, 0x94, 0x02, 0x00, 0xe8, 0xbd, 0x53, 0x34, 0x05, 0x3d,
|
||||
0x36, 0xc2, 0xd0, 0x47, 0xd0, 0x63, 0x22, 0x22, 0x00, 0xa0, 0xaa, 0xca, 0xd0, 0xd7, 0x6e, 0x33,
|
||||
0x0b, 0x8f, 0x77, 0x76, 0xbe, 0x21, 0x98, 0x35, 0x8b, 0x50, 0x0a, 0x32, 0x2c, 0x42, 0xa3, 0xdc,
|
||||
0x40, 0x86, 0xf9, 0x56, 0xfa, 0x0e, 0xf0, 0x99, 0x23, 0x6d, 0xc8, 0x30, 0x8f, 0x5a, 0x2c, 0x5d,
|
||||
0x0a, 0xc3, 0x46, 0x3b, 0x86, 0xdd, 0x40, 0xbb, 0x29, 0x36, 0xa7, 0x0c, 0x9b, 0x1a, 0xda, 0x8d,
|
||||
0x79, 0x74, 0x05, 0x9b, 0x40, 0xe0, 0xba, 0xae, 0xdf, 0xe8, 0x2a, 0x16, 0x82, 0x3e, 0x3b, 0x18,
|
||||
0x00, 0x1c, 0x0c, 0xb0, 0xc8, 0x48, 0x86, 0x4d, 0xa0, 0x07, 0x56, 0x91, 0xbf, 0x46, 0xb2, 0x5f,
|
||||
0x69, 0x37, 0x47, 0x74, 0xcd, 0x6f, 0x72, 0x02, 0x63, 0x94, 0x8b, 0x26, 0xd7, 0xd9, 0x8c, 0x86,
|
||||
0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
@@ -252,57 +256,68 @@ static const unsigned char flint_icon_home[] = {
|
||||
|
||||
static const unsigned char flint_icon_inbe[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a,
|
||||
0xf4, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x02, 0xfa, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0xad, 0x57, 0x4d, 0x4b, 0x5b, 0x41, 0x14, 0x3d,
|
||||
0x79, 0x11, 0x41, 0x52, 0x1b, 0x05, 0x37, 0x15, 0x21, 0x14, 0xb2, 0x72, 0x51, 0x04, 0x71, 0x6f,
|
||||
0x7f, 0x44, 0x7e, 0x81, 0x58, 0x02, 0x5d, 0x18, 0xc8, 0x26, 0x41, 0xc8, 0x42, 0x90, 0x64, 0x23,
|
||||
0xe8, 0xa2, 0x10, 0x14, 0x7f, 0x41, 0xda, 0xdf, 0x60, 0xf7, 0x45, 0x70, 0xd5, 0x55, 0x20, 0x08,
|
||||
0xa2, 0x9b, 0x40, 0x13, 0x2a, 0x08, 0x81, 0x24, 0x5d, 0x94, 0x33, 0xb9, 0x73, 0xe7, 0xce, 0x4b,
|
||||
0x2a, 0x3d, 0xf0, 0x08, 0xf3, 0xf1, 0xee, 0x39, 0xf7, 0x63, 0xee, 0xbc, 0x64, 0x72, 0xb9, 0xc2,
|
||||
0x14, 0x0a, 0x4f, 0x97, 0xeb, 0x78, 0xf7, 0xe9, 0x97, 0x9e, 0xf6, 0x90, 0x4d, 0xf2, 0xa9, 0xeb,
|
||||
0x8b, 0x22, 0xa1, 0x31, 0x1a, 0x7c, 0xba, 0x5c, 0xf7, 0x7e, 0xff, 0x07, 0xf9, 0x43, 0x3b, 0xc1,
|
||||
0x43, 0x3b, 0x31, 0xd7, 0x32, 0xb9, 0x5c, 0x61, 0x4a, 0x83, 0xe3, 0xc9, 0xd0, 0x91, 0x6f, 0x95,
|
||||
0x27, 0x6e, 0x4c, 0x14, 0x4b, 0x07, 0xa9, 0x44, 0xbd, 0x6f, 0x5f, 0x53, 0x45, 0x00, 0xc0, 0x56,
|
||||
0x79, 0x32, 0x5f, 0x80, 0x1e, 0x4b, 0x01, 0x27, 0xb5, 0x0a, 0x00, 0xe0, 0xf1, 0x25, 0xeb, 0xe6,
|
||||
0x37, 0x57, 0xc6, 0x68, 0xb4, 0xce, 0x01, 0x00, 0xdd, 0xce, 0x75, 0x34, 0x42, 0xe3, 0xc9, 0x30,
|
||||
0x58, 0xf3, 0xe2, 0x22, 0x53, 0xa1, 0xc9, 0x25, 0x24, 0x39, 0xc7, 0x14, 0x66, 0xbd, 0x3b, 0x9e,
|
||||
0x0c, 0x4d, 0xf2, 0x40, 0x80, 0xdc, 0xac, 0x21, 0xbd, 0x6f, 0x5f, 0x9c, 0x61, 0x73, 0x65, 0xec,
|
||||
0x1e, 0x0b, 0x69, 0x0e, 0xc8, 0x3d, 0x19, 0x9e, 0x82, 0x6c, 0x92, 0x8f, 0xbe, 0x24, 0xc9, 0x19,
|
||||
0x6a, 0x00, 0x38, 0xa9, 0x55, 0xcc, 0x71, 0xb7, 0x73, 0xed, 0xe6, 0x62, 0x76, 0x19, 0x8d, 0xa5,
|
||||
0x79, 0xe4, 0x1a, 0x32, 0xd4, 0x92, 0xf4, 0xa4, 0x56, 0x71, 0xa9, 0x29, 0x96, 0x0e, 0x02, 0x11,
|
||||
0xc3, 0x1f, 0xef, 0x01, 0x00, 0xf9, 0xbd, 0x9e, 0x97, 0x92, 0x20, 0x05, 0xcf, 0xb7, 0x3b, 0x0b,
|
||||
0x09, 0xd1, 0x22, 0x74, 0x5d, 0x68, 0xe4, 0xf7, 0x7a, 0xe6, 0x7c, 0x02, 0xf8, 0xc7, 0x8f, 0x22,
|
||||
0x64, 0x41, 0x02, 0x7e, 0xe8, 0x1b, 0xad, 0x73, 0xf7, 0x48, 0xb0, 0x1e, 0xa4, 0xf7, 0xf4, 0x76,
|
||||
0x3c, 0x19, 0x7a, 0x22, 0x68, 0xdb, 0x45, 0x80, 0xe4, 0xbf, 0x6f, 0xef, 0x01, 0xc0, 0x85, 0x4c,
|
||||
0x1a, 0x24, 0xa1, 0x4c, 0x03, 0xe7, 0xe4, 0x51, 0xfc, 0x17, 0x78, 0x7d, 0x80, 0xcd, 0x62, 0x75,
|
||||
0xb7, 0xe0, 0xd4, 0xca, 0xda, 0x60, 0x23, 0x62, 0xc8, 0xe9, 0xb1, 0x24, 0x96, 0xde, 0x3f, 0xdf,
|
||||
0xee, 0xe0, 0xcd, 0xee, 0x5d, 0xaa, 0x00, 0x2f, 0x05, 0xec, 0x52, 0xb1, 0x7c, 0xd1, 0xb8, 0xcc,
|
||||
0xb7, 0xec, 0x01, 0x9a, 0x5c, 0xfe, 0xc6, 0x9a, 0x53, 0x46, 0x5f, 0x46, 0x72, 0xa3, 0xd5, 0x09,
|
||||
0xcb, 0x47, 0x55, 0x00, 0xb3, 0x7c, 0x53, 0x4c, 0xfb, 0xe2, 0x2c, 0x10, 0xb1, 0x08, 0x9c, 0x00,
|
||||
0x86, 0x4b, 0x1f, 0xc9, 0xce, 0xf7, 0x9f, 0x00, 0x80, 0xfa, 0x97, 0xb3, 0x80, 0x9c, 0x60, 0x3a,
|
||||
0x98, 0x8a, 0xe6, 0xe7, 0xaa, 0x5b, 0x2b, 0xed, 0x6f, 0xcf, 0x17, 0x20, 0x8f, 0x1e, 0x73, 0x76,
|
||||
0x73, 0xd7, 0x75, 0x73, 0x87, 0xa7, 0x4d, 0x00, 0x48, 0x15, 0xc0, 0x79, 0x8a, 0xb8, 0x3a, 0xae,
|
||||
0xa3, 0x3f, 0x18, 0x01, 0x00, 0x36, 0xd6, 0x96, 0x01, 0x00, 0x1f, 0x77, 0x8a, 0x81, 0x80, 0x04,
|
||||
0x98, 0xe5, 0xdc, 0x22, 0x27, 0x98, 0x67, 0xab, 0xda, 0x65, 0x3a, 0xb8, 0xef, 0xf0, 0xb4, 0xe9,
|
||||
0x88, 0xfb, 0x83, 0x11, 0xfa, 0x83, 0x11, 0x6e, 0xee, 0xba, 0x81, 0x6d, 0x77, 0x0c, 0x29, 0x42,
|
||||
0x6f, 0x38, 0x3c, 0x6d, 0xa2, 0x7c, 0x54, 0xf5, 0xc2, 0xac, 0xbb, 0x61, 0xa3, 0x75, 0xee, 0x6a,
|
||||
0xc0, 0x12, 0xc1, 0x87, 0x91, 0x94, 0x1c, 0x5e, 0x11, 0xc6, 0xc8, 0xb5, 0xe7, 0x5a, 0x00, 0x45,
|
||||
0x70, 0x4d, 0xd7, 0x84, 0xc6, 0xd5, 0x71, 0xdd, 0xa5, 0xc3, 0x09, 0xb0, 0xc8, 0xad, 0x0b, 0x28,
|
||||
0x26, 0x40, 0x9e, 0x06, 0xdd, 0xa8, 0xf4, 0x98, 0xf5, 0x51, 0xda, 0xdf, 0xfe, 0x2b, 0x80, 0xe4,
|
||||
0x0c, 0x91, 0x24, 0xe1, 0x0b, 0x31, 0x71, 0xfa, 0x0e, 0x60, 0x2a, 0x62, 0xa0, 0x2d, 0x0a, 0x58,
|
||||
0x8a, 0x6d, 0x94, 0xd5, 0x2c, 0x85, 0xc9, 0x75, 0xa6, 0x67, 0x11, 0x72, 0xed, 0x04, 0xe1, 0x04,
|
||||
0xf4, 0x07, 0x23, 0x73, 0x93, 0xf4, 0x56, 0x42, 0x1e, 0x3d, 0xd9, 0x96, 0x09, 0x79, 0x43, 0x6a,
|
||||
0x61, 0x3c, 0x9e, 0x9e, 0x00, 0x0b, 0x16, 0x79, 0xec, 0x5b, 0x50, 0x13, 0x3f, 0xbe, 0xd8, 0x36,
|
||||
0x49, 0xce, 0x06, 0xb5, 0x64, 0x2d, 0x02, 0xb3, 0xe6, 0xb1, 0x08, 0xb1, 0x14, 0x99, 0x56, 0x13,
|
||||
0x9a, 0x3c, 0x10, 0x60, 0x81, 0x55, 0x9c, 0x46, 0xaa, 0xc9, 0xf5, 0x5e, 0x99, 0x5a, 0xe9, 0x58,
|
||||
0x36, 0xc9, 0x87, 0xc7, 0xd0, 0x8a, 0x02, 0x8b, 0xd0, 0x6a, 0x40, 0x31, 0x48, 0x52, 0x69, 0x53,
|
||||
0x7a, 0xef, 0x09, 0x20, 0xb4, 0x10, 0xa9, 0x58, 0x9f, 0x86, 0x58, 0x65, 0x4b, 0x58, 0x61, 0x27,
|
||||
0x39, 0x60, 0x5c, 0xc7, 0x52, 0xc4, 0x6b, 0x20, 0xbd, 0x05, 0xec, 0x8b, 0x48, 0x5e, 0xf9, 0x99,
|
||||
0xb7, 0xab, 0x1f, 0xa6, 0x40, 0x78, 0xf7, 0xc7, 0x44, 0x68, 0x82, 0x18, 0xe6, 0x11, 0x07, 0x02,
|
||||
0x08, 0xeb, 0xf3, 0xdc, 0x12, 0x93, 0x26, 0x64, 0x63, 0x6d, 0x39, 0xb8, 0x7a, 0xa3, 0x5f, 0x44,
|
||||
0x52, 0xc0, 0xa2, 0xff, 0x0d, 0x5e, 0x03, 0x2d, 0x80, 0x5c, 0x7f, 0x00, 0x33, 0x9f, 0x0a, 0x53,
|
||||
0xdc, 0xa5, 0x75, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x08, 0x06, 0x00, 0x00, 0x00, 0xaa, 0x69, 0x71,
|
||||
0xde, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x03, 0x9d, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0xed, 0x99, 0x4f, 0x48, 0x1b, 0x41, 0x14, 0xc6,
|
||||
0xbf, 0xad, 0xb5, 0xf6, 0x24, 0x05, 0xd1, 0xac, 0x9e, 0x4a, 0x2c, 0x45, 0x29, 0x49, 0x29, 0x78,
|
||||
0x56, 0x2a, 0x81, 0x52, 0x3d, 0xe5, 0x20, 0xde, 0x05, 0x89, 0x07, 0x95, 0x1e, 0x7b, 0x93, 0xde,
|
||||
0x3c, 0x8a, 0xed, 0xa1, 0x12, 0xc8, 0x3d, 0xf4, 0x20, 0x3d, 0x34, 0x50, 0x10, 0x05, 0xcf, 0x05,
|
||||
0x21, 0x4b, 0x31, 0x07, 0x13, 0xbc, 0xb4, 0x66, 0x95, 0x82, 0xe4, 0xd4, 0x2a, 0x76, 0x7b, 0x90,
|
||||
0x99, 0xcc, 0xce, 0xce, 0xfe, 0x99, 0x64, 0x33, 0x5b, 0x70, 0x7e, 0x10, 0x98, 0xdd, 0xc9, 0x64,
|
||||
0xf6, 0xfb, 0xf6, 0xbd, 0x37, 0xb3, 0x1b, 0x40, 0xa3, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3,
|
||||
0xd1, 0xdc, 0x45, 0x8c, 0x84, 0xe6, 0x75, 0xb8, 0xe3, 0xa4, 0xae, 0x23, 0x91, 0x89, 0x9d, 0xdf,
|
||||
0xdf, 0x0f, 0x5c, 0x27, 0x1e, 0x3e, 0x7b, 0x99, 0xd4, 0xb5, 0x28, 0x9f, 0x94, 0x8a, 0x1f, 0x38,
|
||||
0xb3, 0x00, 0x00, 0x7f, 0x46, 0x33, 0x00, 0x92, 0x33, 0xe1, 0x9e, 0xea, 0x09, 0x81, 0xb6, 0x78,
|
||||
0xbe, 0x9d, 0x04, 0xca, 0x0d, 0x10, 0x09, 0x4e, 0xd2, 0x84, 0x44, 0x22, 0xe0, 0x7f, 0xe2, 0xbe,
|
||||
0xea, 0x09, 0xed, 0x5a, 0x03, 0x00, 0x90, 0x9a, 0x48, 0xbb, 0x8e, 0x93, 0x22, 0x91, 0x55, 0xa0,
|
||||
0xf9, 0xe1, 0x8d, 0xeb, 0x84, 0xb9, 0xba, 0x95, 0xd4, 0xb5, 0xe8, 0x7d, 0x80, 0xaa, 0x89, 0x5d,
|
||||
0x82, 0x7d, 0x22, 0x80, 0x45, 0x99, 0x21, 0x2a, 0x26, 0xf2, 0x6c, 0x7c, 0x2e, 0x0f, 0x3e, 0xbb,
|
||||
0x8e, 0x53, 0x13, 0x69, 0xba, 0x1f, 0x00, 0xd4, 0xee, 0x09, 0x7a, 0x3d, 0x89, 0x67, 0xe3, 0x13,
|
||||
0x86, 0xea, 0x8d, 0x91, 0x92, 0x65, 0x50, 0x66, 0x9d, 0x57, 0xbd, 0x27, 0xe8, 0xb9, 0x01, 0x03,
|
||||
0x67, 0x96, 0xd4, 0x52, 0x67, 0xd7, 0x1a, 0x4a, 0x4d, 0x50, 0x12, 0x01, 0xe6, 0xea, 0x16, 0xec,
|
||||
0x5a, 0x23, 0xd0, 0x08, 0xd2, 0x2f, 0x28, 0x88, 0x3d, 0xa5, 0x97, 0x06, 0x38, 0xce, 0xde, 0x36,
|
||||
0x3d, 0xd8, 0x48, 0xaf, 0x61, 0x23, 0xbd, 0x26, 0x34, 0xc1, 0xae, 0x35, 0x68, 0x3f, 0x1d, 0x7c,
|
||||
0x3b, 0x96, 0x5f, 0x2e, 0x63, 0xa7, 0xab, 0x9d, 0x60, 0xb1, 0x64, 0xb9, 0x2e, 0x70, 0x79, 0x29,
|
||||
0x13, 0x5a, 0xb4, 0x36, 0xd2, 0x6b, 0x78, 0x57, 0x7b, 0xef, 0x39, 0x97, 0x14, 0x52, 0x06, 0xf0,
|
||||
0x82, 0x9f, 0xbe, 0x1e, 0xf6, 0xed, 0x5f, 0x5e, 0xba, 0xad, 0xe6, 0xe4, 0x8e, 0xef, 0xcc, 0x8d,
|
||||
0xa3, 0x50, 0xa9, 0x03, 0xf0, 0x17, 0xbc, 0x33, 0x37, 0x4e, 0xc7, 0x90, 0xad, 0x32, 0x3f, 0x27,
|
||||
0xf3, 0xfb, 0xb1, 0xac, 0x10, 0x91, 0x0d, 0x28, 0x96, 0x2c, 0x87, 0x17, 0xcc, 0x43, 0xfa, 0x67,
|
||||
0x46, 0x4d, 0xb0, 0xe1, 0xdf, 0x29, 0xce, 0xde, 0x36, 0x8c, 0x5c, 0x06, 0x97, 0xdf, 0x7e, 0x7a,
|
||||
0x3b, 0x4b, 0x96, 0x13, 0x87, 0x09, 0xa1, 0x35, 0xa0, 0x58, 0xb2, 0x9c, 0x28, 0xe2, 0x09, 0xbc,
|
||||
0xf8, 0x0e, 0xf6, 0xf9, 0x46, 0x94, 0x42, 0xb8, 0x90, 0x1d, 0xf2, 0x8d, 0x0e, 0x19, 0x02, 0x23,
|
||||
0x20, 0xaa, 0xf0, 0x99, 0x51, 0x93, 0xb6, 0x59, 0xf1, 0x46, 0x6e, 0xbd, 0x93, 0x6b, 0x72, 0x80,
|
||||
0x76, 0x1a, 0x38, 0x7b, 0xdb, 0x30, 0xa6, 0xc6, 0x68, 0x27, 0x1b, 0x0d, 0x0b, 0xd9, 0x21, 0xc0,
|
||||
0x9d, 0x76, 0xd2, 0x11, 0xe1, 0x3b, 0x40, 0x46, 0x3c, 0x1f, 0xee, 0x22, 0xe1, 0xf9, 0xb7, 0xbb,
|
||||
0xb4, 0x3d, 0x32, 0x9d, 0x75, 0xf5, 0x9d, 0x1f, 0x56, 0x69, 0x7b, 0x77, 0x33, 0x4f, 0xdb, 0xa2,
|
||||
0x34, 0x32, 0x72, 0xeb, 0xe2, 0x94, 0x00, 0xf0, 0xa9, 0xfa, 0x4b, 0xda, 0x84, 0xae, 0x0d, 0x00,
|
||||
0xdc, 0x11, 0xc0, 0xc3, 0x0a, 0x97, 0x81, 0x35, 0x82, 0xc5, 0x4f, 0x3c, 0x41, 0xd6, 0x04, 0xe9,
|
||||
0x65, 0xb0, 0x79, 0xdc, 0x07, 0x73, 0xf2, 0x86, 0xb6, 0x01, 0xa0, 0xbc, 0x7f, 0x01, 0x00, 0x58,
|
||||
0x9c, 0x1d, 0x46, 0xa1, 0x52, 0xc7, 0xc7, 0x07, 0x5f, 0xe8, 0xf7, 0x8d, 0x9c, 0x57, 0x08, 0x31,
|
||||
0xc5, 0x4f, 0x24, 0xe0, 0xbe, 0xfb, 0x2b, 0x57, 0xf3, 0xd8, 0x99, 0x1b, 0x0f, 0x15, 0x0f, 0xb4,
|
||||
0xd3, 0x22, 0xaa, 0x09, 0x81, 0x06, 0xb0, 0x62, 0xc9, 0xb1, 0x1f, 0x44, 0x3c, 0x8f, 0x28, 0x3d,
|
||||
0x88, 0x70, 0xbf, 0x95, 0x42, 0x94, 0x42, 0x85, 0x4a, 0x1d, 0x8f, 0xa6, 0xc6, 0x50, 0xde, 0xbf,
|
||||
0xc0, 0xab, 0xc1, 0xeb, 0xa0, 0xcb, 0x96, 0x22, 0x34, 0x02, 0x78, 0xd1, 0xac, 0x21, 0xe6, 0xe4,
|
||||
0x8d, 0xab, 0xff, 0xfc, 0xb0, 0x8a, 0x91, 0xe9, 0x2c, 0x56, 0xae, 0xe6, 0x3d, 0xbf, 0x73, 0x7e,
|
||||
0x58, 0xf5, 0x08, 0x67, 0x77, 0x85, 0x6c, 0xe5, 0x2f, 0x54, 0xea, 0x58, 0xb9, 0xf2, 0x8e, 0x27,
|
||||
0x7c, 0x6d, 0xf5, 0xfb, 0x9a, 0x70, 0x62, 0xcb, 0x99, 0xd3, 0x55, 0x0a, 0x00, 0x6d, 0x13, 0xca,
|
||||
0xfb, 0x17, 0x58, 0x9c, 0x1d, 0x46, 0x1e, 0xe2, 0x9c, 0xdf, 0xdd, 0xcc, 0xfb, 0xde, 0x71, 0x73,
|
||||
0x75, 0xcb, 0x55, 0x2b, 0x58, 0xb1, 0xec, 0x78, 0x92, 0x6a, 0x71, 0x46, 0x40, 0x60, 0x9e, 0x14,
|
||||
0x4b, 0x96, 0x33, 0xf8, 0xd8, 0xbf, 0xc0, 0xf1, 0xb5, 0x00, 0xb8, 0x4d, 0x85, 0x5e, 0x10, 0x55,
|
||||
0xfc, 0x89, 0x7d, 0x8d, 0x23, 0xbb, 0x15, 0xb9, 0x10, 0x86, 0x7e, 0x89, 0xdf, 0x6c, 0xf0, 0x86,
|
||||
0x84, 0xd5, 0x08, 0xb6, 0xdf, 0x8f, 0xa0, 0xda, 0xc2, 0x12, 0x45, 0x3c, 0x80, 0x78, 0x0d, 0xe0,
|
||||
0x11, 0x45, 0x45, 0x14, 0x91, 0x51, 0x20, 0x46, 0x74, 0x12, 0xe2, 0x6c, 0xee, 0xcb, 0x18, 0x20,
|
||||
0xfd, 0x38, 0xbc, 0xbc, 0x94, 0x31, 0x5a, 0xa7, 0x4d, 0xd7, 0xb9, 0xe6, 0x71, 0x1f, 0xfd, 0xf0,
|
||||
0xe7, 0x79, 0x44, 0xdf, 0x23, 0x98, 0x93, 0x37, 0x1e, 0x33, 0x45, 0x45, 0xed, 0xc4, 0xbe, 0xf6,
|
||||
0x7c, 0x3a, 0xa5, 0xe3, 0x87, 0x09, 0x92, 0x1a, 0x41, 0x35, 0x22, 0x0c, 0x51, 0xe4, 0x3c, 0xff,
|
||||
0xf1, 0x17, 0x80, 0x5b, 0xf8, 0x93, 0x54, 0x3f, 0x6d, 0x87, 0x89, 0x95, 0xb9, 0xfb, 0x40, 0x0c,
|
||||
0x2f, 0x1d, 0xc3, 0x0a, 0x65, 0x18, 0xbc, 0x09, 0x22, 0x03, 0x44, 0x1c, 0xd9, 0x2d, 0xda, 0x7e,
|
||||
0x91, 0x1a, 0xa4, 0xe7, 0x62, 0xdb, 0x0a, 0xcb, 0xd0, 0xad, 0x09, 0x04, 0x36, 0xf7, 0x83, 0x0c,
|
||||
0xe0, 0x85, 0x92, 0x68, 0x8c, 0xf5, 0x61, 0x48, 0x96, 0xb0, 0x47, 0xd3, 0x28, 0x06, 0xf1, 0x06,
|
||||
0xb0, 0x77, 0x99, 0x25, 0xae, 0x97, 0x21, 0x80, 0xc2, 0x7f, 0x60, 0x58, 0x83, 0xa2, 0x98, 0xd1,
|
||||
0x3a, 0x6d, 0xc6, 0x2a, 0xd4, 0x8f, 0x44, 0xfe, 0x93, 0x8b, 0xf2, 0x22, 0x43, 0x85, 0x78, 0x8d,
|
||||
0x46, 0xa3, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3, 0xd1, 0x68, 0xee, 0x28, 0xff, 0x00, 0x51,
|
||||
0xfb, 0xcb, 0xe3, 0x4e, 0x1c, 0x64, 0x97, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
|
||||
0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
static const unsigned char flint_icon_itch[] = {
|
||||
@@ -517,20 +532,6 @@ static const unsigned char flint_icon_pause[] = {
|
||||
0x22, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
static const unsigned char flint_icon_pencil[] = {
|
||||
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, 0x66, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xb5, 0x52, 0x5b, 0x0e, 0xc0, 0x20, 0x08, 0x13,
|
||||
0xef, 0x7f, 0xe7, 0xed, 0x47, 0x13, 0x84, 0xae, 0x6d, 0x4c, 0xc6, 0xa7, 0xf4, 0x41, 0x91, 0x31,
|
||||
0x8c, 0x7a, 0x56, 0xa1, 0x5e, 0x38, 0xe4, 0x83, 0x10, 0x21, 0x39, 0x9f, 0xce, 0x68, 0x92, 0xe9,
|
||||
0x3a, 0x67, 0xf7, 0xdc, 0x83, 0x02, 0x1b, 0x80, 0x08, 0xf5, 0xad, 0x09, 0x54, 0x32, 0x12, 0x39,
|
||||
0xa6, 0x62, 0x64, 0x16, 0xa9, 0x61, 0xd8, 0x57, 0x59, 0x98, 0x5b, 0xf2, 0xac, 0x20, 0x26, 0x8e,
|
||||
0xa2, 0xc1, 0x05, 0x65, 0x20, 0x23, 0x43, 0xe7, 0x3c, 0xaa, 0xb3, 0x17, 0x79, 0x48, 0xea, 0x74,
|
||||
0x65, 0x84, 0xdf, 0x2b, 0x54, 0x46, 0x55, 0x2f, 0xf8, 0xdc, 0x8b, 0xb8, 0x5d, 0x5e, 0xd7, 0x7f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
static const unsigned char flint_icon_play[] = {
|
||||
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,
|
||||
@@ -568,11 +569,12 @@ static const unsigned char flint_icon_plus[] = {
|
||||
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, 0x2f, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0xa0, 0x25, 0xf8, 0x0f, 0x05, 0xf8,
|
||||
0xd4, 0x30, 0x51, 0x6a, 0xc9, 0xa8, 0x01, 0x0c, 0x0c, 0x8c, 0x0c, 0x0c, 0x90, 0xd0, 0x26, 0x4b,
|
||||
0x33, 0x23, 0x23, 0x23, 0xc5, 0x2e, 0xc0, 0x0b, 0x46, 0xd3, 0x01, 0x9d, 0x0c, 0xa0, 0x18, 0x00,
|
||||
0x00, 0xbc, 0x7e, 0x14, 0x08, 0x2f, 0x9a, 0xba, 0x41, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
|
||||
0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
0x00, 0x42, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0xa0, 0x25, 0xf8, 0xff, 0xff, 0xff,
|
||||
0xff, 0xf9, 0xf3, 0xe7, 0xff, 0xc7, 0xa7, 0x86, 0x89, 0x52, 0x4b, 0x46, 0x0d, 0x60, 0x60, 0x60,
|
||||
0x64, 0x60, 0x80, 0x84, 0x36, 0x59, 0x9a, 0x19, 0x19, 0x19, 0x59, 0x18, 0x18, 0x18, 0x18, 0x16,
|
||||
0x2c, 0x58, 0x80, 0x55, 0x41, 0x42, 0x42, 0x02, 0x4e, 0x39, 0xa2, 0xc0, 0x68, 0x3a, 0xa0, 0x93,
|
||||
0x01, 0x14, 0x03, 0x00, 0x3e, 0xca, 0x16, 0xaa, 0xdc, 0x53, 0x92, 0xf7, 0x00, 0x00, 0x00, 0x00,
|
||||
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
static const unsigned char flint_icon_quest[] = {
|
||||
@@ -844,17 +846,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[] = {
|
||||
@@ -876,13 +876,15 @@ static const unsigned char flint_icon_sun[] = {
|
||||
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, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xa5, 0x53, 0x41, 0x12, 0x00, 0x21, 0x08, 0x8a,
|
||||
0xfe, 0xff, 0x67, 0xf7, 0xb4, 0x3b, 0xd5, 0x42, 0x61, 0x7a, 0x32, 0x54, 0x68, 0x28, 0xd1, 0x48,
|
||||
0x44, 0x44, 0x30, 0x1c, 0x00, 0x18, 0xfe, 0x1b, 0x66, 0x04, 0x0a, 0x4f, 0x35, 0x6d, 0xeb, 0x96,
|
||||
0x82, 0xea, 0x73, 0x87, 0x59, 0x3f, 0xbe, 0xc4, 0x31, 0x68, 0x21, 0x99, 0x13, 0xf7, 0xba, 0x4b,
|
||||
0xbd, 0x1f, 0x15, 0x0e, 0x22, 0x92, 0xc0, 0x0d, 0x49, 0x30, 0x7a, 0xb2, 0xf3, 0xa7, 0x6e, 0xe2,
|
||||
0x7b, 0xb8, 0x7d, 0xc6, 0x34, 0x49, 0xe9, 0x37, 0x96, 0xf6, 0x41, 0xe1, 0xd4, 0xb8, 0xcc, 0x3a,
|
||||
0x3f, 0xfb, 0x0f, 0xaf, 0x73, 0x1a, 0x91, 0x95, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
|
||||
0x00, 0x7f, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xa5, 0x53, 0x41, 0x0e, 0xc0, 0x20, 0x08, 0xa3,
|
||||
0xbe, 0x54, 0x5f, 0xa6, 0x3f, 0x65, 0xa7, 0x1a, 0xd7, 0xe1, 0x30, 0xb1, 0x27, 0xad, 0xb4, 0x82,
|
||||
0x02, 0x2c, 0x40, 0xef, 0xdd, 0x23, 0xbe, 0xb5, 0x06, 0xe5, 0x3e, 0x04, 0xc5, 0xb5, 0xd6, 0x17,
|
||||
0x3f, 0xc6, 0x08, 0x4d, 0x5e, 0x1b, 0x15, 0x03, 0x80, 0x99, 0x99, 0xbb, 0xfb, 0xce, 0x04, 0x99,
|
||||
0x98, 0xd8, 0x99, 0xe0, 0x44, 0xfc, 0x67, 0x82, 0x2c, 0xed, 0x99, 0xea, 0xa6, 0x9c, 0x92, 0xd5,
|
||||
0xcc, 0x40, 0x72, 0x8c, 0xa1, 0xa6, 0xe8, 0x0d, 0x04, 0x85, 0xba, 0xd6, 0xd8, 0x62, 0x97, 0x98,
|
||||
0x06, 0x5a, 0xf3, 0xda, 0x07, 0xda, 0x13, 0x6b, 0xec, 0xf5, 0x23, 0xde, 0x7f, 0x23, 0x0f, 0xaf,
|
||||
0x1a, 0x29, 0x33, 0x39, 0x6a, 0xe5, 0x9d, 0x09, 0x71, 0x34, 0x4c, 0x6a, 0xa2, 0x88, 0xc6, 0xf9,
|
||||
0x01, 0xde, 0xe5, 0x8f, 0xcd, 0xb7, 0xb6, 0xd5, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
|
||||
0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
@@ -1220,7 +1222,7 @@ const FlintIconAsset flint_icon_assets[] = {
|
||||
{UI_ICON_TYPE_CHECK, "check", flint_icon_check, 131u},
|
||||
{UI_ICON_TYPE_DISCORD, "discord", flint_icon_discord, 180u},
|
||||
{UI_ICON_TYPE_DROID, "droid", flint_icon_droid, 170u},
|
||||
{UI_ICON_TYPE_EDIT, "edit", flint_icon_edit, 172u},
|
||||
{UI_ICON_TYPE_EDIT, "edit", flint_icon_edit, 236u},
|
||||
{UI_ICON_TYPE_EYE_CLOSED, "eye-closed", flint_icon_eye_closed, 157u},
|
||||
{UI_ICON_TYPE_FDROID, "fdroid", flint_icon_fdroid, 268u},
|
||||
{UI_ICON_TYPE_FORWARD, "forward", flint_icon_forward, 153u},
|
||||
@@ -1229,7 +1231,7 @@ const FlintIconAsset flint_icon_assets[] = {
|
||||
{UI_ICON_TYPE_GLOBE, "globe", flint_icon_globe, 192u},
|
||||
{UI_ICON_TYPE_HABIT, "habit", flint_icon_habit, 179u},
|
||||
{UI_ICON_TYPE_HOME, "home", flint_icon_home, 216u},
|
||||
{UI_ICON_TYPE_INBE, "inbe", flint_icon_inbe, 832u},
|
||||
{UI_ICON_TYPE_INBE, "inbe", flint_icon_inbe, 995u},
|
||||
{UI_ICON_TYPE_ITCH, "itch", flint_icon_itch, 344u},
|
||||
{UI_ICON_TYPE_JUPITER, "jupiter", flint_icon_jupiter, 151u},
|
||||
{UI_ICON_TYPE_LIGHTOFF, "lightoff", flint_icon_lightoff, 217u},
|
||||
@@ -1243,10 +1245,9 @@ const FlintIconAsset flint_icon_assets[] = {
|
||||
{UI_ICON_TYPE_MUSIC, "music", flint_icon_music, 159u},
|
||||
{UI_ICON_TYPE_MUTE, "mute", flint_icon_mute, 197u},
|
||||
{UI_ICON_TYPE_PAUSE, "pause", flint_icon_pause, 110u},
|
||||
{UI_ICON_TYPE_PENCIL, "pencil", flint_icon_pencil, 172u},
|
||||
{UI_ICON_TYPE_PLAY, "play", flint_icon_play, 151u},
|
||||
{UI_ICON_TYPE_PLAYSTORE, "playstore", flint_icon_playstore, 263u},
|
||||
{UI_ICON_TYPE_PLUS, "plus", flint_icon_plus, 117u},
|
||||
{UI_ICON_TYPE_PLUS, "plus", flint_icon_plus, 136u},
|
||||
{UI_ICON_TYPE_QUEST, "quest", flint_icon_quest, 714u},
|
||||
{UI_ICON_TYPE_RAY, "ray", flint_icon_ray, 152u},
|
||||
{UI_ICON_TYPE_RETURN, "return", flint_icon_return, 165u},
|
||||
@@ -1261,9 +1262,9 @@ 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_SUN, "sun", flint_icon_sun, 197u},
|
||||
{UI_ICON_TYPE_TCL, "tcl", flint_icon_tcl, 325u},
|
||||
{UI_ICON_TYPE_TELEGRAM, "telegram", flint_icon_telegram, 182u},
|
||||
{UI_ICON_TYPE_TEXT, "text", flint_icon_text, 216u},
|
||||
@@ -1286,4 +1287,4 @@ const FlintIconAsset flint_icon_assets[] = {
|
||||
{UI_ICON_TYPE_X, "x", flint_icon_x, 157u},
|
||||
};
|
||||
|
||||
const unsigned int flint_icon_asset_count = 71u;
|
||||
const unsigned int flint_icon_asset_count = 70u;
|
||||
@@ -85,7 +85,7 @@ flint_load_all_icons(Texture2D *icons)
|
||||
"stat.png", // UI_ICON_TYPE_STAT
|
||||
"home.png", // UI_ICON_TYPE_HOME
|
||||
"trash.png", // UI_ICON_TYPE_TRASH
|
||||
"pencil.png", // UI_ICON_TYPE_PENCIL
|
||||
"edit.png", // UI_ICON_TYPE_PENCIL
|
||||
"save.png", // UI_ICON_TYPE_SAVE
|
||||
"wrench.png", // UI_ICON_TYPE_WRENCH
|
||||
"plus.png", // UI_ICON_TYPE_PLUS
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "flint_locale.h"
|
||||
#include "platform.h"
|
||||
#include "flint_embedded_assets.h"
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
@@ -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,27 +41,26 @@ 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 float
|
||||
font_spacing(Font font, int font_size)
|
||||
static int
|
||||
font_integer_scale(int font_size)
|
||||
{
|
||||
if(font.baseSize <= 0)
|
||||
return 1.0f;
|
||||
int target_size = flint_px(font_size);
|
||||
int base_size = FLINT_TEXT_BASE_SIZE;
|
||||
int scale;
|
||||
|
||||
float spacing = (float)font_size / (float)font.baseSize;
|
||||
return spacing > 0.0f ? spacing : 1.0f;
|
||||
if(target_size < base_size)
|
||||
target_size = base_size;
|
||||
scale = (target_size + base_size / 2) / base_size;
|
||||
return scale > 0 ? scale : 1;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
flint_text_set_font(Font font)
|
||||
{
|
||||
@@ -227,57 +231,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 +254,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 +283,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 +325,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 +368,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 +391,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 +415,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
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
static FlintThemeScope scopes[FLINT_THEME_MAX_SCOPES];
|
||||
static int scope_count = 0;
|
||||
static bool dark_mode = false;
|
||||
static int current_theme_id = FLINT_THEME_SKY;
|
||||
|
||||
static FlintThemeAggregateVariable aggregate_vars[FLINT_THEME_MAX_VARS];
|
||||
static int aggregate_count = 0;
|
||||
@@ -642,3 +643,27 @@ void flint_theme_reload_themes(void)
|
||||
|
||||
flint_theme_aggregate_all();
|
||||
}
|
||||
|
||||
void
|
||||
flint_theme_set_current(int theme_id, int current_dark_mode)
|
||||
{
|
||||
current_theme_id = flint_theme_normalize(theme_id);
|
||||
dark_mode = current_dark_mode != 0;
|
||||
}
|
||||
|
||||
Color
|
||||
flint_theme_current_color(const char *key)
|
||||
{
|
||||
Color color = BLANK;
|
||||
flint_theme_catalog_color(flint_theme_normalize(current_theme_id),
|
||||
dark_mode, key, &color);
|
||||
return color;
|
||||
}
|
||||
|
||||
Color flint_theme_get_text(void) { return flint_theme_current_color("text"); }
|
||||
Color flint_theme_get_bg(void) { return flint_theme_current_color("background"); }
|
||||
Color flint_theme_get_surface(void) { return flint_theme_current_color("surface"); }
|
||||
Color flint_theme_get_circle(void) { return flint_theme_current_color("circle"); }
|
||||
Color flint_theme_get_button(void) { return flint_theme_current_color("button"); }
|
||||
Color flint_theme_get_button_hover(void) { return flint_theme_current_color("button_hover"); }
|
||||
Color flint_theme_get_icon(void) { return flint_theme_current_color("icon"); }
|
||||
@@ -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,98 @@
|
||||
#include "flint_transition.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void
|
||||
flint_transition_reset(FlintTransition *transition)
|
||||
{
|
||||
if(transition == NULL)
|
||||
return;
|
||||
transition->active = 0;
|
||||
transition->phase = FLINT_TRANSITION_NONE;
|
||||
transition->ticks = 0;
|
||||
transition->duration = 0;
|
||||
}
|
||||
|
||||
void
|
||||
flint_transition_begin(FlintTransition *transition, int duration)
|
||||
{
|
||||
if(transition == NULL)
|
||||
return;
|
||||
if(duration <= 0)
|
||||
duration = 1;
|
||||
transition->active = 1;
|
||||
transition->phase = FLINT_TRANSITION_OUT;
|
||||
transition->ticks = 0;
|
||||
transition->duration = duration;
|
||||
}
|
||||
|
||||
void
|
||||
flint_transition_reverse_to_out(FlintTransition *transition)
|
||||
{
|
||||
if(transition == NULL || !transition->active)
|
||||
return;
|
||||
if(transition->phase == FLINT_TRANSITION_IN) {
|
||||
transition->phase = FLINT_TRANSITION_OUT;
|
||||
transition->ticks = transition->duration - transition->ticks;
|
||||
if(transition->ticks < 0)
|
||||
transition->ticks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
float
|
||||
flint_transition_alpha(const FlintTransition *transition)
|
||||
{
|
||||
float progress;
|
||||
|
||||
if(transition == NULL || !transition->active || transition->duration <= 0)
|
||||
return 0.0f;
|
||||
progress = (float)transition->ticks / (float)transition->duration;
|
||||
if(progress < 0.0f)
|
||||
progress = 0.0f;
|
||||
if(progress > 1.0f)
|
||||
progress = 1.0f;
|
||||
if(transition->phase == FLINT_TRANSITION_OUT)
|
||||
return progress;
|
||||
if(transition->phase == FLINT_TRANSITION_IN)
|
||||
return 1.0f - progress;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
int
|
||||
flint_transition_step(FlintTransition *transition)
|
||||
{
|
||||
if(transition == NULL || !transition->active)
|
||||
return FLINT_TRANSITION_NONE;
|
||||
|
||||
transition->ticks++;
|
||||
if(transition->ticks < transition->duration)
|
||||
return FLINT_TRANSITION_NONE;
|
||||
|
||||
if(transition->phase == FLINT_TRANSITION_OUT) {
|
||||
transition->phase = FLINT_TRANSITION_IN;
|
||||
transition->ticks = 0;
|
||||
return FLINT_TRANSITION_OUT;
|
||||
}
|
||||
|
||||
flint_transition_reset(transition);
|
||||
return FLINT_TRANSITION_IN;
|
||||
}
|
||||
|
||||
void
|
||||
flint_transition_draw_fade(const FlintTransition *transition,
|
||||
int width, int height, Color color)
|
||||
{
|
||||
int alpha;
|
||||
|
||||
if(transition == NULL || !transition->active)
|
||||
return;
|
||||
alpha = (int)(flint_transition_alpha(transition) * 255.0f);
|
||||
if(alpha <= 0)
|
||||
return;
|
||||
if(alpha > 255)
|
||||
alpha = 255;
|
||||
color.a = (unsigned char)(((int)color.a * alpha) / 255);
|
||||
if(color.a == 0)
|
||||
return;
|
||||
DrawRectangle(0, 0, width, height, color);
|
||||
}
|
||||