Skip to content

Commit 802daea

Browse files
author
Bianca Marina Stana
committed
Removed all logging
1 parent 359423e commit 802daea

File tree

7 files changed

+0
-83
lines changed

7 files changed

+0
-83
lines changed

Assets/Scripts/Screen Reader/UITk/Handlers/BasePopupFieldHandler.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public BasePopupFieldHandler()
2020
evt.target = ownerElement;
2121
ownerElement.SendEvent(evt);
2222

23-
OnScreenDebug.Log("Submit event sent to " + ownerElement.name);
24-
2523
return true;
2624
};
2725
}
@@ -46,15 +44,11 @@ protected override void UnbindFromElement(VisualElement element)
4644

4745
void OnNavigationSubmit(NavigationSubmitEvent evt)
4846
{
49-
OnScreenDebug.Log("Submit event received by " + ownerElement.name);
50-
5147
ScheduledCheckForOpenedPopupMenu();
5248
}
5349

5450
void OnPointerDown(PointerDownEvent evt)
5551
{
56-
OnScreenDebug.Log("Pointer Down event " + ownerElement.name);
57-
5852
ScheduledCheckForOpenedPopupMenu();
5953
}
6054

@@ -85,8 +79,6 @@ void CheckForOpenedPopupMenu()
8579
var panelRootVisualElement = panel.visualTree;
8680
var popupMenu = panelRootVisualElement.Q(classes: GenericDropdownMenu.ussClassName);
8781

88-
OnScreenDebug.Log("Showing popup menu: " + (popupMenu != null));
89-
9082
if (popupMenu != null)
9183
{
9284
var popupAcc = popupMenu.GetOrCreateAccessibleProperties();
@@ -101,7 +93,6 @@ void CheckForOpenedPopupMenu()
10193
var items = popupMenu.Query(classes: GenericDropdownMenu.itemUssClassName).ToList();
10294
var i = 0;
10395

104-
OnScreenDebug.Log("Item count : " + items.Count);
10596
foreach (var item in items)
10697
{
10798
// if (item.GetAccessibleProperties() != null)

Assets/Scripts/Screen Reader/UITk/Handlers/DropdownFieldHandler.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public DropdownFieldHandler()
2020
evt.target = ownerElement;
2121
ownerElement.SendEvent(evt);
2222

23-
OnScreenDebug.Log("Submit event sent to " + ownerElement.name);
24-
2523
return true;
2624
};
2725
}
@@ -46,14 +44,11 @@ protected override void UnbindFromElement(VisualElement element)
4644

4745
void OnNavigationSubmit(NavigationSubmitEvent evt)
4846
{
49-
OnScreenDebug.Log("Submit event received by " + ownerElement.name);
5047
ScheduledCheckForOpenedPopupMenu();
5148
}
5249

5350
void OnPointerDown(PointerDownEvent evt)
5451
{
55-
OnScreenDebug.Log("Pointer Down event " + ownerElement.name);
56-
5752
ScheduledCheckForOpenedPopupMenu();
5853
}
5954

@@ -84,8 +79,6 @@ void CheckForOpenedPopupMenu()
8479
var panelRootVisualElement = panel.visualTree;
8580
var popupMenu = panelRootVisualElement.Q(classes: GenericDropdownMenu.ussClassName);
8681

87-
OnScreenDebug.Log("Showing popup menu: " + (popupMenu != null));
88-
8982
if (popupMenu != null)
9083
{
9184
var popupAcc = popupMenu.GetOrCreateAccessibleProperties();
@@ -100,7 +93,6 @@ void CheckForOpenedPopupMenu()
10093
var items = popupMenu.Query(classes: GenericDropdownMenu.itemUssClassName).ToList();
10194
var i = 0;
10295

103-
OnScreenDebug.Log("Item count : " + items.Count);
10496
foreach (var item in items)
10597
{
10698
// if (item.GetAccessibleProperties() != null)

Assets/Scripts/Screen Reader/UITk/Handlers/ScrollViewHandler.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,11 @@ protected override void UnbindFromElement(VisualElement ve)
3232

3333
void OnScrollValueChanged(ChangeEvent<float> evt)
3434
{
35-
// OnScreenDebug.Log("ScrollView value changed " + evt.newValue);
36-
3735
NotifyChange(VersionChangeType.Transform | VersionChangeType.Layout);
3836
}
3937

4038
void OnGeometryChanged(GeometryChangedEvent evt)
4139
{
42-
// OnScreenDebug.Log("Geometry Changed " + evt.target + " old: " + (evt.target as VisualElement).layout);
43-
// OnScreenDebug.Log("Geometry Changed " + evt.target + " old: " + evt.oldRect + " new: " + evt.newRect);
44-
4540
NotifyChange(VersionChangeType.Transform | VersionChangeType.Layout);
4641
}
4742
}

Assets/Scripts/Screen Reader/UITk/UITkAccessibilityService.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ void CreateVisualTreeUpdaterForPanel(IPanel panel, VisualElement visualTree, UIT
150150

151151
public override void SetUp(Scene scene)
152152
{
153-
// OnScreenDebug.Log("Start Setup UITkAccessibilityService for scene " + scene.name);
154-
155153
var uiDocuments = Object.FindObjectsByType<UIDocument>(FindObjectsInactive.Include,
156154
FindObjectsSortMode.None);
157155

@@ -185,8 +183,6 @@ public override void SetUp(Scene scene)
185183
}
186184
}
187185

188-
// OnScreenDebug.Log("Generating UITk Nodes Panel " + panels.Count);
189-
190186
for (var i = 0; i < panels.Count; i++)
191187
{
192188
var panel = panels[i];

Assets/Scripts/Screen Reader/UITk/VisualTreeAccessibilityUpdater.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ public VisualElement visualTree
8181

8282
if (m_VisualTree != null)
8383
{
84-
// OnScreenDebug.Log("m_VisualTree.visualTree");
85-
8684
m_UpdateJob = m_VisualTree.schedule.Execute(Update).Every(100);
8785
}
8886
}
@@ -96,13 +94,6 @@ public VisualElement visualTree
9694
/// <param name="service"></param>
9795
public VisualTreeAccessibilityUpdater(IPanel panel, VisualElement visualTree, UITkAccessibilityService service)
9896
{
99-
OnScreenDebug.Log("Create Updater for panel " + m_UpdaterInstanceId);
100-
101-
if (m_UpdaterInstanceId == 4)
102-
{
103-
Debug.Log("Break here " + panel);
104-
}
105-
10697
this.panel = panel;
10798
this.visualTree = visualTree;
10899
hierarchy = default;
@@ -119,15 +110,11 @@ void OnGeometryChanged(GeometryChangedEvent evt)
119110
{
120111
DirtyRootFrame();
121112

122-
// OnScreenDebug.Log("OnGeometryChanged " + evt.target);
123-
124113
OnVersionChanged(evt.target as VisualElement, VersionChangeType.Size | VersionChangeType.Transform);
125114
}
126115

127116
void OnAttachmentToPanel(AttachToPanelEvent evt)
128117
{
129-
// OnScreenDebug.Log("OnAttachmentToPanel " + evt.target);
130-
131118
m_Version++;
132119
}
133120

@@ -210,8 +197,6 @@ void InsertNode(VisualElementAccessibilityHandler parentHandler, VisualElementAc
210197
{
211198
m_RootNextInsertionIndex++;
212199
}
213-
214-
// OnScreenDebug.Log("InsertNode: " + node.id + " \"" + node.label + "\" Role:" + node.role + " State:" + node.state);
215200
}
216201

217202
bool MoveNode(VisualElementAccessibilityHandler parentHandler, VisualElementAccessibilityHandler accHandler)
@@ -229,8 +214,6 @@ bool MoveNode(VisualElementAccessibilityHandler parentHandler, VisualElementAcce
229214
m_RootNextInsertionIndex++;
230215
}
231216

232-
// OnScreenDebug.Log("MoveNode: " + accHandler.node.id + " \"" + accHandler.node.label + "\" At:" + index);
233-
234217
return moved;
235218
}
236219

@@ -277,8 +260,6 @@ public void Dispose()
277260
visualTree.UnregisterCallback<GeometryChangedEvent>(OnGeometryChanged);
278261
visualTree.UnregisterCallback<AttachToPanelEvent>(OnAttachmentToPanel);
279262
m_VisualTree = null;
280-
281-
// OnScreenDebug.Log("Dispose VisualTreeAccessibilityUpdater " + m_UpdaterInstanceId);
282263
}
283264

284265
void OnDetachFromPanel(DetachFromPanelEvent evt)
@@ -462,16 +443,11 @@ internal void UpdateNode(VisualElementAccessibilityHandler accElement)
462443

463444
public void OnVersionChanged(VisualElement ve, VersionChangeType versionChangeType)
464445
{
465-
// OnScreenDebug.Log("OnVersionChanged " + ve + " " + versionChangeType);
466-
467446
if (ve != null && !OnVersionChangedInternal(ve, versionChangeType))
468447
{
469-
OnScreenDebug.Log("Event ignore version changed");
470448
return;
471449
}
472450

473-
// OnScreenDebug.Log("Finished version changed " + m_Version + " - " + m_UpdaterInstanceId);
474-
475451
++m_Version;
476452
}
477453

@@ -583,7 +559,6 @@ void Update(VisualElement visualTree)
583559
// active state of all nodes.
584560
if (currentModalElement != null || currentModalElement != modalElement)
585561
{
586-
OnScreenDebug.Log("Updating active state from modality " + currentModalElement?.name);
587562
UpdateActiveStateFromModalityRecursively(visualTree);
588563
}
589564
}

Assets/Scripts/UITk/Card.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ public void Select()
7272
cardListView.selectedCard = this;
7373

7474
accessible.hint = LocalizationSettings.StringDatabase.GetLocalizedString("Game Text", "LETTER_CARD_HINT_SELECTED");
75-
76-
OnScreenDebug.Log("Selected card: " + text);
7775
}
7876
}
7977

@@ -110,11 +108,9 @@ public UITkLetterCard()
110108
if (!selected)
111109
{
112110
Select();
113-
OnScreenDebug.Log("Selected card: " + text);
114111
}
115112
else
116113
{
117-
OnScreenDebug.Log("UnSelected card: " + text);
118114
Unselect();
119115
}
120116

@@ -370,8 +366,6 @@ void MoveToIndex(int index)
370366
{
371367
var oldIndex = parent.IndexOf(this);
372368

373-
Debug.Log($"Move {this} To Index {index}");
374-
375369
if (index == parent.childCount - 1)
376370
{
377371
PlaceInFront(parent[index]);
@@ -562,8 +556,6 @@ public void DoLayout()
562556
{
563557
var i = 0;
564558

565-
// Debug.Log(" DoLayout()");
566-
567559
var cc = childCount;
568560

569561
foreach (var child in Children())
@@ -592,8 +584,6 @@ public void DoLayout()
592584
child.style.top = 0; // DON'T CENTER ANYMORE, (layout.height - cardSize) / 2;
593585
i++;
594586
}
595-
596-
// Debug.Log("EndDoLayout()");
597587
}
598588

599589
protected void RegisterCallbacksOnTarget()
@@ -627,7 +617,6 @@ public UITkLetterCard selectedCard
627617
}
628618

629619
m_SelectedCard = value;
630-
OnScreenDebug.Log("ListView selected card: " + (m_SelectedCard != null ? m_SelectedCard.text : "null"));
631620

632621
if (m_SelectedCard != null)
633622
{
@@ -640,7 +629,6 @@ void OnMouseDown(MouseDownEvent e)
640629
{
641630
m_Active = true;
642631
m_Start = e.localMousePosition;
643-
// Debug.Log("Mouse Down");
644632
}
645633

646634
void OnMouseMove(MouseMoveEvent e)
@@ -661,8 +649,6 @@ void OnMouseUp(MouseUpEvent e)
661649
{
662650
if (m_Dragging)
663651
{
664-
// Debug.Log("Mouse Up " + swipeLeft);
665-
666652
if (m_SwipeLeft)
667653
{
668654
OnSwipeLeft();

Assets/Scripts/UITk/MainView.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -269,26 +269,16 @@ UITkLetterCard accessibilityFocusedCard
269269
}
270270

271271
m_AccessibilityFocusedCard?.Blur();
272-
273-
OnScreenDebug.Log("Before Acc Focus " + (m_AccessibilityFocusedCard != null ? m_AccessibilityFocusedCard.name : "null") +
274-
" selected " + (m_LetterCardContainer.selectedCard != null ? m_LetterCardContainer.selectedCard.name : "null"));
275-
276272
m_AccessibilityFocusedCard = value;
277273

278274
// Focus on the card that has the accessibility focus if no card is currently selected.
279275
// This can happen when the user is not dragging a card and just navigating the screen reader
280276
// focus using swipe gestures.
281277
// Note: we don't want to steal the focus if the user is dragging a card.
282-
OnScreenDebug.Log("In Acc Focus " + (m_AccessibilityFocusedCard != null ? m_AccessibilityFocusedCard.name : "null") +
283-
" selected " + (m_LetterCardContainer.selectedCard != null ? m_LetterCardContainer.selectedCard.name : "null"));
284-
285278
if (m_AccessibilityFocusedCard != null && m_LetterCardContainer.selectedCard == null)
286279
{
287280
m_AccessibilityFocusedCard.Focus();
288281
}
289-
290-
OnScreenDebug.Log("After Acc Focus " + (m_AccessibilityFocusedCard != null ? m_AccessibilityFocusedCard.name : "null") +
291-
" selected " + (m_LetterCardContainer.selectedCard != null ? m_LetterCardContainer.selectedCard.name : "null"));
292282
}
293283
}
294284

@@ -503,7 +493,6 @@ void OnEnable()
503493
gameplay.stateChanged.AddListener(OnGameStateChanged);
504494

505495
AssistiveSupport.nodeFocusChanged += OnNodeFocusChanged;
506-
OnScreenDebug.Log("MainWindow.OnEnable");
507496

508497
AccessibilitySettings.boldTextStatusChanged += OnBoldTextStatusChanged;
509498
AccessibilitySettings.closedCaptioningStatusChanged += OnClosedCaptioningStatusChanged;
@@ -821,8 +810,6 @@ void MoveCard(bool shouldMoveLeft, int count = 1)
821810
return;
822811
}
823812

824-
// OnScreenDebug.Log("MoveCard " + (shouldMoveLeft ? "left" : "right" + " count " + count));
825-
826813
var updater = m_LetterCardContainer.selectedCard.panel.GetAccessibilityUpdater();
827814
var node = updater.GetNodeForVisualElement(m_LetterCardContainer.selectedCard);
828815

@@ -907,21 +894,16 @@ void MoveCard(bool shouldMoveLeft, int count = 1)
907894
void ShowSplash()
908895
{
909896
m_StackView.index = 0;
910-
OnScreenDebug.Log("Showing splash screen " + DateTime.Now);
911897

912898
Invoke(nameof(DelayShowLogin), splashScreenDuration);
913899
}
914900

915901
void DelayShowLogin()
916902
{
917-
OnScreenDebug.Log("DelayShowLogin " + DateTime.Now);
918-
919903
// m_SettingsButton.style.display = DisplayStyle.None;
920904
// m_Logo.style.display = DisplayStyle.Flex;
921905

922906
m_StackView.activeView = m_LoginView;
923-
924-
OnScreenDebug.Log("Showing Login " + DateTime.Now);
925907
}
926908

927909
void ShowLevelChoiceView()

0 commit comments

Comments
 (0)