mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 14:36:35 +00:00
Show better tooltips for constant buffers & structs
* { ... } is clearer than having just ??? show up which looks like an error.
This commit is contained in:
@@ -5649,6 +5649,10 @@ void ShaderViewer::updateVariableTooltip()
|
||||
{
|
||||
tooltip = QFormatStr("%1: ").arg(var.name) + RichResourceTextFormat(m_Ctx, stringRep(var, 0));
|
||||
}
|
||||
else if(var.type == VarType::ConstantBlock)
|
||||
{
|
||||
tooltip = QFormatStr("<pre>%1: { ... }</pre>").arg(var.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltip = QFormatStr("<pre>%1: %2\n").arg(var.name).arg(RowString(var, 0));
|
||||
@@ -5672,6 +5676,12 @@ void ShaderViewer::updateVariableTooltip()
|
||||
.arg(RichResourceTextFormat(m_Ctx, stringRep(var.members[1], 0))));
|
||||
return;
|
||||
}
|
||||
else if(!var.members.empty())
|
||||
{
|
||||
// other structs
|
||||
QToolTip::showText(m_TooltipPos, lit("{ ... }"));
|
||||
return;
|
||||
}
|
||||
|
||||
QString text = QFormatStr("<pre>%1\n").arg(var.name);
|
||||
text +=
|
||||
|
||||
Reference in New Issue
Block a user