[glass] Shorten SmartDashboard window names (#3096)

Instead of "/SmartDashboard/name" they now default to "name (SmartDashboard)".
This allows for smaller windows while preserving the name without requiring
user customization.
This commit is contained in:
Peter Johnson
2021-01-17 20:33:42 -08:00
committed by GitHub
parent cfdb3058ee
commit 4488e25f16
3 changed files with 9 additions and 2 deletions

View File

@@ -50,7 +50,8 @@ void Window::Display() {
char label[128];
std::snprintf(label, sizeof(label), "%s###%s",
m_name.empty() ? m_id.c_str() : m_name.c_str(), m_id.c_str());
m_name.empty() ? m_defaultName.c_str() : m_name.c_str(),
m_id.c_str());
if (Begin(label, &m_visible, m_flags)) {
if (m_renamePopupEnabled) {