mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-19 07:28:43 +00:00
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:
parent
05e1346b5e
commit
4b22f4bf11
2 changed files with 11 additions and 5 deletions
|
@ -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…
Reference in a new issue