mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Add methods to change the selected tab in the Shuffleboard app (#1448)
This commit is contained in:
committed by
Peter Johnson
parent
a60f312d19
commit
6f0c185a05
@@ -19,6 +19,12 @@ ShuffleboardTab& Shuffleboard::GetTab(wpi::StringRef title) {
|
||||
return GetInstance().GetTab(title);
|
||||
}
|
||||
|
||||
void Shuffleboard::SelectTab(int index) { GetInstance().SelectTab(index); }
|
||||
|
||||
void Shuffleboard::SelectTab(wpi::StringRef title) {
|
||||
GetInstance().SelectTab(title);
|
||||
}
|
||||
|
||||
void Shuffleboard::EnableActuatorWidgets() {
|
||||
GetInstance().EnableActuatorWidgets();
|
||||
}
|
||||
|
||||
@@ -72,3 +72,11 @@ void ShuffleboardInstance::DisableActuatorWidgets() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShuffleboardInstance::SelectTab(int index) {
|
||||
m_impl->rootMetaTable->GetEntry("Selected").ForceSetDouble(index);
|
||||
}
|
||||
|
||||
void ShuffleboardInstance::SelectTab(wpi::StringRef title) {
|
||||
m_impl->rootMetaTable->GetEntry("Selected").ForceSetString(title);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user