Gems/LyShine
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -824,8 +824,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
|
||||
{
|
||||
const QPen pOldPen = painter->pen();
|
||||
|
||||
const QRect rcClip = painter->clipBoundingRect().intersected(m_rcSpline).toRect();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
ISplineInterpolator* pSpline = splineInfo.pSpline;
|
||||
ISplineInterpolator* pDetailSpline = splineInfo.pDetailSpline;
|
||||
|
||||
@@ -134,7 +134,6 @@ protected:
|
||||
void DrawFrameTicks(QPainter* dc);
|
||||
|
||||
private:
|
||||
bool m_bAutoDelete;
|
||||
QRect m_rcClient;
|
||||
QRect m_rcTimeline;
|
||||
float m_fTimeMarker;
|
||||
|
||||
@@ -149,8 +149,6 @@ void CUiAnimViewAnimNode::UiElementPropertyChanged()
|
||||
|
||||
bool valueChanged = false;
|
||||
|
||||
const float time = GetSequence()->GetTime();
|
||||
|
||||
if (m_nodeEntityId.IsValid() && !m_azEntityDataCache.empty())
|
||||
{
|
||||
AZ::Entity* pNodeEntity = nullptr;
|
||||
@@ -537,9 +535,6 @@ void CUiAnimViewAnimNode::BindToEditorObjects()
|
||||
|
||||
CUiAnimViewSequenceNotificationContext context(GetSequence());
|
||||
|
||||
CUiAnimViewAnimNode* pDirector = GetDirector();
|
||||
const bool bBelongsToActiveDirector = pDirector ? pDirector->IsActiveDirector() : true;
|
||||
|
||||
// if this node represents an AZ entity then register for updates
|
||||
if (m_nodeEntityId.IsValid())
|
||||
{
|
||||
@@ -1632,7 +1627,7 @@ void CUiAnimViewAnimNode::OnSelectionChanged(const bool bSelected)
|
||||
{
|
||||
if (m_pAnimNode)
|
||||
{
|
||||
const EUiAnimNodeType animNodeType = GetType();
|
||||
[[maybe_unused]] const EUiAnimNodeType animNodeType = GetType();
|
||||
assert(animNodeType == eUiAnimNodeType_Camera || animNodeType == eUiAnimNodeType_Entity || animNodeType == eUiAnimNodeType_GeomCache);
|
||||
|
||||
const EUiAnimNodeFlags flags = (EUiAnimNodeFlags)m_pAnimNode->GetFlags();
|
||||
|
||||
@@ -192,7 +192,6 @@ void CUiAnimViewDopeSheetBase::SetTimeRange(float start, float end)
|
||||
void CUiAnimViewDopeSheetBase::SetTimeScale(float timeScale, float fAnchorTime)
|
||||
{
|
||||
const double fOldOffset = -fAnchorTime * m_timeScale;
|
||||
const double fOldScale = m_timeScale;
|
||||
|
||||
timeScale = std::max(timeScale, 0.001f);
|
||||
timeScale = std::min(timeScale, 100000.0f);
|
||||
@@ -1308,8 +1307,6 @@ void CUiAnimViewDopeSheetBase::OnCaptureChanged()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CUiAnimViewDopeSheetBase::IsOkToAddKeyHere(const CUiAnimViewTrack* pTrack, float time) const
|
||||
{
|
||||
const float timeEpsilon = 0.05f;
|
||||
|
||||
for (unsigned int i = 0; i < pTrack->GetKeyCount(); ++i)
|
||||
{
|
||||
CUiAnimViewKeyHandle keyHandle = const_cast<CUiAnimViewTrack*>(pTrack)->GetKey(i);
|
||||
@@ -1795,8 +1792,6 @@ void CUiAnimViewDopeSheetBase::AcceptUndo()
|
||||
{
|
||||
if (UiAnimUndo::IsRecording())
|
||||
{
|
||||
const QPoint mousePos = mapFromGlobal(QCursor::pos());
|
||||
|
||||
if (m_mouseMode == eUiAVMouseMode_Paste)
|
||||
{
|
||||
UiAnimUndoManager::Get()->Cancel();
|
||||
@@ -2242,7 +2237,6 @@ void CUiAnimViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* p
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
QRect trackRect;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_visibilityBrush);
|
||||
|
||||
@@ -19,13 +19,11 @@ class CUiAnimViewKeyConstHandle
|
||||
{
|
||||
public:
|
||||
CUiAnimViewKeyConstHandle()
|
||||
: m_bIsValid(false)
|
||||
, m_keyIndex(0)
|
||||
: m_keyIndex(0)
|
||||
, m_pTrack(nullptr) {}
|
||||
|
||||
CUiAnimViewKeyConstHandle(const CUiAnimViewTrack* pTrack, unsigned int keyIndex)
|
||||
: m_bIsValid(true)
|
||||
, m_keyIndex(keyIndex)
|
||||
: m_keyIndex(keyIndex)
|
||||
, m_pTrack(pTrack) {}
|
||||
|
||||
void GetKey(IKey* pKey) const;
|
||||
@@ -33,7 +31,6 @@ public:
|
||||
const CUiAnimViewTrack* GetTrack() const { return m_pTrack; }
|
||||
|
||||
private:
|
||||
bool m_bIsValid;
|
||||
unsigned int m_keyIndex;
|
||||
const CUiAnimViewTrack* m_pTrack;
|
||||
};
|
||||
|
||||
@@ -1096,9 +1096,6 @@ void CUiAnimViewNodesCtrl::AddGroupNodeAddItems(UiAnimContextMenu& contextMenu,
|
||||
contextMenu.main.addAction("Add Event Node")->setData(eMI_AddEvent);
|
||||
}
|
||||
|
||||
const bool bIsDirectorOrSequence = (pAnimNode->GetType() == eUiAnimNodeType_Director || pAnimNode->GetNodeType() == eUiAVNT_Sequence);
|
||||
|
||||
|
||||
#if UI_ANIMATION_REMOVED
|
||||
contextMenu.main.addAction("Add Comment Node")->setData(eMI_AddCommentNode);
|
||||
contextMenu.main.addAction("Add Console Variable")->setData(eMI_AddConsoleVariable);
|
||||
|
||||
@@ -182,7 +182,6 @@ private:
|
||||
|
||||
// Drag and drop
|
||||
CUiAnimViewAnimNodeBundle m_draggedNodes;
|
||||
CUiAnimViewAnimNode* m_pDragTarget;
|
||||
|
||||
std::unordered_map<const CUiAnimViewNode*, CRecord*> m_nodeToRecordMap;
|
||||
|
||||
|
||||
@@ -488,11 +488,12 @@ void CUiAnimViewSequence::SelectSelectedNodesInViewport()
|
||||
assert(UiAnimUndo::IsRecording());
|
||||
|
||||
CUiAnimViewAnimNodeBundle selectedNodes = GetSelectedAnimNodes();
|
||||
const unsigned int numSelectedNodes = selectedNodes.GetCount();
|
||||
|
||||
std::vector<CBaseObject*> entitiesToBeSelected;
|
||||
|
||||
#if UI_ANIMATION_REMOVED // lights
|
||||
const unsigned int numSelectedNodes = selectedNodes.GetCount();
|
||||
|
||||
// Also select objects that refer to light animation
|
||||
const bool bLightAnimationSetActive = GetFlags() & IUiAnimSequence::eSeqFlags_LightAnimationSet;
|
||||
if (bLightAnimationSetActive)
|
||||
|
||||
@@ -589,7 +589,6 @@ void CUiAnimViewSplineCtrl::mouseMoveEvent(QMouseEvent* event)
|
||||
|
||||
CUiAnimViewSequenceNotificationContext context(pSequence);
|
||||
|
||||
QPoint cMousePosPrev = m_cMousePos;
|
||||
m_cMousePos = point;
|
||||
|
||||
if (m_editMode == SelectMode)
|
||||
|
||||
@@ -704,7 +704,7 @@ void EditorWindow::AddMenu_View()
|
||||
action->setEnabled(canvasLoaded);
|
||||
QObject::connect(action,
|
||||
&QAction::triggered,
|
||||
[this]([[maybe_unused]] bool checked)
|
||||
[]([[maybe_unused]] bool checked)
|
||||
{
|
||||
gEnv->pCryFont->ReloadAllFonts();
|
||||
});
|
||||
|
||||
@@ -330,7 +330,7 @@ void HierarchyMenu::SliceMenuItems(HierarchyWidget* hierarchy,
|
||||
slicesAddedToMenu.push_back(sliceAsset.GetId());
|
||||
|
||||
QAction* action = menu->addAction(assetPath.c_str());
|
||||
QObject::connect(action, &QAction::triggered, [this, hierarchy, sliceAsset]
|
||||
QObject::connect(action, &QAction::triggered, [hierarchy, sliceAsset]
|
||||
{
|
||||
hierarchy->GetEditorWindow()->EditSliceInNewTab(sliceAsset.GetId());
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ MainToolbar::MainToolbar(EditorWindow* parent)
|
||||
|
||||
QObject::connect(m_zoomFactorSpinBox,
|
||||
QOverload<double>::of(&AzQtComponents::DoubleSpinBox::valueChanged),
|
||||
[this, parent](double value)
|
||||
[parent](double value)
|
||||
{
|
||||
parent->GetViewport()->GetViewportInteraction()->SetCanvasZoomPercent(static_cast<float>(value));
|
||||
});
|
||||
|
||||
@@ -119,7 +119,6 @@ private:
|
||||
PropertiesWidget* m_propertiesWidget;
|
||||
EditorWindow* m_editorWindow;
|
||||
|
||||
QWidget* m_containerWidget;
|
||||
QWidget* m_componentListContents;
|
||||
QVBoxLayout* m_rowLayout;
|
||||
QLineEdit* m_selectedEntityDisplayNameWidget;
|
||||
|
||||
@@ -350,10 +350,8 @@ void PropertyHandlerAnchor::WriteGUIValuesIntoProperty(size_t index, PropertyAnc
|
||||
}
|
||||
}
|
||||
|
||||
bool PropertyHandlerAnchor::ReadValuesIntoGUI(size_t index, PropertyAnchorCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
bool PropertyHandlerAnchor::ReadValuesIntoGUI([[maybe_unused]] size_t index, PropertyAnchorCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
|
||||
AzQtComponents::VectorInput* ctrl = GUI->GetPropertyVectorCtrl();
|
||||
|
||||
ctrl->blockSignals(true);
|
||||
|
||||
@@ -27,19 +27,16 @@ void PropertyHandlerChar::ConsumeAttribute(AzToolsFramework::PropertyStringLineE
|
||||
{
|
||||
}
|
||||
|
||||
void PropertyHandlerChar::WriteGUIValuesIntoProperty(size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
void PropertyHandlerChar::WriteGUIValuesIntoProperty([[maybe_unused]] size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
AZStd::string str = GUI->value();
|
||||
wchar_t character = '\0';
|
||||
AZStd::to_wstring(&character, 1, str.c_str());
|
||||
instance = character;
|
||||
}
|
||||
|
||||
bool PropertyHandlerChar::ReadValuesIntoGUI(size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
bool PropertyHandlerChar::ReadValuesIntoGUI([[maybe_unused]] size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
|
||||
GUI->blockSignals(true);
|
||||
{
|
||||
// NOTE: this assumes the uint32_t can be interpreted as a wchar_t, it seems to
|
||||
|
||||
@@ -53,7 +53,7 @@ PropertyDirectoryCtrl::PropertyDirectoryCtrl(QWidget* parent)
|
||||
|
||||
QObject::connect(refreshButton,
|
||||
&QPushButton::clicked,
|
||||
[this]([[maybe_unused]] bool checked)
|
||||
[]([[maybe_unused]] bool checked)
|
||||
{
|
||||
UiEditorRefreshDirectoryNotificationBus::Broadcast(&UiEditorRefreshDirectoryNotificationInterface::OnRefreshDirectory);
|
||||
});
|
||||
|
||||
@@ -106,10 +106,8 @@ void PropertyHandlerOffset::WriteGUIValuesIntoProperty(size_t index, AzQtCompone
|
||||
EBUS_EVENT_ID(id, UiTransform2dBus, SetOffsets, newInternalOffset);
|
||||
}
|
||||
|
||||
bool PropertyHandlerOffset::ReadValuesIntoGUI(size_t index, AzQtComponents::VectorInput* GUI, const UiTransform2dInterface::Offsets& instance, AzToolsFramework::InstanceDataNode* node)
|
||||
bool PropertyHandlerOffset::ReadValuesIntoGUI([[maybe_unused]] size_t index, AzQtComponents::VectorInput* GUI, const UiTransform2dInterface::Offsets& instance, AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
|
||||
// IMPORTANT: We DON'T need to do validation of data here because that's
|
||||
// done for us BEFORE we get here. We DO need to set the labels here.
|
||||
|
||||
|
||||
@@ -143,10 +143,8 @@ void PropertyHandlerPivot::WriteGUIValuesIntoProperty(size_t index, PropertyPivo
|
||||
}
|
||||
}
|
||||
|
||||
bool PropertyHandlerPivot::ReadValuesIntoGUI(size_t index, PropertyPivotCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
bool PropertyHandlerPivot::ReadValuesIntoGUI([[maybe_unused]] size_t index, PropertyPivotCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
|
||||
AzQtComponents::VectorInput* ctrl = GUI->GetPropertyVectorCtrl();
|
||||
|
||||
ctrl->blockSignals(true);
|
||||
|
||||
@@ -227,7 +227,6 @@ void SpriteBorderEditor::DisplaySelectedCell(AZ::u32 cellIndex)
|
||||
// Determine how much we need to scale the view to fit the cell
|
||||
// contents to the displayed properties image.
|
||||
const AZ::Vector2 cellSize = m_sprite->GetCellSize(cellIndex);
|
||||
const AZ::Vector2 cellScale = AZ::Vector2(m_unscaledSpriteSheet.size().width() / cellSize.GetX(), m_unscaledSpriteSheet.size().height() / cellSize.GetY());
|
||||
|
||||
// Scale-to-fit, while preserving aspect ratio.
|
||||
QRect croppedRect = m_unscaledSpriteSheet.rect();
|
||||
|
||||
@@ -261,7 +261,6 @@ private: // data
|
||||
AZStd::string m_cursorStr;
|
||||
QCursor m_cursorRotate;
|
||||
|
||||
bool m_inObjectPickMode = false;
|
||||
ViewportInteraction::InteractionMode m_interactionModeBeforePickMode;
|
||||
AZ::EntityId m_hoverElement;
|
||||
bool m_entityPickedOnMousePress; // used to ignore mouse move/release events if element was picked on the mouse press
|
||||
|
||||
Reference in New Issue
Block a user