mirror of
https://github.com/forkless/NotAlterra.git
synced 2026-08-19 17:43:34 +02:00
Complete inline doc comments for all public functions
This commit is contained in:
Generated
+1
-1
@@ -440,7 +440,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "notalterra"
|
||||
version = "0.2.0"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
||||
@@ -13,6 +13,8 @@ use std::path::{Path, PathBuf};
|
||||
// ── process detection ──────────────────────────────────────────────────────
|
||||
|
||||
/// Return `true` if Subnautica 2 appears to be running.
|
||||
/// Check if Subnautica 2 is currently running (Windows).
|
||||
/// Process detection is disabled — returns `false` to avoid AV false positives.
|
||||
#[cfg(target_os = "windows")]
|
||||
pub fn game_running() -> bool {
|
||||
// Process detection disabled — avoid AV false-positives.
|
||||
@@ -30,6 +32,8 @@ fn _game_running_windows() -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if Subnautica 2 is currently running (Linux).
|
||||
/// Process detection is disabled — always returns `false` to avoid AV false positives.
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
pub fn game_running() -> bool {
|
||||
false
|
||||
|
||||
@@ -232,6 +232,8 @@ pub fn draw_confirm_popup(
|
||||
draw_whale_separator(f, bar, app);
|
||||
}
|
||||
|
||||
/// Render a simple informational dialog with a message.
|
||||
/// Shows title, body text, and an OK button.
|
||||
pub fn draw_ok_dialog(f: &mut Frame, app: &AppState, title: &str, message: &str) {
|
||||
let content_w = message.lines().map(|l| l.len()).max().unwrap_or(20).max(title.len()) as u16 + 10;
|
||||
let popup_w = content_w.max(50).min(f.area().width.saturating_sub(4));
|
||||
@@ -252,6 +254,7 @@ pub fn draw_ok_dialog(f: &mut Frame, app: &AppState, title: &str, message: &str)
|
||||
draw_whale_separator(f, bar, app);
|
||||
}
|
||||
|
||||
/// Render a dialog with styled content lines.\n/// Supports inline formatting (colors, bold) via [`Line`].
|
||||
pub fn draw_ok_dialog_styled(f: &mut Frame, app: &AppState, title: &str, lines: &[Line]) {
|
||||
let content_w = lines.iter().map(|l| l.width() as u16).max().unwrap_or(20).max(title.len() as u16) + 10;
|
||||
let popup_w = content_w.max(50).min(f.area().width.saturating_sub(4));
|
||||
|
||||
Reference in New Issue
Block a user