GUI scrollbar updates (#447)

This commit is contained in:
Turánszki János
2022-05-19 22:42:49 +02:00
committed by GitHub
parent 782c326652
commit f7d28b1127
28 changed files with 508 additions and 172 deletions
+3 -3
View File
@@ -12,16 +12,16 @@ using namespace wi::scene;
void LightWindow::Create(EditorComponent* editor)
{
wi::gui::Window::Create("Light Window");
SetSize(XMFLOAT2(650, 500));
SetSize(XMFLOAT2(650, 300));
float x = 450;
float y = 20;
float y = 0;
float hei = 18;
float step = hei + 2;
energySlider.Create(0.1f, 64, 0, 100000, "Energy: ");
energySlider.SetSize(XMFLOAT2(100, hei));
energySlider.SetPos(XMFLOAT2(x, y += step));
energySlider.SetPos(XMFLOAT2(x, y));
energySlider.OnSlide([&](wi::gui::EventArgs args) {
LightComponent* light = wi::scene::GetScene().lights.GetComponent(entity);
if (light != nullptr)