create-pixi-vn 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template-lib/package.json +3 -0
- package/template-nqtr-react-vite-muijoy/package.json +2 -2
- package/template-nqtr-react-vite-muijoy/src/assets/index.ts +2 -11
- package/template-nqtr-react-vite-muijoy/src/assets/manifest.gen.json +2 -7
- package/template-nqtr-react-vite-muijoy/src/components/menus/settings/index.tsx +15 -6
- package/template-nqtr-react-vite-muijoy/src/components/menus/settings/menus/diagnostics.tsx +266 -0
- package/template-nqtr-react-vite-muijoy/src/components/menus/settings/quick-menus.tsx +25 -1
- package/template-nqtr-react-vite-muijoy/src/lib/hooks/device-diagnostics-hooks.ts +68 -0
- package/template-nqtr-react-vite-muijoy/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-nqtr-react-vite-muijoy/src/lib/utils/device-diagnostics-utility.ts +382 -0
- package/template-nqtr-react-vite-muijoy/src/locales/en.json +50 -0
- package/template-nqtr-react-vite-muijoy/src/pixi-vn.keys.gen.ts +4 -7
- package/template-nqtr-react-vite-muijoy-ink/package.json +3 -3
- package/template-nqtr-react-vite-muijoy-ink/src/assets/index.ts +2 -11
- package/template-nqtr-react-vite-muijoy-ink/src/assets/manifest.gen.json +2 -7
- package/template-nqtr-react-vite-muijoy-ink/src/components/menus/settings/index.tsx +15 -6
- package/template-nqtr-react-vite-muijoy-ink/src/components/menus/settings/menus/diagnostics.tsx +266 -0
- package/template-nqtr-react-vite-muijoy-ink/src/components/menus/settings/quick-menus.tsx +25 -1
- package/template-nqtr-react-vite-muijoy-ink/src/lib/hooks/device-diagnostics-hooks.ts +68 -0
- package/template-nqtr-react-vite-muijoy-ink/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-nqtr-react-vite-muijoy-ink/src/lib/utils/device-diagnostics-utility.ts +382 -0
- package/template-nqtr-react-vite-muijoy-ink/src/locales/en.json +50 -0
- package/template-nqtr-react-vite-muijoy-ink/src/pixi-vn.keys.gen.ts +4 -7
- package/template-nqtr-react-vite-muijoy-ink-tauri/.vscode/launch.json +1 -1
- package/template-nqtr-react-vite-muijoy-ink-tauri/.vscode/tasks.json +1 -35
- package/template-nqtr-react-vite-muijoy-ink-tauri/_github/workflows/mobile.yml +76 -13
- package/template-nqtr-react-vite-muijoy-ink-tauri/package.json +3 -3
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/assets/index.ts +2 -11
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/assets/manifest.gen.json +2 -7
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/components/menus/settings/index.tsx +15 -6
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/components/menus/settings/menus/diagnostics.tsx +332 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/components/menus/settings/quick-menus.tsx +32 -1
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/content/ink/hashtag-commands.ts +17 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/lib/hooks/device-diagnostics-hooks.ts +96 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/lib/system-info.ts +54 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/lib/utils/device-diagnostics-utility.ts +511 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/locales/en.json +66 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/pixi-vn.keys.gen.ts +4 -7
- package/template-nqtr-react-vite-muijoy-ink-tauri/src-tauri/Cargo.toml +1 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src-tauri/src/lib.rs +34 -22
- package/template-nqtr-react-vite-muijoy-ink-tauri/src-tauri/src/system_info.rs +33 -0
- package/template-nqtr-react-vite-muijoy-tauri/.vscode/launch.json +1 -1
- package/template-nqtr-react-vite-muijoy-tauri/.vscode/tasks.json +1 -35
- package/template-nqtr-react-vite-muijoy-tauri/_github/workflows/mobile.yml +76 -13
- package/template-nqtr-react-vite-muijoy-tauri/package.json +2 -2
- package/template-nqtr-react-vite-muijoy-tauri/src/assets/index.ts +2 -11
- package/template-nqtr-react-vite-muijoy-tauri/src/assets/manifest.gen.json +2 -7
- package/template-nqtr-react-vite-muijoy-tauri/src/components/menus/settings/index.tsx +15 -6
- package/template-nqtr-react-vite-muijoy-tauri/src/components/menus/settings/menus/diagnostics.tsx +332 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/components/menus/settings/quick-menus.tsx +32 -1
- package/template-nqtr-react-vite-muijoy-tauri/src/lib/hooks/device-diagnostics-hooks.ts +96 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/lib/system-info.ts +54 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/lib/utils/device-diagnostics-utility.ts +511 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/locales/en.json +66 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/pixi-vn.keys.gen.ts +4 -7
- package/template-nqtr-react-vite-muijoy-tauri/src-tauri/Cargo.toml +1 -0
- package/template-nqtr-react-vite-muijoy-tauri/src-tauri/src/lib.rs +32 -20
- package/template-nqtr-react-vite-muijoy-tauri/src-tauri/src/system_info.rs +33 -0
- package/template-react-vite-muijoy/package.json +1 -1
- package/template-react-vite-muijoy/src/assets/index.ts +55 -55
- package/template-react-vite-muijoy/src/assets/manifest.gen.json +2 -7
- package/template-react-vite-muijoy/src/components/menus/settings/index.tsx +15 -6
- package/template-react-vite-muijoy/src/components/menus/settings/menus/diagnostics.tsx +266 -0
- package/template-react-vite-muijoy/src/components/menus/settings/quick-menus.tsx +25 -1
- package/template-react-vite-muijoy/src/lib/hooks/device-diagnostics-hooks.ts +68 -0
- package/template-react-vite-muijoy/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-react-vite-muijoy/src/lib/utils/device-diagnostics-utility.ts +382 -0
- package/template-react-vite-muijoy/src/locales/en.json +50 -0
- package/template-react-vite-muijoy/src/pixi-vn.keys.gen.ts +2 -3
- package/template-react-vite-muijoy-ink/ink/second_part.ink +0 -1
- package/template-react-vite-muijoy-ink/ink/start.ink +4 -6
- package/template-react-vite-muijoy-ink/package.json +2 -2
- package/template-react-vite-muijoy-ink/src/assets/index.ts +55 -55
- package/template-react-vite-muijoy-ink/src/assets/manifest.gen.json +2 -7
- package/template-react-vite-muijoy-ink/src/components/menus/settings/index.tsx +15 -6
- package/template-react-vite-muijoy-ink/src/components/menus/settings/menus/diagnostics.tsx +266 -0
- package/template-react-vite-muijoy-ink/src/components/menus/settings/quick-menus.tsx +25 -1
- package/template-react-vite-muijoy-ink/src/lib/hooks/device-diagnostics-hooks.ts +68 -0
- package/template-react-vite-muijoy-ink/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-react-vite-muijoy-ink/src/lib/utils/device-diagnostics-utility.ts +382 -0
- package/template-react-vite-muijoy-ink/src/locales/en.json +50 -0
- package/template-react-vite-muijoy-ink/src/pixi-vn.keys.gen.ts +2 -3
- package/template-react-vite-muijoy-ink-tauri/.vscode/launch.json +1 -1
- package/template-react-vite-muijoy-ink-tauri/.vscode/tasks.json +1 -35
- package/template-react-vite-muijoy-ink-tauri/_github/workflows/mobile.yml +76 -13
- package/template-react-vite-muijoy-ink-tauri/ink/second_part.ink +0 -1
- package/template-react-vite-muijoy-ink-tauri/ink/start.ink +4 -6
- package/template-react-vite-muijoy-ink-tauri/package-lock.json +12 -12
- package/template-react-vite-muijoy-ink-tauri/package.json +2 -2
- package/template-react-vite-muijoy-ink-tauri/src/assets/index.ts +55 -55
- package/template-react-vite-muijoy-ink-tauri/src/assets/manifest.gen.json +2 -7
- package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/index.tsx +15 -6
- package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/menus/diagnostics.tsx +332 -0
- package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/quick-menus.tsx +32 -1
- package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/device-diagnostics-hooks.ts +96 -0
- package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-react-vite-muijoy-ink-tauri/src/lib/system-info.ts +54 -0
- package/template-react-vite-muijoy-ink-tauri/src/lib/utils/device-diagnostics-utility.ts +511 -0
- package/template-react-vite-muijoy-ink-tauri/src/locales/en.json +66 -0
- package/template-react-vite-muijoy-ink-tauri/src/pixi-vn.keys.gen.ts +2 -3
- package/template-react-vite-muijoy-ink-tauri/src-tauri/Cargo.toml +1 -0
- package/template-react-vite-muijoy-ink-tauri/src-tauri/src/lib.rs +32 -20
- package/template-react-vite-muijoy-ink-tauri/src-tauri/src/system_info.rs +33 -0
- package/template-react-vite-muijoy-tauri/.vscode/launch.json +1 -1
- package/template-react-vite-muijoy-tauri/.vscode/tasks.json +1 -35
- package/template-react-vite-muijoy-tauri/_github/workflows/mobile.yml +76 -13
- package/template-react-vite-muijoy-tauri/package.json +1 -1
- package/template-react-vite-muijoy-tauri/src/assets/index.ts +55 -55
- package/template-react-vite-muijoy-tauri/src/assets/manifest.gen.json +2 -7
- package/template-react-vite-muijoy-tauri/src/components/menus/settings/index.tsx +15 -6
- package/template-react-vite-muijoy-tauri/src/components/menus/settings/menus/diagnostics.tsx +332 -0
- package/template-react-vite-muijoy-tauri/src/components/menus/settings/quick-menus.tsx +32 -1
- package/template-react-vite-muijoy-tauri/src/lib/hooks/device-diagnostics-hooks.ts +96 -0
- package/template-react-vite-muijoy-tauri/src/lib/hooks/hotkeys-hooks.ts +16 -0
- package/template-react-vite-muijoy-tauri/src/lib/system-info.ts +54 -0
- package/template-react-vite-muijoy-tauri/src/lib/utils/device-diagnostics-utility.ts +511 -0
- package/template-react-vite-muijoy-tauri/src/locales/en.json +66 -0
- package/template-react-vite-muijoy-tauri/src/pixi-vn.keys.gen.ts +2 -3
- package/template-react-vite-muijoy-tauri/src-tauri/Cargo.toml +1 -0
- package/template-react-vite-muijoy-tauri/src-tauri/src/lib.rs +32 -20
- package/template-react-vite-muijoy-tauri/src-tauri/src/system_info.rs +33 -0
|
@@ -5,6 +5,7 @@ use tauri_plugin_window_state::{AppHandleExt, StateFlags};
|
|
|
5
5
|
// Steam is only compiled on desktop targets when the "steam" feature is on.
|
|
6
6
|
#[cfg(all(feature = "steam", not(target_os = "ios"), not(target_os = "android")))]
|
|
7
7
|
mod steam;
|
|
8
|
+
mod system_info;
|
|
8
9
|
|
|
9
10
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
10
11
|
pub fn run() {
|
|
@@ -24,36 +25,47 @@ pub fn run() {
|
|
|
24
25
|
// is set in Cargo.toml). Steam is not supported on iOS / Android.
|
|
25
26
|
#[cfg(all(feature = "steam", not(target_os = "ios"), not(target_os = "android")))]
|
|
26
27
|
{
|
|
27
|
-
builder = builder
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
.invoke_handler(tauri::generate_handler![
|
|
32
|
-
steam::steam_is_available,
|
|
33
|
-
steam::steam_get_player_name,
|
|
34
|
-
steam::steam_get_app_id,
|
|
35
|
-
steam::steam_unlock_achievement,
|
|
36
|
-
steam::steam_is_achievement_unlocked,
|
|
37
|
-
steam::steam_clear_achievement,
|
|
38
|
-
steam::steam_set_stat_int,
|
|
39
|
-
steam::steam_get_stat_int,
|
|
40
|
-
steam::steam_set_stat_float,
|
|
41
|
-
steam::steam_get_stat_float,
|
|
42
|
-
steam::steam_store_stats,
|
|
43
|
-
steam::steam_is_dlc_installed,
|
|
44
|
-
steam::steam_open_overlay,
|
|
45
|
-
steam::steam_open_store,
|
|
46
|
-
]);
|
|
28
|
+
builder = builder.manage(steam::SteamClient {
|
|
29
|
+
client: std::sync::Mutex::new(steam::try_init()),
|
|
30
|
+
});
|
|
47
31
|
}
|
|
48
32
|
|
|
33
|
+
// `generate_handler!` needs a static list, so the Steam commands can't be
|
|
34
|
+
// appended conditionally — the two variants below are kept in sync by hand.
|
|
35
|
+
#[cfg(all(feature = "steam", not(target_os = "ios"), not(target_os = "android")))]
|
|
36
|
+
let builder = builder.invoke_handler(tauri::generate_handler![
|
|
37
|
+
system_info::get_system_info,
|
|
38
|
+
system_info::get_webview_version,
|
|
39
|
+
steam::steam_is_available,
|
|
40
|
+
steam::steam_get_player_name,
|
|
41
|
+
steam::steam_get_app_id,
|
|
42
|
+
steam::steam_unlock_achievement,
|
|
43
|
+
steam::steam_is_achievement_unlocked,
|
|
44
|
+
steam::steam_clear_achievement,
|
|
45
|
+
steam::steam_set_stat_int,
|
|
46
|
+
steam::steam_get_stat_int,
|
|
47
|
+
steam::steam_set_stat_float,
|
|
48
|
+
steam::steam_get_stat_float,
|
|
49
|
+
steam::steam_store_stats,
|
|
50
|
+
steam::steam_is_dlc_installed,
|
|
51
|
+
steam::steam_open_overlay,
|
|
52
|
+
steam::steam_open_store,
|
|
53
|
+
]);
|
|
54
|
+
|
|
55
|
+
#[cfg(not(all(feature = "steam", not(target_os = "ios"), not(target_os = "android"))))]
|
|
56
|
+
let builder = builder.invoke_handler(tauri::generate_handler![
|
|
57
|
+
system_info::get_system_info,
|
|
58
|
+
system_info::get_webview_version,
|
|
59
|
+
]);
|
|
60
|
+
|
|
49
61
|
builder
|
|
50
62
|
.run(tauri::generate_context!())
|
|
51
63
|
.expect("error while running tauri application");
|
|
52
64
|
}
|
|
53
65
|
|
|
54
|
-
fn on_page_load(
|
|
66
|
+
fn on_page_load(_window: &tauri::Webview, _: &tauri::webview::PageLoadPayload<'_>) {
|
|
55
67
|
#[cfg(not(debug_assertions))]
|
|
56
|
-
let _ =
|
|
68
|
+
let _ = _window.eval("document.addEventListener('contextmenu', e => e.preventDefault())");
|
|
57
69
|
}
|
|
58
70
|
|
|
59
71
|
#[cfg(not(mobile))]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
use serde::Serialize;
|
|
2
|
+
|
|
3
|
+
#[derive(Serialize)]
|
|
4
|
+
pub struct SystemInfo {
|
|
5
|
+
/// Specific OS/distro name (e.g. "Ubuntu", "Windows", "Mac OS"), not just the generic platform.
|
|
6
|
+
os_type: String,
|
|
7
|
+
os_version: String,
|
|
8
|
+
bitness: String,
|
|
9
|
+
architecture: String,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/// Native OS/distro details, unavailable to plain web JS (browsers deliberately
|
|
13
|
+
/// don't expose this to limit fingerprinting).
|
|
14
|
+
#[tauri::command]
|
|
15
|
+
pub fn get_system_info() -> SystemInfo {
|
|
16
|
+
let info = os_info::get();
|
|
17
|
+
SystemInfo {
|
|
18
|
+
os_type: info.os_type().to_string(),
|
|
19
|
+
os_version: info.version().to_string(),
|
|
20
|
+
bitness: info.bitness().to_string(),
|
|
21
|
+
architecture: info
|
|
22
|
+
.architecture()
|
|
23
|
+
.map(str::to_string)
|
|
24
|
+
.unwrap_or_else(|| std::env::consts::ARCH.to_string()),
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// Underlying WebView engine version (WebView2 on Windows, WebKitGTK on Linux,
|
|
29
|
+
/// WKWebView on macOS/iOS, Android System WebView on Android).
|
|
30
|
+
#[tauri::command]
|
|
31
|
+
pub fn get_webview_version() -> Result<String, String> {
|
|
32
|
+
tauri::webview_version().map_err(|e| e.to_string())
|
|
33
|
+
}
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"label": "Cargo Build (Desktop Dev)",
|
|
107
107
|
"type": "shell",
|
|
108
108
|
"command": "cargo build --manifest-path=./src-tauri/Cargo.toml --no-default-features",
|
|
109
|
-
"dependsOn": ["
|
|
109
|
+
"dependsOn": ["Restart Vite Dev Server"],
|
|
110
110
|
"presentation": {
|
|
111
111
|
"reveal": "always",
|
|
112
112
|
"panel": "dedicated",
|
|
@@ -114,40 +114,6 @@
|
|
|
114
114
|
"close": true
|
|
115
115
|
},
|
|
116
116
|
"problemMatcher": ["$rustc"]
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"label": "Start Vite Desktop Server",
|
|
120
|
-
"type": "shell",
|
|
121
|
-
"command": "npm run dev",
|
|
122
|
-
"isBackground": true,
|
|
123
|
-
"dependsOn": ["Install Dependencies"],
|
|
124
|
-
"problemMatcher": {
|
|
125
|
-
"owner": "vite",
|
|
126
|
-
"pattern": {
|
|
127
|
-
"regexp": "^(?!x)x"
|
|
128
|
-
},
|
|
129
|
-
"background": {
|
|
130
|
-
"activeOnStart": true,
|
|
131
|
-
"beginsPattern": ".",
|
|
132
|
-
"endsPattern": "localhost:5173"
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"presentation": {
|
|
136
|
-
"reveal": "always",
|
|
137
|
-
"panel": "dedicated",
|
|
138
|
-
"clear": false,
|
|
139
|
-
"close": true
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"label": "Stop Vite Desktop Server",
|
|
144
|
-
"type": "shell",
|
|
145
|
-
"command": "pkill -f 'vite' 2>/dev/null; pkill -f 'npm run dev' 2>/dev/null; exit 0",
|
|
146
|
-
"presentation": {
|
|
147
|
-
"reveal": "never",
|
|
148
|
-
"panel": "dedicated",
|
|
149
|
-
"close": true
|
|
150
|
-
}
|
|
151
117
|
}
|
|
152
118
|
]
|
|
153
119
|
}
|
|
@@ -100,26 +100,89 @@ jobs:
|
|
|
100
100
|
with open(manifest, 'w') as f:
|
|
101
101
|
f.write(content)
|
|
102
102
|
|
|
103
|
-
# Tauri may generate styles.xml or themes.xml
|
|
103
|
+
# Tauri may generate styles.xml or themes.xml, and both a light (values/)
|
|
104
|
+
# and dark (values-night/) variant — patch every variant we find so the
|
|
105
|
+
# fullscreen flag doesn't silently no-op when the device is in dark mode.
|
|
104
106
|
styles_candidates = (
|
|
105
|
-
glob.glob('src-tauri/gen/android/app/src/main/res/values
|
|
106
|
-
glob.glob('src-tauri/gen/android/app/src/main/res/values
|
|
107
|
+
glob.glob('src-tauri/gen/android/app/src/main/res/values*/styles.xml') +
|
|
108
|
+
glob.glob('src-tauri/gen/android/app/src/main/res/values*/themes.xml')
|
|
107
109
|
)
|
|
108
110
|
if not styles_candidates:
|
|
109
111
|
print('Warning: no styles.xml/themes.xml found, skipping fullscreen patch')
|
|
110
112
|
else:
|
|
111
|
-
styles
|
|
112
|
-
|
|
113
|
+
for styles in styles_candidates:
|
|
114
|
+
with open(styles) as f:
|
|
115
|
+
content = f.read()
|
|
116
|
+
# Hide status bar (fullscreen) — kept as a best-effort theme hint,
|
|
117
|
+
# but on targetSdk 35+ (edge-to-edge is enforced by the OS) this
|
|
118
|
+
# alone has no effect; the real fix is the MainActivity.kt patch below.
|
|
119
|
+
content = content.replace(
|
|
120
|
+
'</style>',
|
|
121
|
+
' <item name="android:windowFullscreen">true</item>\n </style>',
|
|
122
|
+
1
|
|
123
|
+
)
|
|
124
|
+
with open(styles, 'w') as f:
|
|
125
|
+
f.write(content)
|
|
126
|
+
print(f'Patched {styles}')
|
|
127
|
+
|
|
128
|
+
# Since this project's Android template targets SDK 35+, edge-to-edge display
|
|
129
|
+
# is enforced by the OS and the theme-based windowFullscreen flag above no
|
|
130
|
+
# longer hides the status bar (it's always drawn, transparent, over the
|
|
131
|
+
# content). The only reliable way to hide it is to hide the system bars at
|
|
132
|
+
# runtime via WindowInsetsControllerCompat in MainActivity.kt.
|
|
133
|
+
activity_candidates = glob.glob(
|
|
134
|
+
'src-tauri/gen/android/app/src/main/**/MainActivity.kt', recursive=True
|
|
135
|
+
)
|
|
136
|
+
if not activity_candidates:
|
|
137
|
+
print('WARNING: MainActivity.kt not found — status bar hiding NOT patched')
|
|
138
|
+
else:
|
|
139
|
+
activity = activity_candidates[0]
|
|
140
|
+
with open(activity) as f:
|
|
113
141
|
content = f.read()
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
142
|
+
|
|
143
|
+
new_imports = [
|
|
144
|
+
'androidx.core.view.WindowCompat',
|
|
145
|
+
'androidx.core.view.WindowInsetsCompat',
|
|
146
|
+
'androidx.core.view.WindowInsetsControllerCompat',
|
|
147
|
+
]
|
|
148
|
+
import_lines = list(re.finditer(r'^import .+$', content, re.MULTILINE))
|
|
149
|
+
if import_lines:
|
|
150
|
+
insert_at = import_lines[-1].end()
|
|
151
|
+
addition = ''.join(
|
|
152
|
+
f'\nimport {imp}' for imp in new_imports if imp not in content
|
|
153
|
+
)
|
|
154
|
+
content = content[:insert_at] + addition + content[insert_at:]
|
|
155
|
+
|
|
156
|
+
if 'hideSystemBars' not in content:
|
|
157
|
+
content = content.replace(
|
|
158
|
+
'super.onCreate(savedInstanceState)',
|
|
159
|
+
'super.onCreate(savedInstanceState)\n hideSystemBars()',
|
|
160
|
+
1
|
|
161
|
+
)
|
|
162
|
+
content = re.sub(
|
|
163
|
+
r'\n}\s*$',
|
|
164
|
+
'\n\n'
|
|
165
|
+
' override fun onWindowFocusChanged(hasFocus: Boolean) {\n'
|
|
166
|
+
' super.onWindowFocusChanged(hasFocus)\n'
|
|
167
|
+
' if (hasFocus) {\n'
|
|
168
|
+
' hideSystemBars()\n'
|
|
169
|
+
' }\n'
|
|
170
|
+
' }\n'
|
|
171
|
+
'\n'
|
|
172
|
+
' private fun hideSystemBars() {\n'
|
|
173
|
+
' WindowCompat.setDecorFitsSystemWindows(window, false)\n'
|
|
174
|
+
' val controller = WindowInsetsControllerCompat(window, window.decorView)\n'
|
|
175
|
+
' controller.hide(WindowInsetsCompat.Type.systemBars())\n'
|
|
176
|
+
' controller.systemBarsBehavior =\n'
|
|
177
|
+
' WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE\n'
|
|
178
|
+
' }\n'
|
|
179
|
+
'}\n',
|
|
180
|
+
content,
|
|
181
|
+
count=1
|
|
182
|
+
)
|
|
183
|
+
with open(activity, 'w') as f:
|
|
121
184
|
f.write(content)
|
|
122
|
-
print(f'Patched {
|
|
185
|
+
print(f'Patched {activity} (hide system bars at runtime)')
|
|
123
186
|
PYEOF
|
|
124
187
|
|
|
125
188
|
- name: build Android app
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@base-ui/react": "^1.6.0",
|
|
27
|
-
"@drincs/nqtr": "^1.0.
|
|
28
|
-
"@drincs/pixi-vn": "^1.8.
|
|
27
|
+
"@drincs/nqtr": "^1.0.3",
|
|
28
|
+
"@drincs/pixi-vn": "^1.8.25",
|
|
29
29
|
"@tailwindcss/vite": "^4.3.0",
|
|
30
30
|
"@tanstack/hotkeys": "^0.8.0",
|
|
31
31
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
@@ -14,16 +14,7 @@ export const manifest: AssetsManifest = {
|
|
|
14
14
|
...generatedManifestJson.bundles,
|
|
15
15
|
{
|
|
16
16
|
name: AUDIO_BUNDLE_NAME,
|
|
17
|
-
assets: [
|
|
18
|
-
{
|
|
19
|
-
alias: "bgm_cheerful",
|
|
20
|
-
src: "https://raw.githubusercontent.com/DRincs-Productions/pixi-vn-bucket/refs/heads/main/audio/bgm_cheerful.wav",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
alias: "sfx_whoosh",
|
|
24
|
-
src: "https://raw.githubusercontent.com/DRincs-Productions/pixi-vn-bucket/refs/heads/main/audio/sfx_whoosh.wav",
|
|
25
|
-
},
|
|
26
|
-
],
|
|
17
|
+
assets: [],
|
|
27
18
|
},
|
|
28
19
|
// screens
|
|
29
20
|
{
|
|
@@ -31,7 +22,7 @@ export const manifest: AssetsManifest = {
|
|
|
31
22
|
assets: [
|
|
32
23
|
{
|
|
33
24
|
alias: "background_main_menu",
|
|
34
|
-
src: "https://
|
|
25
|
+
src: "https://pub-72ff059a2c6642fb9eab15df80fb3b45.r2.dev/main-menu.png",
|
|
35
26
|
},
|
|
36
27
|
],
|
|
37
28
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { About } from "@/components/menus/settings/about";
|
|
2
2
|
import { DialoguesControls } from "@/components/menus/settings/dialogues-controls";
|
|
3
3
|
import { ControlsListSettingsPage } from "@/components/menus/settings/menus/controls";
|
|
4
|
+
import { DiagnosticsSettingsPage } from "@/components/menus/settings/menus/diagnostics";
|
|
4
5
|
import { HistoryListSettingsPage } from "@/components/menus/settings/menus/history";
|
|
5
6
|
import { SaveLoadSettingsPage } from "@/components/menus/settings/menus/save-load";
|
|
6
7
|
import { QuickMenus } from "@/components/menus/settings/quick-menus";
|
|
@@ -23,7 +24,7 @@ import { ArrowLeftIcon } from "lucide-react";
|
|
|
23
24
|
import { Fragment } from "react";
|
|
24
25
|
import { useTranslation } from "react-i18next";
|
|
25
26
|
|
|
26
|
-
type SettingsTabPath = "menus/controls" | "menus/history" | "menus/save-load";
|
|
27
|
+
type SettingsTabPath = "menus/controls" | "menus/history" | "menus/save-load" | "menus/diagnostics";
|
|
27
28
|
|
|
28
29
|
type BreadcrumbEntry = {
|
|
29
30
|
id: string;
|
|
@@ -38,7 +39,8 @@ export function Settings() {
|
|
|
38
39
|
const normalizedTab: SettingsTabPath | undefined =
|
|
39
40
|
currentTab === "menus/controls" ||
|
|
40
41
|
currentTab === "menus/history" ||
|
|
41
|
-
currentTab === "menus/save-load"
|
|
42
|
+
currentTab === "menus/save-load" ||
|
|
43
|
+
currentTab === "menus/diagnostics"
|
|
42
44
|
? (currentTab as SettingsTabPath)
|
|
43
45
|
: undefined;
|
|
44
46
|
|
|
@@ -55,7 +57,8 @@ export function Settings() {
|
|
|
55
57
|
if (
|
|
56
58
|
normalizedTab === "menus/controls" ||
|
|
57
59
|
normalizedTab === "menus/history" ||
|
|
58
|
-
normalizedTab === "menus/save-load"
|
|
60
|
+
normalizedTab === "menus/save-load" ||
|
|
61
|
+
normalizedTab === "menus/diagnostics"
|
|
59
62
|
) {
|
|
60
63
|
trail.push({ id: "menus", label: t("menus") });
|
|
61
64
|
trail.push({
|
|
@@ -64,13 +67,17 @@ export function Settings() {
|
|
|
64
67
|
? "menus-controls"
|
|
65
68
|
: normalizedTab === "menus/history"
|
|
66
69
|
? "menus-history"
|
|
67
|
-
: "menus
|
|
70
|
+
: normalizedTab === "menus/save-load"
|
|
71
|
+
? "menus-save-load"
|
|
72
|
+
: "menus-diagnostics",
|
|
68
73
|
label:
|
|
69
74
|
normalizedTab === "menus/controls"
|
|
70
75
|
? t("hotkeys_menu")
|
|
71
76
|
: normalizedTab === "menus/history"
|
|
72
77
|
? t("history")
|
|
73
|
-
:
|
|
78
|
+
: normalizedTab === "menus/save-load"
|
|
79
|
+
? `${t("save")}/${t("load")}`
|
|
80
|
+
: t("diagnostics"),
|
|
74
81
|
});
|
|
75
82
|
}
|
|
76
83
|
return trail;
|
|
@@ -112,7 +119,8 @@ export function Settings() {
|
|
|
112
119
|
if (
|
|
113
120
|
normalizedTab === "menus/controls" ||
|
|
114
121
|
normalizedTab === "menus/history" ||
|
|
115
|
-
normalizedTab === "menus/save-load"
|
|
122
|
+
normalizedTab === "menus/save-load" ||
|
|
123
|
+
normalizedTab === "menus/diagnostics"
|
|
116
124
|
) {
|
|
117
125
|
return (
|
|
118
126
|
<>
|
|
@@ -130,6 +138,7 @@ export function Settings() {
|
|
|
130
138
|
{normalizedTab === "menus/controls" ? <ControlsListSettingsPage /> : null}
|
|
131
139
|
{normalizedTab === "menus/history" ? <HistoryListSettingsPage /> : null}
|
|
132
140
|
{normalizedTab === "menus/save-load" ? <SaveLoadSettingsPage /> : null}
|
|
141
|
+
{normalizedTab === "menus/diagnostics" ? <DiagnosticsSettingsPage /> : null}
|
|
133
142
|
</>
|
|
134
143
|
);
|
|
135
144
|
}
|