Fixing some CColor bugs and fixing icon paths
This commit is contained in:
parent
6b8966f0b9
commit
610c1c11a5
|
@ -11,7 +11,7 @@
|
||||||
#include <gtx/transform.hpp>
|
#include <gtx/transform.hpp>
|
||||||
|
|
||||||
u32 CSceneNode::smNumNodes = 0;
|
u32 CSceneNode::smNumNodes = 0;
|
||||||
CColor CSceneNode::skSelectionTint((u8) 39, 154, 167, 255);
|
CColor CSceneNode::skSelectionTint = CColor::Integral(39, 154, 167);
|
||||||
|
|
||||||
CSceneNode::CSceneNode(CSceneManager *pScene, CSceneNode *pParent)
|
CSceneNode::CSceneNode(CSceneManager *pScene, CSceneNode *pParent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,10 +18,10 @@ INodeEditor::INodeEditor(QWidget *pParent)
|
||||||
mUndoActions.push_back(pRedoAction);
|
mUndoActions.push_back(pRedoAction);
|
||||||
|
|
||||||
// Create gizmo actions
|
// Create gizmo actions
|
||||||
mGizmoActions.append(new QAction(QIcon(":/icons/EditorAssets/SelectMode.png"), "Select Objects", this));
|
mGizmoActions.append(new QAction(QIcon(":/icons/SelectMode.png"), "Select Objects", this));
|
||||||
mGizmoActions.append(new QAction(QIcon(":/icons/EditorAssets/Translate.png"), "Translate", this));
|
mGizmoActions.append(new QAction(QIcon(":/icons/Translate.png"), "Translate", this));
|
||||||
mGizmoActions.append(new QAction(QIcon(":/icons/EditorAssets/Rotate.png"), "Rotate", this));
|
mGizmoActions.append(new QAction(QIcon(":/icons/Rotate.png"), "Rotate", this));
|
||||||
mGizmoActions.append(new QAction(QIcon(":/icons/EditorAssets/Scale.png"), "Scale", this));
|
mGizmoActions.append(new QAction(QIcon(":/icons/Scale.png"), "Scale", this));
|
||||||
|
|
||||||
mGizmoActions[0]->setShortcut(QKeySequence("Ctrl+Q"));
|
mGizmoActions[0]->setShortcut(QKeySequence("Ctrl+Q"));
|
||||||
mGizmoActions[1]->setShortcut(QKeySequence("Ctrl+W"));
|
mGizmoActions[1]->setShortcut(QKeySequence("Ctrl+W"));
|
||||||
|
|
|
@ -257,9 +257,9 @@ void CModelEditorWindow::SetActiveMaterial(int MatIndex)
|
||||||
QTableWidgetItem *pItemB = new QTableWidgetItem();
|
QTableWidgetItem *pItemB = new QTableWidgetItem();
|
||||||
|
|
||||||
if (pPass->IsEnabled())
|
if (pPass->IsEnabled())
|
||||||
pItemB->setIcon(QIcon(":/icons/EditorAssets/Show.png"));
|
pItemB->setIcon(QIcon(":/icons/Show.png"));
|
||||||
else
|
else
|
||||||
pItemB->setIcon(QIcon(":/icons/EditorAssets/Hide.png"));
|
pItemB->setIcon(QIcon(":/icons/Hide.png"));
|
||||||
|
|
||||||
ui->PassTable->setItem(iPass, 0, pItemA);
|
ui->PassTable->setItem(iPass, 0, pItemA);
|
||||||
ui->PassTable->setItem(iPass, 1, pItemB);
|
ui->PassTable->setItem(iPass, 1, pItemB);
|
||||||
|
@ -466,9 +466,9 @@ void CModelEditorWindow::UpdateMaterial(int ValueA, int ValueB)
|
||||||
mpCurrentMat->Pass(ValueA)->SetEnabled(Enabled);
|
mpCurrentMat->Pass(ValueA)->SetEnabled(Enabled);
|
||||||
|
|
||||||
if (Enabled)
|
if (Enabled)
|
||||||
ui->PassTable->item(ValueA, ValueB)->setIcon(QIcon(":/icons/EditorAssets/Show.png"));
|
ui->PassTable->item(ValueA, ValueB)->setIcon(QIcon(":/icons/Show.png"));
|
||||||
else
|
else
|
||||||
ui->PassTable->item(ValueA, ValueB)->setIcon(QIcon(":/icons/EditorAssets/Hide.png"));
|
ui->PassTable->item(ValueA, ValueB)->setIcon(QIcon(":/icons/Hide.png"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -778,7 +778,7 @@ void CModelEditorWindow::on_FlatPreviewButton_clicked()
|
||||||
|
|
||||||
void CModelEditorWindow::on_ClearColorPicker_colorChanged(const QColor &Color)
|
void CModelEditorWindow::on_ClearColorPicker_colorChanged(const QColor &Color)
|
||||||
{
|
{
|
||||||
CColor NewColor((u8) Color.red(), (u8) Color.green(), (u8) Color.blue(), 255);
|
CColor NewColor = CColor::Integral(Color.red(), Color.green(), Color.blue(), Color.alpha());
|
||||||
ui->Viewport->SetClearColor(NewColor);
|
ui->Viewport->SetClearColor(NewColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -844,14 +844,14 @@ void CModelEditorWindow::on_CameraModeButton_clicked()
|
||||||
if (pCam->MoveMode() == eOrbitCamera)
|
if (pCam->MoveMode() == eOrbitCamera)
|
||||||
{
|
{
|
||||||
pCam->SetMoveMode(eFreeCamera);
|
pCam->SetMoveMode(eFreeCamera);
|
||||||
ui->CameraModeButton->setIcon(QIcon(":/icons/EditorAssets/Show.png"));
|
ui->CameraModeButton->setIcon(QIcon(":/icons/Show.png"));
|
||||||
ui->CameraModeButton->setToolTip(QString("Free Camera"));
|
ui->CameraModeButton->setToolTip(QString("Free Camera"));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (pCam->MoveMode() == eFreeCamera)
|
else if (pCam->MoveMode() == eFreeCamera)
|
||||||
{
|
{
|
||||||
pCam->SetMoveMode(eOrbitCamera);
|
pCam->SetMoveMode(eOrbitCamera);
|
||||||
ui->CameraModeButton->setIcon(QIcon(":/icons/EditorAssets/Orbit Camera.png"));
|
ui->CameraModeButton->setIcon(QIcon(":/icons/Orbit Camera.png"));
|
||||||
ui->CameraModeButton->setToolTip(QString("Orbit Camera"));
|
ui->CameraModeButton->setToolTip(QString("Orbit Camera"));
|
||||||
|
|
||||||
CVector3f Pos = pCam->Position();
|
CVector3f Pos = pCam->Position();
|
||||||
|
|
|
@ -2176,7 +2176,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/GridLight.png</normaloff>:/icons/EditorAssets/GridLight.png</iconset>
|
<normaloff>:/icons/GridLight.png</normaloff>:/icons/GridLight.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -2208,7 +2208,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Highlight.png</normaloff>:/icons/EditorAssets/Highlight.png</iconset>
|
<normaloff>:/icons/Highlight.png</normaloff>:/icons/Highlight.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -2237,7 +2237,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Orbit Camera.png</normaloff>:/icons/EditorAssets/Orbit Camera.png</iconset>
|
<normaloff>:/icons/Orbit Camera.png</normaloff>:/icons/Orbit Camera.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -2282,7 +2282,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Model Preview.png</normaloff>:/icons/EditorAssets/Model Preview.png</iconset>
|
<normaloff>:/icons/Model Preview.png</normaloff>:/icons/Model Preview.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -2317,7 +2317,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Sphere Preview.png</normaloff>:/icons/EditorAssets/Sphere Preview.png</iconset>
|
<normaloff>:/icons/Sphere Preview.png</normaloff>:/icons/Sphere Preview.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -2352,7 +2352,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Square Preview.png</normaloff>:/icons/EditorAssets/Square Preview.png</iconset>
|
<normaloff>:/icons/Square Preview.png</normaloff>:/icons/Square Preview.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
|
|
@ -257,8 +257,8 @@ QVariant CTypesInstanceModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
if (!mpScene) return QVariant::Invalid;
|
if (!mpScene) return QVariant::Invalid;
|
||||||
|
|
||||||
static QIcon Visible(":/icons/EditorAssets/Show.png");
|
static QIcon Visible(":/icons/Show.png");
|
||||||
static QIcon Invisible(":/icons/EditorAssets/Hide.png");
|
static QIcon Invisible(":/icons/Hide.png");
|
||||||
|
|
||||||
// Show/Hide Node Types
|
// Show/Hide Node Types
|
||||||
if (type == eNodeTypeIndex)
|
if (type == eNodeTypeIndex)
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -356,7 +356,7 @@
|
||||||
<widget class="QWidget" name="CreateTab">
|
<widget class="QWidget" name="CreateTab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Create.png</normaloff>:/icons/EditorAssets/Create.png</iconset>
|
<normaloff>:/icons/Create.png</normaloff>:/icons/Create.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -368,7 +368,7 @@
|
||||||
<widget class="QWidget" name="ModifyTab">
|
<widget class="QWidget" name="ModifyTab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Modify.png</normaloff>:/icons/EditorAssets/Modify.png</iconset>
|
<normaloff>:/icons/Modify.png</normaloff>:/icons/Modify.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -397,7 +397,7 @@
|
||||||
<widget class="QWidget" name="InstancesTab">
|
<widget class="QWidget" name="InstancesTab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Instances.png</normaloff>:/icons/EditorAssets/Instances.png</iconset>
|
<normaloff>:/icons/Instances.png</normaloff>:/icons/Instances.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -426,7 +426,7 @@
|
||||||
<widget class="QWidget" name="DisplayTab">
|
<widget class="QWidget" name="DisplayTab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Display.png</normaloff>:/icons/EditorAssets/Display.png</iconset>
|
<normaloff>:/icons/Display.png</normaloff>:/icons/Display.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -438,7 +438,7 @@
|
||||||
<widget class="QWidget" name="WorldTab">
|
<widget class="QWidget" name="WorldTab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/World.png</normaloff>:/icons/EditorAssets/World.png</iconset>
|
<normaloff>:/icons/World.png</normaloff>:/icons/World.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -493,7 +493,7 @@
|
||||||
<action name="ActionLink">
|
<action name="ActionLink">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Link.png</normaloff>:/icons/EditorAssets/Link.png</iconset>
|
<normaloff>:/icons/Link.png</normaloff>:/icons/Link.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Link</string>
|
<string>Link</string>
|
||||||
|
@ -505,7 +505,7 @@
|
||||||
<action name="ActionUnlink">
|
<action name="ActionUnlink">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../Icons.qrc">
|
<iconset resource="../Icons.qrc">
|
||||||
<normaloff>:/icons/EditorAssets/Unlink.png</normaloff>:/icons/EditorAssets/Unlink.png</iconset>
|
<normaloff>:/icons/Unlink.png</normaloff>:/icons/Unlink.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Unlink</string>
|
<string>Unlink</string>
|
||||||
|
|
Loading…
Reference in New Issue