Skip to content

Commit

Permalink
UI|Client: Sort and style variable names in model asset editor
Browse files Browse the repository at this point in the history
Used variables are shown in bold.
  • Loading branch information
skyjake committed Jan 2, 2016
1 parent 5041b90 commit a490f61
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions doomsday/apps/client/src/ui/editors/modelasseteditor.cpp
Expand Up @@ -279,10 +279,17 @@ DENG_GUI_PIMPL(ModelAssetEditor)
.shaderDefinition(*pass.program);

// Check the variable declarations.
auto vars = ScriptedInfo::subrecordsOfType(QStringLiteral("variable"), shaderDef);
auto vars = ScriptedInfo::subrecordsOfType(QStringLiteral("variable"), shaderDef).keys();
qSort(vars);
QStringList names;
for(String const &n : vars.keys()) names << n;

for(String const &n : vars)
{
// Used variables are shown in bold.
if(rec.has(n))
names << _E(b) + n + _E(.);
else
names << n;
}
String msg = QString(_E(Ta)_E(l) "Shader: " _E(.)_E(Tb) "%1\n"
_E(Ta)_E(l) "Variables: " _E(.)_E(Tb) "%2")
.arg(shaderName)
Expand Down

0 comments on commit a490f61

Please sign in to comment.