System view zoom and dynamic IL2CPP field offsets#34
Merged
Conversation
…position - Start window invisible (visible: false in tauri.conf.json) and defer show() until the Moved event confirms that set_position has been applied - On macOS, set_position dispatches async on the main queue, so calling show() immediately would display the window at the default position before the move completes - Extract show_window() helper to deduplicate show + DevTools logic
- Add il2cpp_class_get_field_from_name and il2cpp_field_get_offset to the IL2CPP API bindings (api.rs, types.rs) - Add resolve_field_offset() convenience wrapper in resolver.rs - Add read_f32 helper to tracker.rs - Migrate all 8 hardcoded offsets across 5 hook modules to dynamic IL2CPP reflection at install(): - ui_scale: ScreenManager.m_canvasRootScaler, CanvasScaler.m_ScaleFactor - chat_frame: ChatPreviewController._focusedPanel - spacebar: _visibilityController, _state, _scanEngageButtonsWidget - job_queue: JobQueuePanelViewController._listCollapsed - toast_banner: Toast.<State>k__BackingField - Each offset is cached in an AtomicUsize with graceful degradation (offset 0 = unresolved, hook logic skips safely) - Offsets no longer break on game updates that change class layouts
- Hook SetViewParameters to extend zoom-out limit via OverrideZoomLimits API - Two new settings sliders: System Zoom (100-3000) and Ship Names Visible (1000-3000) - smax calculated from visibility setting using empirical formula (visibility - 200) / 0.4 - Live update via WebSocket: both sliders take effect without switching systems - Guard against partial field resolution: skip OverrideZoomLimits if _minimum unresolved
- Move banner settings from game.ui to game.banners (disable_all, disabled_types) - Raise system zoom minimum and default from 100/300 to 1000/1000 - Fix WebKit user-select: apply -webkit-user-select: none on all elements - Fix save() race condition: capture settings path at call time, not in thread - Align settings label width (12rem) so all sliders start at the same position - Reorder GameUiSettings fields to match UI layout (sliders before toggles)
- Add system view zoom, job queue auto-expand, and toast banner suppression to feature list - Add dynamic version badge from GitHub releases to both README headings - Bump version to 0.5.0 in package.json, rust-mod/Cargo.toml, and backend/Cargo.toml
On Windows, set_position() is synchronous and the Moved event does not fire during setup() because the event loop is not yet running. The deferred-show mechanism introduced for macOS left the window permanently invisible. Show the window directly on platforms where set_position() completes inline.
- SetViewParameters is inlined by MSVC on Windows (zero CALL references in GameAssembly.dll), so the hook never fires - SetDepth is called from the inlined copies (9 live call sites) - SetViewParameters delegates to SetDepth on all platforms, so this is the robuster hook target also on macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
il2cpp_class_get_field_from_name+il2cpp_field_get_offset, making the mod resilient to game updatesOverrideZoomLimitsAPIgame.uitogame.bannersfor cleaner TOML structuresave()race condition where the debounced write thread could resolve the settings path after a test reset, corrupting the real settings fileuser-selectfor Tauri on macOS (requires-webkit-prefix on all elements)Test plan
[game.banners], not[game.ui]