feat(ui): add get_battery_warning_visible() getter to settings_dialog
Testable API for Hoshe's battery warning visibility assertions (#646). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -314,6 +314,13 @@ func is_ai_inference_suspended() -> bool:
|
||||
return _ai_inference_suspended
|
||||
|
||||
|
||||
## Returns true if the battery warning label is currently visible.
|
||||
func get_battery_warning_visible() -> bool:
|
||||
if _ai_battery_warning_label == null:
|
||||
return false
|
||||
return _ai_battery_warning_label.visible
|
||||
|
||||
|
||||
## Update battery suspension display state.
|
||||
## Shows/hides the battery warning label; toggle stays enabled — player autonomy wins (D-138).
|
||||
## Called when PlatformInfo.power_profile_changed fires (via main.gd or HardwareDetector).
|
||||
|
||||
Reference in New Issue
Block a user