Exemple #1
0
 public void ToggleTorch(bool enable)
 {
     if (FlashToggle && CameraSettings)
     {
         CameraSettings.SwitchFlashTorch(enable);
         // Update UI toggle status (ON/OFF) in case the flash switch failed
         FlashToggle.isOn = CameraSettings.IsFlashTorchEnabled();
     }
 }
    public void ToggleTorch()
    {
        Toggle flashToggle = FindUISelectableWithText <Toggle>("Flash");

        if (flashToggle && mCamSettings)
        {
            mCamSettings.SwitchFlashTorch(flashToggle.isOn);

            // Update UI toggle status (ON/OFF) in case the flash switch failed
            flashToggle.isOn = mCamSettings.IsFlashTorchEnabled();
        }
    }
Exemple #3
0
    public void UpdateUI()
    {
        Toggle extTrackingToggle = FindUISelectableWithText <Toggle>("Extended");

        if (extTrackingToggle && mTrackableSettings)
        {
            extTrackingToggle.isOn = mTrackableSettings.IsExtendedTrackingEnabled();
        }

        Toggle flashToggle = FindUISelectableWithText <Toggle>("Flash");

        if (flashToggle && mCamSettings)
        {
            flashToggle.isOn = mCamSettings.IsFlashTorchEnabled();
        }

        Toggle autofocusToggle = FindUISelectableWithText <Toggle>("Autofocus");

        if (autofocusToggle && mCamSettings)
        {
            autofocusToggle.isOn = mCamSettings.IsAutofocusEnabled();
        }
    }