Minor changes
This commit is contained in:
@@ -105,8 +105,9 @@ int main()
|
||||
framePipeline.RegisterRenderable(worldInstanceIndex1, &model, 0xFFFFFFFF, scissorBox);
|
||||
framePipeline.RegisterRenderable(worldInstanceIndex2, &model, 0xFFFFFFFF, scissorBox);
|
||||
|
||||
std::shared_ptr<Nz::PointLight> light = std::make_shared<Nz::PointLight>();
|
||||
light->UpdateColor(Nz::Color::Green);
|
||||
std::shared_ptr<Nz::SpotLight> light = std::make_shared<Nz::SpotLight>();
|
||||
light->UpdateInnerAngle(Nz::DegreeAnglef(15.f));
|
||||
light->UpdateOuterAngle(Nz::DegreeAnglef(20.f));
|
||||
|
||||
framePipeline.RegisterLight(light, 0xFFFFFFFF);
|
||||
|
||||
@@ -165,6 +166,7 @@ int main()
|
||||
camAngles.pitch = Nz::Clamp(camAngles.pitch - event.mouseMove.deltaY*sensitivity, -89.f, 89.f);
|
||||
|
||||
camQuat = camAngles;
|
||||
light->UpdateRotation(camQuat);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,13 +60,15 @@ int main()
|
||||
labelWidget->SetPosition(0.f, 200.f, 0.f);
|
||||
labelWidget->UpdateText(Nz::SimpleTextDrawer::Draw("Je suis un LabelWidget !", 72));
|
||||
|
||||
unsigned int clickCount = 0;
|
||||
|
||||
Nz::ButtonWidget* buttonWidget = canvas2D.Add<Nz::ButtonWidget>();
|
||||
buttonWidget->SetPosition(200.f, 400.f);
|
||||
buttonWidget->UpdateText(Nz::SimpleTextDrawer::Draw("Press me senpai", 72));
|
||||
buttonWidget->Resize(buttonWidget->GetPreferredSize());
|
||||
buttonWidget->OnButtonTrigger.Connect([=](const Nz::ButtonWidget*)
|
||||
buttonWidget->OnButtonTrigger.Connect([&](const Nz::ButtonWidget*)
|
||||
{
|
||||
buttonWidget->Destroy();
|
||||
labelWidget->UpdateText(Nz::SimpleTextDrawer::Draw("You clicked the button " + std::to_string(++clickCount) + " times", 72));
|
||||
});
|
||||
|
||||
std::shared_ptr<Nz::Material> material = std::make_shared<Nz::Material>();
|
||||
|
||||
Reference in New Issue
Block a user