| 511 | } |
| 512 | |
| 513 | void NestedTimingTree::Update( void ) |
| 514 | { |
| 515 | ASSERT(sm_SelectedScope != nullptr, "Corrupted profiling data structure"); |
| 516 | |
| 517 | if (sm_SelectedScope == &sm_RootScope) |
| 518 | { |
| 519 | sm_SelectedScope = sm_RootScope.FirstChild(); |
| 520 | if (sm_SelectedScope == &sm_RootScope) |
| 521 | return; |
| 522 | } |
| 523 | |
| 524 | if (GameInput::IsFirstPressed( GameInput::kDPadLeft ) |
| 525 | || GameInput::IsFirstPressed( GameInput::kKey_left )) |
| 526 | { |
| 527 | //if still on graphs go back to text |
| 528 | if (sm_CursorOnGraph) |
| 529 | sm_CursorOnGraph = !sm_CursorOnGraph; |
| 530 | else |
| 531 | sm_SelectedScope->m_IsExpanded = false; |
| 532 | } |
| 533 | else if (GameInput::IsFirstPressed( GameInput::kDPadRight ) |
| 534 | || GameInput::IsFirstPressed( GameInput::kKey_right )) |
| 535 | { |
| 536 | if (sm_SelectedScope->m_IsExpanded == true && !sm_CursorOnGraph) |
| 537 | sm_CursorOnGraph = true; |
| 538 | else |
| 539 | sm_SelectedScope->m_IsExpanded = true; |
| 540 | //if already expanded go over to graphs |
| 541 | |
| 542 | } |
| 543 | else if (GameInput::IsFirstPressed( GameInput::kDPadDown ) |
| 544 | || GameInput::IsFirstPressed( GameInput::kKey_down )) |
| 545 | { |
| 546 | sm_SelectedScope = sm_SelectedScope ? sm_SelectedScope->NextScope() : nullptr; |
| 547 | } |
| 548 | else if (GameInput::IsFirstPressed( GameInput::kDPadUp ) |
| 549 | || GameInput::IsFirstPressed( GameInput::kKey_up )) |
| 550 | { |
| 551 | sm_SelectedScope = sm_SelectedScope ? sm_SelectedScope->PrevScope() : nullptr; |
| 552 | } |
| 553 | else if (GameInput::IsFirstPressed( GameInput::kAButton ) |
| 554 | || GameInput::IsFirstPressed( GameInput::kKey_return )) |
| 555 | { |
| 556 | sm_SelectedScope->Toggle(); |
| 557 | } |
| 558 | |
| 559 | } |
| 560 | |
| 561 | void NestedTimingTree::DisplayNode( TextContext& Text, float leftMargin, float indent ) |
| 562 | { |
nothing calls this directly
no test coverage detected