lullaby/modules/layout/layout.cc
// This needs to by after ApplyLayout due to compilation ambiguities.
This needs to by after ApplyLayout due to compilation ambiguities.
This needs to by after ApplyLayout due to compilation ambiguities .
SetLayoutPositionFn GetDefaultSetLayoutPositionFn(Registry* registry) {
  return [=](Entity entity, const mathfu::vec2& position) {
    auto* transform_system = registry->Get<TransformSystem>();
    const mathfu::vec3 translation(
        position, transform_system->GetLocalTranslation(entity).z);
    transform_system->SetLocalTranslation(entity, translation);
  };
}
SetLayoutPositionFn GetDefaultSetLayoutPositionFn ( Registry * registry ) { return [ = ] ( Entity entity , const mathfu :: vec2 & position ) { auto * transform_system = registry -> Get < TransformSystem > ( ) ; const mathfu :: vec3 translation ( position , transform_system -> GetLocalTranslation ( entity ) . z ) ; transform_system -> SetLocalTranslation ( entity , translation ) ; } ; }
This needs to by after ApplyLayout due to compilation ambiguities.
This needs to by after ApplyLayout due to compilation ambiguities .
// Preserve the z, only change xy.