Guard GridComponent against arbitrarily high grid sizes (#1135)
Also do bounds checking at runtime in the controller for safety.
This commit is contained in:
committed by
GitHub
parent
f39460e617
commit
34449e2fc9
@@ -54,13 +54,14 @@ namespace AZ
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &GridComponentConfig::m_gridSize, "Grid Size", "Grid width and depth")
|
||||
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
|
||||
->Attribute(AZ::Edit::Attributes::Min, GridComponentController::MinGridSize)
|
||||
->Attribute(AZ::Edit::Attributes::Max, GridComponentController::MaxGridSize)
|
||||
->Attribute(AZ::Edit::Attributes::Suffix, " m")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &GridComponentConfig::m_primarySpacing, "Primary Grid Spacing", "Amount of space between grid lines")
|
||||
->Attribute(AZ::Edit::Attributes::Min, 0.01f)
|
||||
->Attribute(AZ::Edit::Attributes::Min, GridComponentController::MinSpacing)
|
||||
->Attribute(AZ::Edit::Attributes::Suffix, " m")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &GridComponentConfig::m_secondarySpacing, "Secondary Grid Spacing", "Amount of space between sub-grid lines")
|
||||
->Attribute(AZ::Edit::Attributes::Min, 0.01f)
|
||||
->Attribute(AZ::Edit::Attributes::Min, GridComponentController::MinSpacing)
|
||||
->Attribute(AZ::Edit::Attributes::Suffix, " m")
|
||||
->DataElement(AZ::Edit::UIHandlers::Color, &GridComponentConfig::m_axisColor, "Axis Color", "Color of the grid axis")
|
||||
->DataElement(AZ::Edit::UIHandlers::Color, &GridComponentConfig::m_primaryColor, "Primary Color", "Color of the primary grid lines")
|
||||
|
||||
Reference in New Issue
Block a user