From 3ca1a02dbfdcf48e013001036b2ddf6b6474fea4 Mon Sep 17 00:00:00 2001 From: caeyo Date: Mon, 10 Aug 2026 14:41:43 +1000 Subject: [PATCH 1/2] Add text input setting --- Cargo.lock | 37 +++++++++++++++++++++++-------------- src/main.rs | 29 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 694d9c0..6a3ff22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -737,7 +737,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -766,7 +766,7 @@ dependencies = [ "maybe-owned", "rustix 1.1.4", "rustix-linux-procfs", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "winx", ] @@ -1571,7 +1571,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1718,7 +1718,7 @@ checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" dependencies = [ "io-lifetimes", "rustix 1.1.4", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2249,7 +2249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65" dependencies = [ "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2495,7 +2495,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "livesplit-auto-splitting" version = "0.1.0" -source = "git+https://github.com/LiveSplit/livesplit-core#e483f81d6c9fa880d14d63e42a8e2ec6b982ff9c" +source = "git+https://github.com/LiveSplit/livesplit-core#377f598298f071c235080420c4f9d7172ccea642" dependencies = [ "arc-swap", "async-trait", @@ -3815,7 +3815,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3828,7 +3828,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4158,7 +4158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4249,10 +4249,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix 1.1.4", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4479,7 +4479,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -5400,7 +5400,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5538,6 +5538,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.60.2" @@ -5762,7 +5771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" dependencies = [ "bitflags 2.13.1", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/src/main.rs b/src/main.rs index 9629713..7dd70dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -657,6 +657,35 @@ impl egui_dock::TabViewer for TabViewer<'_> { } } } + settings::WidgetKind::TextInput { ref default_value } => { + ui.add_space(spacing); + + let label = ui.label(&*setting.description); + if let Some(tooltip) = &setting.tooltip { + label.on_hover_text(&**tooltip); + } + + let settings_map = runtime.settings_map(); + + let mut value = match settings_map.get(&setting.key) { + Some(settings::Value::String(s)) => s.to_string(), + _ => default_value.to_string(), + }; + + if ui.text_edit_singleline(&mut value).changed() { + loop { + let old = runtime.settings_map(); + let mut new = old.clone(); + new.insert( + setting.key.clone(), + settings::Value::String(value.clone().into()), + ); + if runtime.set_settings_map_if_unchanged(&old, new) { + break; + } + } + } + } settings::WidgetKind::FileSelect { ref filters } => { ui.add_space(spacing); let settings_map = runtime.settings_map(); From 06c7f92752470aee87a685b82cb11d5b9f2e3e0a Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Sun, 6 Sep 2026 21:46:09 +0200 Subject: [PATCH 2/2] Use runner-provided Rust toolchain --- .github/workflows/rust.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 40f583d..f58b67d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -91,11 +91,6 @@ jobs: - name: Checkout Commit uses: actions/checkout@v4 - - name: Install Rust - uses: hecrj/setup-rust-action@v2 - with: - rust-version: ${{ matrix.toolchain || 'stable' }} - - name: Install Target if: matrix.install_target != '' run: rustup target add ${{ matrix.target }} @@ -154,11 +149,6 @@ jobs: - name: Checkout Commit uses: actions/checkout@v4 - - name: Install Rust - uses: hecrj/setup-rust-action@v2 - with: - components: clippy - - name: Run Clippy run: cargo clippy --all-features @@ -168,10 +158,5 @@ jobs: - name: Checkout Commit uses: actions/checkout@v4 - - name: Install Rust - uses: hecrj/setup-rust-action@v2 - with: - components: rustfmt - - name: Run cargo fmt run: cargo fmt -- --check || true