Minor fixes
This commit is contained in:
@@ -246,6 +246,7 @@ namespace Nz
|
||||
|
||||
if (viewerData.rebuildDepthPrepass)
|
||||
{
|
||||
renderFrame.PushForRelease(std::move(viewerData.depthPrepassRenderElements));
|
||||
viewerData.depthPrepassRenderElements.clear();
|
||||
|
||||
for (const auto& renderableData : m_visibleRenderables)
|
||||
@@ -268,6 +269,7 @@ namespace Nz
|
||||
|
||||
if (viewerData.rebuildForwardPass)
|
||||
{
|
||||
renderFrame.PushForRelease(std::move(viewerData.forwardRenderElements));
|
||||
viewerData.forwardRenderElements.clear();
|
||||
|
||||
for (const auto& renderableData : m_visibleRenderables)
|
||||
|
||||
@@ -194,7 +194,6 @@ namespace Nz
|
||||
Nz::TextureInfo texInfo;
|
||||
texInfo.width = texInfo.height = texInfo.depth = texInfo.mipmapLevel = 1;
|
||||
texInfo.pixelFormat = PixelFormat::L8;
|
||||
texInfo.type = ImageType::E2D;
|
||||
|
||||
std::array<UInt8, 6> whitePixels = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
|
||||
|
||||
@@ -75,6 +75,6 @@ namespace Nz
|
||||
}
|
||||
|
||||
// Couldn't get material pass or texture
|
||||
return Vector3ui::Zero();
|
||||
return Vector3ui::Unit(); //< prevents division by zero
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Nz
|
||||
CameraComponent& entityCamera = registry.get<CameraComponent>(entity);
|
||||
NodeComponent& entityNode = registry.get<NodeComponent>(entity);
|
||||
|
||||
m_pipeline->RegisterViewer(&entityCamera);
|
||||
m_pipeline->RegisterViewer(&entityCamera, entityCamera.GetRenderOrder());
|
||||
|
||||
m_invalidatedCameraNode.insert(entity);
|
||||
|
||||
|
||||
@@ -120,6 +120,11 @@ namespace Nz
|
||||
return Vector2ui::Zero();
|
||||
}
|
||||
|
||||
bool AbstractTextAreaWidget::IsFocusable() const
|
||||
{
|
||||
return !m_readOnly;
|
||||
}
|
||||
|
||||
void AbstractTextAreaWidget::Layout()
|
||||
{
|
||||
BaseWidget::Layout();
|
||||
@@ -135,11 +140,6 @@ namespace Nz
|
||||
RefreshCursor();
|
||||
}
|
||||
|
||||
bool AbstractTextAreaWidget::IsFocusable() const
|
||||
{
|
||||
return !m_readOnly;
|
||||
}
|
||||
|
||||
void AbstractTextAreaWidget::OnFocusLost()
|
||||
{
|
||||
// Hide cursors
|
||||
@@ -367,7 +367,7 @@ namespace Nz
|
||||
m_isMouseButtonDown = false;
|
||||
}
|
||||
|
||||
void AbstractTextAreaWidget::OnMouseMoved(int x, int y, int deltaX, int deltaY)
|
||||
void AbstractTextAreaWidget::OnMouseMoved(int x, int y, int /*deltaX*/, int /*deltaY*/)
|
||||
{
|
||||
if (m_isMouseButtonDown)
|
||||
SetSelection(m_selectionCursor, GetHoveredGlyph(float(x), float(y)));
|
||||
|
||||
@@ -187,13 +187,8 @@ namespace Nz
|
||||
auto& registry = GetRegistry();
|
||||
for (WidgetEntity& entity : m_entities)
|
||||
{
|
||||
if (entity.isEnabled)
|
||||
{
|
||||
if (GraphicsComponent* gfx = registry.try_get<GraphicsComponent>(entity.handle))
|
||||
gfx->Show(show);
|
||||
|
||||
entity.isEnabled = true;
|
||||
}
|
||||
if (GraphicsComponent* gfx = registry.try_get<GraphicsComponent>(entity.handle))
|
||||
gfx->Show(show);
|
||||
}
|
||||
|
||||
ShowChildren(show);
|
||||
|
||||
Reference in New Issue
Block a user