~thalexander/unity/update-fsf-address

« back to all changes in this revision

Viewing changes to unity-shared/IconTexture.cpp

Introspectable: use IntrospectionData class for collecting data from children

Now each introspectable object is called with an IntrospectionData parameter and calling one
of its methods it's the only way to fill introspection data into unity.
As bonus point, remove all the unneeded UnityCore/Variant.cpp inclusions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <NuxCore/Logger.h>
28
28
#include <NuxGraphics/GLThread.h>
29
29
#include <UnityCore/GLibWrapper.h>
30
 
#include <UnityCore/Variant.h>
31
30
 
32
31
#include "IconLoader.h"
33
32
#include "IconTexture.h"
322
321
}
323
322
 
324
323
 
325
 
void IconTexture::AddProperties(GVariantBuilder* builder)
 
324
void IconTexture::AddProperties(debug::IntrospectionData& introspection)
326
325
{
327
 
  unity::variant::BuilderWrapper(builder)
328
 
  .add(GetGeometry())
329
 
  .add("icon_name", _icon_name);
 
326
  introspection.add(GetAbsoluteGeometry())
 
327
               .add("icon_name", _icon_name);
330
328
}
331
329
 
332
330
//