Fixed: Add on/off params to action handler ark_pacs_border

shape highlight is "really" False by default

--HG--
branch : compatibility-develop
This commit is contained in:
ulukyn@gmail.com 2017-09-14 12:36:10 +02:00
parent 05e1346b5e
commit 4b22f4bf11
2 changed files with 11 additions and 5 deletions

View file

@ -96,9 +96,14 @@ REGISTER_ACTION_HANDLER (CAHDisplayInfos, "display_infos");
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
class CAHToggleARKPACSBorders : public IActionHandler 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"); REGISTER_ACTION_HANDLER (CAHToggleARKPACSBorders, "ark_pacs_borders");

View file

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