From 4b22f4bf1119e86e33854f6d4b1d4793397f5484 Mon Sep 17 00:00:00 2001 From: "ulukyn@gmail.com" Date: Thu, 14 Sep 2017 12:36:10 +0200 Subject: [PATCH] Fixed: Add on/off params to action handler ark_pacs_border shape highlight is "really" False by default --HG-- branch : compatibility-develop --- .../client/src/interface_v3/action_handler_debug.cpp | 9 +++++++-- code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp | 7 ++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_debug.cpp b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp index 51b029815..74c5542da 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_debug.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp @@ -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"); diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index f6d8c9ef4..c0a3e167d 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -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())