mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 17:53:47 +00:00
more node colors to indicate type of node:
green: with Lua script attached purple: built-in effect, no Lua script attached salmon: default (no effect, no script)
This commit is contained in:
parent
2373fd7170
commit
32168bae9f
3 changed files with 21 additions and 9 deletions
|
@ -21,6 +21,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "Game.h"
|
||||
#include "Avatar.h"
|
||||
|
||||
static const Vector DEFAULT_NODE_COLOR (1, 0.5f, 0.5f);
|
||||
static const Vector SCRIPTED_NODE_COLOR(0.5f, 0.8f, 0.5f);
|
||||
static const Vector BUILTIN_NODE_COLOR (1, 0.3f, 1);
|
||||
|
||||
|
||||
Path::Path()
|
||||
{
|
||||
addType(SCO_PATH);
|
||||
|
@ -54,6 +59,7 @@ Path::Path()
|
|||
pauseFreeze = true;
|
||||
activationRange = 800;
|
||||
minimapIcon = 0;
|
||||
editorColor = DEFAULT_NODE_COLOR;
|
||||
}
|
||||
|
||||
void Path::clampPosition(Vector *pos, float radius)
|
||||
|
@ -273,6 +279,9 @@ void Path::refreshScript()
|
|||
amount = 0;
|
||||
content.clear();
|
||||
label.clear();
|
||||
editorColor = DEFAULT_NODE_COLOR;
|
||||
pathType = PATH_NONE;
|
||||
bool builtin = false;
|
||||
|
||||
destroy();
|
||||
|
||||
|
@ -412,6 +421,7 @@ void Path::refreshScript()
|
|||
is >> dummy >> vox >> re;
|
||||
if (!re.empty())
|
||||
replayVox = true;
|
||||
builtin = true;
|
||||
}
|
||||
else if (label == "warp")
|
||||
{
|
||||
|
@ -437,6 +447,7 @@ void Path::refreshScript()
|
|||
spawnEnemyDistance = 0;
|
||||
is >> dummy >> spawnEnemyName >> spawnEnemyDistance >> spawnEnemyNumber;
|
||||
neverSpawned = true;
|
||||
builtin = true;
|
||||
|
||||
}
|
||||
else if (label == "pe")
|
||||
|
@ -444,11 +455,14 @@ void Path::refreshScript()
|
|||
std::string dummy, particleEffect;
|
||||
SimpleIStringStream is(name);
|
||||
is >> dummy >> particleEffect;
|
||||
|
||||
|
||||
|
||||
setEmitter(particleEffect);
|
||||
builtin = true;
|
||||
}
|
||||
|
||||
if(script)
|
||||
editorColor = SCRIPTED_NODE_COLOR;
|
||||
else if(pathType != PATH_NONE || builtin)
|
||||
editorColor = BUILTIN_NODE_COLOR;
|
||||
}
|
||||
|
||||
void Path::setEmitter(const std::string& name)
|
||||
|
|
|
@ -113,6 +113,7 @@ public:
|
|||
void refreshScript();
|
||||
MinimapIcon *ensureMinimapIcon();
|
||||
|
||||
Vector editorColor;
|
||||
bool updateFunction;
|
||||
bool activateFunction;
|
||||
bool cursorActivation;
|
||||
|
|
|
@ -46,10 +46,8 @@ void PathRender::onRender(const RenderState& rs) const
|
|||
|
||||
if (selidx == i)
|
||||
glColor4f(1, 1, 1, 0.75f);
|
||||
else if(p->hasScript())
|
||||
glColor4f(0.5f, 0.8f, 0.5f, 0.75f);
|
||||
else
|
||||
glColor4f(1, 0.5f, 0.5f, 0.75f);
|
||||
glColor4f(p->editorColor.x, p->editorColor.y, p->editorColor.z, 0.75f);
|
||||
|
||||
glBegin(GL_LINES);
|
||||
for (size_t n = 0; n < p->nodes.size()-1; n++)
|
||||
|
@ -61,8 +59,7 @@ void PathRender::onRender(const RenderState& rs) const
|
|||
}
|
||||
glEnd();
|
||||
}
|
||||
|
||||
glLineWidth(1);
|
||||
glLineWidth(1);
|
||||
|
||||
for (size_t i = 0; i < pathcount; i++)
|
||||
{
|
||||
|
@ -104,7 +101,7 @@ void PathRender::onRender(const RenderState& rs) const
|
|||
}
|
||||
}
|
||||
|
||||
Vector color = p->hasScript() ? Vector(0.5f, 0.8f, 0.5f) : Vector(1, 0.5f, 0.5f);
|
||||
Vector color = p->editorColor;
|
||||
float a = 0.75f;
|
||||
if (!p->active)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue