Merge with develop

--HG--
branch : atys
hg/atys
Nuno Gonçalves 5 years ago
commit 9e406019d8

@ -614,6 +614,8 @@ CClientConfig::CClientConfig()
MaxMapScale = 2.0f; MaxMapScale = 2.0f;
R2EDMaxMapScale = 8.0f; R2EDMaxMapScale = 8.0f;
TargetChangeCompass = true;
// VERBOSES // VERBOSES
VerboseVP = false; VerboseVP = false;
VerboseAnimUser = false; VerboseAnimUser = false;
@ -1495,6 +1497,9 @@ void CClientConfig::setValues()
READ_FLOAT_FV(MaxMapScale); READ_FLOAT_FV(MaxMapScale);
READ_FLOAT_FV(R2EDMaxMapScale); READ_FLOAT_FV(R2EDMaxMapScale);
// /tar to update compass or not
READ_BOOL_FV(TargetChangeCompass);
///////////// /////////////
// SHADOWS // // SHADOWS //
// Shadows : Get Shadows state // Shadows : Get Shadows state

@ -607,6 +607,9 @@ struct CClientConfig
float MaxMapScale; float MaxMapScale;
float R2EDMaxMapScale; float R2EDMaxMapScale;
// If successfull /tar command should set compass or not
bool TargetChangeCompass;
////////////// //////////////
// VERBOSES // // VERBOSES //
bool VerboseVP; bool VerboseVP;

@ -2476,16 +2476,19 @@ class CAHTarget : public IActionHandler
if (entity && entity->properties().selectable() && !entity->getDisplayName().empty()) if (entity && entity->properties().selectable() && !entity->getDisplayName().empty())
{ {
UserEntity->selection(entity->slot()); UserEntity->selection(entity->slot());
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass")); if (ClientCfg.TargetChangeCompass)
if (gc)
{ {
CCompassTarget ct; CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
ct.setType(CCompassTarget::Selection); if (gc)
{
CCompassTarget ct;
ct.setType(CCompassTarget::Selection);
gc->setActive(true); gc->setActive(true);
gc->setTarget(ct); gc->setTarget(ct);
gc->blink(); gc->blink();
CWidgetManager::getInstance()->setTopWindow(gc); CWidgetManager::getInstance()->setTopWindow(gc);
}
} }
} }
else if (!quiet) else if (!quiet)

@ -100,7 +100,6 @@ void CControlSheetInfoWaiter::infoReceived()
ucstring CControlSheetInfoWaiter::infoValidated() const ucstring CControlSheetInfoWaiter::infoValidated() const
{ {
ucstring help; ucstring help;
if (CtrlSheet && !LuaMethodName.empty()) if (CtrlSheet && !LuaMethodName.empty())
{ {
// delegate setup of context he help ( & window ) to lua // delegate setup of context he help ( & window ) to lua
@ -3396,6 +3395,9 @@ void CDBCtrlSheet::getContextHelp(ucstring &help) const
// call lua function to update tooltip window // call lua function to update tooltip window
_ItemInfoWaiter.sendRequest(); _ItemInfoWaiter.sendRequest();
help = _ItemInfoWaiter.infoValidated(); help = _ItemInfoWaiter.infoValidated();
// its expected to get at least item name back
if (help.empty())
help = getItemActualName();
} }
else if (!_ContextHelp.empty()) else if (!_ContextHelp.empty())
{ {

Loading…
Cancel
Save