mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 15:36:33 +00:00
Add some cross-linking for panels that view a single resource
* We add a button with a link icon to indicate that it goes to the resource details. We'll re-use the crosshair as a visual metaphor for any interactive widget that goes to the resource inspector. * To remove any possible confusion, we change the icon for the texture list and locked tabs in the texture viewer to not include the link.
This commit is contained in:
@@ -1724,7 +1724,7 @@ void TextureViewer::ViewTexture(ResourceId ID, bool focus)
|
||||
int idx = textureTabs->indexOf(lockedContainer);
|
||||
|
||||
if(idx >= 0)
|
||||
textureTabs->setTabIcon(idx, Icons::page_white_link());
|
||||
textureTabs->setTabIcon(idx, Icons::page_go());
|
||||
else
|
||||
qCritical() << "Couldn't get tab index of new tab to set icon";
|
||||
|
||||
@@ -3290,6 +3290,21 @@ void TextureViewer::on_viewTexBuffer_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void TextureViewer::on_resourceDetails_clicked()
|
||||
{
|
||||
TextureDescription *texptr = GetCurrentTexture();
|
||||
|
||||
if(texptr)
|
||||
{
|
||||
if(!m_Ctx.HasResourceInspector())
|
||||
m_Ctx.ShowResourceInspector();
|
||||
|
||||
m_Ctx.GetResourceInspector()->Inspect(texptr->ID);
|
||||
|
||||
ToolWindowManager::raiseToolWindow(m_Ctx.GetResourceInspector()->Widget());
|
||||
}
|
||||
}
|
||||
|
||||
void TextureViewer::on_saveTex_clicked()
|
||||
{
|
||||
TextureDescription *texptr = GetCurrentTexture();
|
||||
|
||||
Reference in New Issue
Block a user