Add in-game settings menu with web panel sync
Features: - SettingsActivity accessible via Menu button (keycode 82) - Configure server URL and mode (online/offline) in-game - Test connection before saving settings - Switch to offline mode with one tap - Sync settings from web admin panel - Real-time status messages with emoji indicators Implementation: - Created 13 SettingsActivity Smali files (main + inner classes) - Created activity_settings.xml UI layout - Added SettingsActivity to AndroidManifest.xml (portrait mode) - Modified MainActivity.smali to handle Menu button press - Integrated with existing ServerManager for Nimble SDK overrides - Settings stored in SharedPreferences (rr3_server_config.xml) APK: - Built and signed: RR3-v14-Settings-Menu.apk (103 MB) - Keystore: rr3-release.keystore (alias: rr3key) - Ready for distribution Related server changes: - ServerSettingsController.cs with 3 API endpoints - DeviceSettings.cshtml admin page - UserSettings database model and migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -2808,9 +2808,34 @@
|
||||
.end method
|
||||
|
||||
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
|
||||
.locals 1
|
||||
.locals 3
|
||||
|
||||
.line 1518
|
||||
# Check if Menu button (keycode 82) pressed
|
||||
const/16 v0, 0x52
|
||||
|
||||
if-ne p1, v0, :cond_settings_check_done
|
||||
|
||||
# Open SettingsActivity
|
||||
const-string v0, "RR3-Community"
|
||||
|
||||
const-string v1, "\u2699\ufe0f Menu button pressed - Opening Settings"
|
||||
|
||||
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
||||
|
||||
new-instance v0, Landroid/content/Intent;
|
||||
|
||||
const-class v1, Lcom/firemint/realracing/SettingsActivity;
|
||||
|
||||
invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
||||
|
||||
invoke-virtual {p0, v0}, Lcom/firemint/realracing/MainActivity;->startActivity(Landroid/content/Intent;)V
|
||||
|
||||
const/4 p1, 0x1
|
||||
|
||||
return p1
|
||||
|
||||
:cond_settings_check_done
|
||||
invoke-virtual {p0, p1, p2}, Lcom/firemint/realracing/MainActivity;->handleKeyEvent(ILandroid/view/KeyEvent;)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
Reference in New Issue
Block a user