partial void ColourConfirm_TouchUpInside(UIButton sender) { // set bounding box color same as the previewed colour choosed by user and close colour picker popup if (_lastTappedColorButton != null) { var oldColour = _originalColour; var newColour = _lastTappedColorButton.BackgroundColor; ClickedButton.BackgroundColor = newColour; _originalColour = newColour.CGColor; ResetBoundingBoxColour(_lastTappedColorButton); RootResultsViewController.UpdateTitleForUnsaved(); // Notify the sidebar table view that the colour has been changed if (!oldColour.Equals(newColour.CGColor)) { ParentTableView.NotifyBoundingBoxColourDidChange(oldColour, newColour.CGColor, Category.Text); ParentTableView.ParentResultsViewController.NotifyColorChanged(Category.Text, newColour.ToSKColor()); } FilterViewController.ConfigureColourButtonVoiceoverAccessibilityAttributes(ClickedButton, newColour.CGColor); } // Dismiss view controller DismissModalViewController(false); }
public void ShowFilterView(string title, List <FilterViewOption> options, OnOptionSelectedDelegate onOptionSelectedDelegate) { DestroyCurrentFilterViewController(); _currentFilterViewController = Instantiate(FilterViewPrefab, transform); _currentFilterViewController.Load(title, options, onOptionSelectedDelegate); }
private static void ConfigureBarChartLegendAccessibilityAttributes(UIButton circle, UILabel text) { circle.IsAccessibilityElement = true; circle.UserInteractionEnabled = true; circle.AccessibilityTraits = UIAccessibilityTrait.StaticText; var colourNumber = FilterViewController.GetColorVoiceOverEncoding(circle.BackgroundColor.CGColor); circle.AccessibilityLabel = string.Format(AccessibilityConstants.TimelineLegendColorButtonAccessibilityLabel, colourNumber); text.AccessibilityHint = AccessibilityConstants.BarAccessibilityHint; text.IsAccessibilityElement = true; text.UserInteractionEnabled = true; text.AccessibilityTraits = UIAccessibilityTrait.Button; text.AccessibilityLabel = text.Text; }
/// <summary> /// Encoding all colour choice buttons that are not "cancel" or "confirm" to a voice over as colour #1, colour #2 ... /// </summary> private void EnableColorChoiceEncodingVoiceOver() { foreach (var subview in View.Subviews[0].Subviews) { if (subview is UIButton && subview.Tag != ColorConfirm.Tag && subview.Tag != ColorCancel.Tag) { var colorChoiceButton = (UIButton)(subview); var colorNumber = FilterViewController.GetColorVoiceOverEncoding(colorChoiceButton.BackgroundColor.CGColor); colorChoiceButton.AccessibilityLabel = string.Format(CultureInfo.CurrentCulture, AccessibilityConstants.ColorPickerColorButtonAccessibilityLabel, colorNumber); colorChoiceButton.AccessibilityHint = AccessibilityConstants.ColorPickerColorButtonAccessibilityHint; colorChoiceButton.AccessibilityTraits = UIAccessibilityTrait.SummaryElement; } } }
public void FilterButtonPressed() { if (_filterViewController == null) { _filterViewController = new GameObject("FilterViewController").AddComponent <FilterViewController>(); _filterViewController.BackButtonPressed += DismissFilterViewController; _filterViewController.LevelsModified += FilterViewControllerSetFilteredSongs; _filterViewController.FiltersUnapplied += FilterViewControllerFiltersUnapplied; } if (_lastPack == null || LevelsViewController.levelPack.packName != FilteredSongsPackName) { _lastPack = LevelsViewController.levelPack; } IPreviewBeatmapLevel[] levels = _lastPack.beatmapLevelCollection.beatmapLevels; _filterViewController.Activate(_freePlayFlowCoordinator, levels); Logger.log.Debug("'Filter' button pressed."); }
protected void ShowFilterController(FilterViewController filter) { var nav = new UINavigationController(filter); PresentViewController(nav, true, null); }