Fixed: Add on/off params to action handler ark_pacs_border

shape highlight is "really" False by default

--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn@gmail.com 7 years ago
parent 05e1346b5e
commit 4b22f4bf11

@ -96,9 +96,14 @@ REGISTER_ACTION_HANDLER (CAHDisplayInfos, "display_infos");
// ------------------------------------------------------------------------------------------------
class CAHToggleARKPACSBorders : public IActionHandler
{
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
{
ARKPACSBorders = !ARKPACSBorders;
if (!getParam(Params, "on").empty())
ARKPACSBorders = true;
else if (!getParam(Params, "off").empty())
ARKPACSBorders = false;
else ARKPACSBorders = !ARKPACSBorders;
}
};
REGISTER_ACTION_HANDLER (CAHToggleARKPACSBorders, "ark_pacs_borders");

@ -2048,7 +2048,8 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
float x = 0.0f, y = 0.0f, z = 0.0f;
float scale = 1.0f;
string context, url, skeleton, texture;
bool highlight, transparency = false;
bool highlight = false;
bool transparency = false;
bool collision = true;
if (ls.getTop() >= 2)
@ -2150,14 +2151,14 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
if (!highlight)
{
instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setShininess( 10.0f );
instance.getMaterial(j).setEmissive(CRGBA(255,255,255,255));
instance.getMaterial(j).setShininess(10.0f);
}
else
{
instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setEmissive(CRGBA(255,0,0,255));
instance.getMaterial(j).setShininess( 1000.0f );
instance.getMaterial(j).setShininess(1000.0f);
}
if (!texture.empty())

Loading…
Cancel
Save