diff --git a/src/Editor/CharacterEditor/CCharacterEditor.cpp b/src/Editor/CharacterEditor/CCharacterEditor.cpp index 8a3564bd..9a7b04a1 100644 --- a/src/Editor/CharacterEditor/CCharacterEditor.cpp +++ b/src/Editor/CharacterEditor/CCharacterEditor.cpp @@ -55,6 +55,7 @@ CCharacterEditor::CCharacterEditor(QWidget *parent) connect(ui->ActionBindPose, SIGNAL(toggled(bool)), this, SLOT(ToggleBindPose(bool))); connect(ui->ActionOrbit, SIGNAL(toggled(bool)), this, SLOT(ToggleOrbit(bool))); connect(ui->ActionPlay, SIGNAL(triggered()), this, SLOT(TogglePlay())); + connect(ui->ActionLoop, SIGNAL(toggled(bool)), this, SLOT(ToggleLoop(bool))); connect(ui->ActionRewind, SIGNAL(triggered()), this, SLOT(Rewind())); connect(ui->ActionFastForward, SIGNAL(triggered()), this, SLOT(FastForward())); connect(ui->ActionPrevAnim, SIGNAL(triggered()), this, SLOT(PrevAnim())); @@ -396,7 +397,11 @@ void CCharacterEditor::TogglePlay() mPlayAnim = !mPlayAnim; QString NewText = (mPlayAnim ? "Pause" : "Play"); - ui->PlayPauseButton->setText(NewText); + ui->PlayPauseButton->setToolTip(NewText); + ui->ActionPlay->setText(NewText); + + QIcon PlayPauseIcon = QIcon(mPlayAnim ? ":/icons/Pause_24px.png" : ":/icons/Play_24px.png"); + ui->PlayPauseButton->setIcon(PlayPauseIcon); if (ui->ActionPlay != sender()) { @@ -420,8 +425,26 @@ void CCharacterEditor::ToggleLoop(bool Loop) { mLoopAnim = Loop; + QString NewText = (Loop ? "Disable Loop" : "Loop"); + ui->LoopButton->setToolTip(NewText); + ui->ActionLoop->setText(NewText); + + QIcon ActionIcon = QIcon(Loop ? ":/icons/DontLoop_24px" : ":/icons/Loop_24px.png"); + ui->ActionLoop->setIcon(ActionIcon); + if (sender() != ui->LoopButton) + { + ui->LoopButton->blockSignals(true); ui->LoopButton->setChecked(Loop); + ui->LoopButton->blockSignals(false); + } + + if (sender() != ui->ActionLoop) + { + ui->LoopButton->blockSignals(true); + ui->ActionLoop->setChecked(Loop); + ui->LoopButton->blockSignals(false); + } } void CCharacterEditor::Rewind() diff --git a/src/Editor/CharacterEditor/CCharacterEditor.ui b/src/Editor/CharacterEditor/CCharacterEditor.ui index 2b7d0b7c..512bceab 100644 --- a/src/Editor/CharacterEditor/CCharacterEditor.ui +++ b/src/Editor/CharacterEditor/CCharacterEditor.ui @@ -49,8 +49,8 @@ false - - + + @@ -69,82 +69,201 @@ - + - - - Loop - - - true - - - true - - + + + + + + 32 + 32 + + + + Disable Loop + + + + + + + :/icons/Loop_24px.png + :/icons/DontLoop_24px.png:/icons/Loop_24px.png + + + + 24 + 24 + + + + true + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + - - - Rewind - - + + + + + + 32 + 32 + + + + Jump to Beginning + + + + + + + :/icons/Beginning_24px.png:/icons/Beginning_24px.png + + + + 24 + 24 + + + + + + + + + 32 + 32 + + + + Pause + + + + + + + :/icons/Pause_24px.png:/icons/Pause_24px.png + + + + 24 + 24 + + + + false + + + false + + + + + + + + 32 + 32 + + + + Jump to End + + + + + + + :/icons/End_24px.png:/icons/End_24px.png + + + + 24 + 24 + + + + + - - - Pause - - - - - - - Fast Forward - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Speed: - - - - - - - x - - - 1 - - - -10.000000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + + 10 + + + + Speed: + + + + + + + x + + + 1 + + + -10.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + @@ -162,6 +281,11 @@ 21 + + + 10 + + Frame 0 / 0 (0.000s/0.000s) @@ -205,6 +329,7 @@ + @@ -236,7 +361,7 @@ - :/icons/Open.png:/icons/Open.png + :/icons/Open_24px.png:/icons/Open_24px.png Open @@ -252,6 +377,10 @@ true + + + :/icons/ShowSkeleton_24px.png:/icons/ShowSkeleton_24px.png + Show Skeleton @@ -269,6 +398,10 @@ true + + + :/icons/ShowMesh_24px.png:/icons/ShowMesh_24px.png + Show Mesh @@ -283,6 +416,10 @@ true + + + :/icons/BindPose_24px.png:/icons/BindPose_24px.png + Bind Pose @@ -300,6 +437,10 @@ true + + + :/icons/OrbitCamera_24px.png:/icons/OrbitCamera_24px.png + Orbit @@ -319,7 +460,7 @@ - :/icons/GridLight.png:/icons/GridLight.png + :/icons/Grid_24px.png:/icons/Grid_24px.png Show Grid @@ -351,29 +492,57 @@ true + + + :/icons/Play_24px.png + :/icons/Pause_24px.png:/icons/Play_24px.png + - Play + Pause Space + + + :/icons/Beginning_24px.png:/icons/Beginning_24px.png + - Rewind + Jump to Beginning Ctrl+R + + + :/icons/End_24px.png:/icons/End_24px.png + - Fast Forward + Jump to End Ctrl+F + + + true + + + true + + + + :/icons/Loop_24px.png:/icons/Loop_24px.png + + + Loop + + diff --git a/src/Editor/Icons.qrc b/src/Editor/Icons.qrc index 0de2eb17..d152b660 100644 --- a/src/Editor/Icons.qrc +++ b/src/Editor/Icons.qrc @@ -5,8 +5,6 @@ icons/Material Highlight.png icons/Minus v2.png icons/Minus.png - icons/Orbit Camera v2.png - icons/Orbit Camera.png icons/Plus.png icons/Rotate.png icons/Samus Silhouette Gradient.png @@ -19,7 +17,6 @@ icons/Highlight.png icons/Model Preview.png icons/Show.png - icons/GridLight.png icons/Create.png icons/Display.png icons/Instances.png @@ -44,5 +41,28 @@ icons/Edit_24px.png icons/Edit_32px.png icons/SaveAndRepack_32px.png + icons/Play_32px.png + icons/Pause_32px.png + icons/End_32px.png + icons/Beginning_32px.png + icons/AnchorRoot_32px.png + icons/ShowSkeleton_32px.png + icons/BindPose_32px.png + icons/DontLoop_32px.png + icons/Loop_32px.png + icons/ShowSkeleton_24px.png + icons/BindPose_24px.png + icons/DontLoop_24px.png + icons/Loop_24px.png + icons/Beginning_24px.png + icons/End_24px.png + icons/Pause_24px.png + icons/Play_24px.png + icons/Open_24px.png + icons/ShowMesh_24px.png + icons/OrbitCamera_24px.png + icons/Grid_24px.png + icons/Grid_32px.png + icons/OrbitCamera_32px.png diff --git a/src/Editor/ModelEditor/CModelEditorWindow.cpp b/src/Editor/ModelEditor/CModelEditorWindow.cpp index 89e863b2..aa97078f 100644 --- a/src/Editor/ModelEditor/CModelEditorWindow.cpp +++ b/src/Editor/ModelEditor/CModelEditorWindow.cpp @@ -874,17 +874,11 @@ void CModelEditorWindow::ToggleCameraMode() CCamera *pCam = &ui->Viewport->Camera(); if (pCam->MoveMode() == eOrbitCamera) - { pCam->SetMoveMode(eFreeCamera); - ui->CameraModeButton->setIcon(QIcon(":/icons/Show.png")); - ui->CameraModeButton->setToolTip(QString("Free Camera")); - } else if (pCam->MoveMode() == eFreeCamera) { pCam->SetMoveMode(eOrbitCamera); - ui->CameraModeButton->setIcon(QIcon(":/icons/Orbit Camera.png")); - ui->CameraModeButton->setToolTip(QString("Orbit Camera")); CVector3f Pos = pCam->Position(); CVector3f Target = mpCurrentModelNode->AABox().Center(); diff --git a/src/Editor/ModelEditor/CModelEditorWindow.ui b/src/Editor/ModelEditor/CModelEditorWindow.ui index b6332482..a96acd7c 100644 --- a/src/Editor/ModelEditor/CModelEditorWindow.ui +++ b/src/Editor/ModelEditor/CModelEditorWindow.ui @@ -2176,7 +2176,7 @@ - :/icons/GridLight.png:/icons/GridLight.png + :/icons/Grid_32px.png:/icons/Grid_32px.png @@ -2205,7 +2205,7 @@ - :/icons/Orbit Camera.png:/icons/Orbit Camera.png + :/icons/OrbitCamera_32px.png:/icons/OrbitCamera_32px.png @@ -2214,7 +2214,10 @@ - false + true + + + true true diff --git a/src/Editor/icons/Orbit Camera v2.png b/src/Editor/icons/AnchorRoot_32px.png similarity index 82% rename from src/Editor/icons/Orbit Camera v2.png rename to src/Editor/icons/AnchorRoot_32px.png index 6f4f3a8a..a68340c5 100644 Binary files a/src/Editor/icons/Orbit Camera v2.png and b/src/Editor/icons/AnchorRoot_32px.png differ diff --git a/src/Editor/icons/Beginning_24px.png b/src/Editor/icons/Beginning_24px.png new file mode 100644 index 00000000..04085870 Binary files /dev/null and b/src/Editor/icons/Beginning_24px.png differ diff --git a/src/Editor/icons/Beginning_32px.png b/src/Editor/icons/Beginning_32px.png new file mode 100644 index 00000000..d6694510 Binary files /dev/null and b/src/Editor/icons/Beginning_32px.png differ diff --git a/src/Editor/icons/BindPose_24px.png b/src/Editor/icons/BindPose_24px.png new file mode 100644 index 00000000..c06f07f4 Binary files /dev/null and b/src/Editor/icons/BindPose_24px.png differ diff --git a/src/Editor/icons/BindPose_32px.png b/src/Editor/icons/BindPose_32px.png new file mode 100644 index 00000000..aa9e36c4 Binary files /dev/null and b/src/Editor/icons/BindPose_32px.png differ diff --git a/src/Editor/icons/DontLoop_24px.png b/src/Editor/icons/DontLoop_24px.png new file mode 100644 index 00000000..0141a211 Binary files /dev/null and b/src/Editor/icons/DontLoop_24px.png differ diff --git a/src/Editor/icons/DontLoop_32px.png b/src/Editor/icons/DontLoop_32px.png new file mode 100644 index 00000000..aba2b9d6 Binary files /dev/null and b/src/Editor/icons/DontLoop_32px.png differ diff --git a/src/Editor/icons/End_24px.png b/src/Editor/icons/End_24px.png new file mode 100644 index 00000000..d4db86af Binary files /dev/null and b/src/Editor/icons/End_24px.png differ diff --git a/src/Editor/icons/End_32px.png b/src/Editor/icons/End_32px.png new file mode 100644 index 00000000..5e92aeed Binary files /dev/null and b/src/Editor/icons/End_32px.png differ diff --git a/src/Editor/icons/Grid_24px.png b/src/Editor/icons/Grid_24px.png new file mode 100644 index 00000000..bed5d003 Binary files /dev/null and b/src/Editor/icons/Grid_24px.png differ diff --git a/src/Editor/icons/GridLight.png b/src/Editor/icons/Grid_32px.png similarity index 100% rename from src/Editor/icons/GridLight.png rename to src/Editor/icons/Grid_32px.png diff --git a/src/Editor/icons/Loop_24px.png b/src/Editor/icons/Loop_24px.png new file mode 100644 index 00000000..59c93a60 Binary files /dev/null and b/src/Editor/icons/Loop_24px.png differ diff --git a/src/Editor/icons/Loop_32px.png b/src/Editor/icons/Loop_32px.png new file mode 100644 index 00000000..d155cf08 Binary files /dev/null and b/src/Editor/icons/Loop_32px.png differ diff --git a/src/Editor/icons/Open_24px.png b/src/Editor/icons/Open_24px.png new file mode 100644 index 00000000..0d35cfbb Binary files /dev/null and b/src/Editor/icons/Open_24px.png differ diff --git a/src/Editor/icons/OrbitCamera_24px.png b/src/Editor/icons/OrbitCamera_24px.png new file mode 100644 index 00000000..49e44a83 Binary files /dev/null and b/src/Editor/icons/OrbitCamera_24px.png differ diff --git a/src/Editor/icons/Orbit Camera.png b/src/Editor/icons/OrbitCamera_32px.png similarity index 100% rename from src/Editor/icons/Orbit Camera.png rename to src/Editor/icons/OrbitCamera_32px.png diff --git a/src/Editor/icons/Pause_24px.png b/src/Editor/icons/Pause_24px.png new file mode 100644 index 00000000..01738df4 Binary files /dev/null and b/src/Editor/icons/Pause_24px.png differ diff --git a/src/Editor/icons/Pause_32px.png b/src/Editor/icons/Pause_32px.png new file mode 100644 index 00000000..841c2bbe Binary files /dev/null and b/src/Editor/icons/Pause_32px.png differ diff --git a/src/Editor/icons/Play_24px.png b/src/Editor/icons/Play_24px.png new file mode 100644 index 00000000..3fd6cef4 Binary files /dev/null and b/src/Editor/icons/Play_24px.png differ diff --git a/src/Editor/icons/Play_32px.png b/src/Editor/icons/Play_32px.png new file mode 100644 index 00000000..2a83ba15 Binary files /dev/null and b/src/Editor/icons/Play_32px.png differ diff --git a/src/Editor/icons/ShowMesh_24px.png b/src/Editor/icons/ShowMesh_24px.png new file mode 100644 index 00000000..6720e882 Binary files /dev/null and b/src/Editor/icons/ShowMesh_24px.png differ diff --git a/src/Editor/icons/ShowSkeleton_24px.png b/src/Editor/icons/ShowSkeleton_24px.png new file mode 100644 index 00000000..833feaec Binary files /dev/null and b/src/Editor/icons/ShowSkeleton_24px.png differ diff --git a/src/Editor/icons/ShowSkeleton_32px.png b/src/Editor/icons/ShowSkeleton_32px.png new file mode 100644 index 00000000..b75a9584 Binary files /dev/null and b/src/Editor/icons/ShowSkeleton_32px.png differ