mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
material output node
material output node added colors denoting node sockets added. this will probably be changed.
This commit is contained in:
parent
c9d70de609
commit
2dc623df7e
6 changed files with 117 additions and 28 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "platform/platform.h"
|
||||
#include "gui/shaderEditor/guiShaderEditor.h"
|
||||
#include "gui/shaderEditor/nodes/materialOutputNode.h"
|
||||
|
||||
#include "core/frameAllocator.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
|
|
@ -61,7 +62,7 @@ GuiShaderEditor::GuiShaderEditor()
|
|||
mTempConnection = NULL;
|
||||
mNodeSize = 10;
|
||||
// test
|
||||
addNode(new GuiShaderNode());
|
||||
addNode(new MaterialOutputNode());
|
||||
addNode(new GuiShaderNode());
|
||||
}
|
||||
|
||||
|
|
@ -180,15 +181,12 @@ void GuiShaderEditor::renderNodes(Point2I offset, const RectI& updateRect)
|
|||
{
|
||||
Point2I pos = node->localToGlobalCoord(input->pos) + offset;
|
||||
|
||||
ColorI border = mProfile->mBorderColor;
|
||||
|
||||
if (node->mSelected)
|
||||
border = mProfile->mBorderColorSEL;
|
||||
ColorI border = input->col;
|
||||
|
||||
ColorI fill = mProfile->mFillColor;
|
||||
if (hasConnection(input))
|
||||
{
|
||||
fill = ColorI::WHITE;
|
||||
fill = input->col;
|
||||
}
|
||||
|
||||
RectI socketRect(pos, Point2I(mNodeSize, mNodeSize));
|
||||
|
|
@ -199,18 +197,12 @@ void GuiShaderEditor::renderNodes(Point2I offset, const RectI& updateRect)
|
|||
{
|
||||
Point2I pos = node->localToGlobalCoord(output->pos) + offset;
|
||||
|
||||
ColorI border = mProfile->mBorderColor;
|
||||
|
||||
if (node->mSelected)
|
||||
border = mProfile->mBorderColorSEL;
|
||||
|
||||
if(node->mSelected)
|
||||
border = mProfile->mBorderColorSEL;
|
||||
ColorI border = output->col;
|
||||
|
||||
ColorI fill = mProfile->mFillColor;
|
||||
if (hasConnection(output))
|
||||
{
|
||||
fill = ColorI::WHITE;
|
||||
fill = output->col;
|
||||
}
|
||||
|
||||
RectI socketRect(pos, Point2I(mNodeSize, mNodeSize));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue