mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fix inventory items draggable state (issue #78)
This commit is contained in:
parent
2c38c21a40
commit
ec4b21ac75
4 changed files with 15 additions and 0 deletions
|
@ -84,6 +84,8 @@ CDBGroupListSheet::CDBGroupListSheet(const TCtorParam ¶m)
|
|||
_CacheAnimalStatus= -1;
|
||||
|
||||
_ListLeaveSpace= false;
|
||||
|
||||
_Draggable = false;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -227,6 +229,10 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
||||
}
|
||||
|
||||
// issue #78: dragable is not parsed by _CtrlInfo, need to do it here.
|
||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
||||
if (prop) _Draggable = convertBool(prop);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -864,6 +870,7 @@ void CDBGroupListSheet::setup()
|
|||
ctrl->setToolTipParent(getToolTipParent());
|
||||
ctrl->setToolTipParentPosRef(getToolTipParentPosRef());
|
||||
ctrl->setToolTipPosRef(getToolTipPosRef());
|
||||
ctrl->setDraggable(_Draggable);
|
||||
// link on the element i+_StartDbIdx
|
||||
if (_DisplayEmptySlot)
|
||||
{
|
||||
|
|
|
@ -171,6 +171,7 @@ protected:
|
|||
bool _Squarify : 1;
|
||||
|
||||
bool _CanDrop : 1;
|
||||
bool _Draggable : 1;
|
||||
|
||||
// Children
|
||||
bool _Setuped;
|
||||
|
|
|
@ -69,6 +69,7 @@ CDBGroupListSheetText::CDBGroupListSheetText(const TCtorParam ¶m)
|
|||
_AnimalStatus= NULL;
|
||||
_CacheAnimalStatus= -1;
|
||||
_CanDrop= false;
|
||||
_Draggable= false;
|
||||
|
||||
for(uint i=0;i<CHARACTERISTICS::NUM_CHARACTERISTICS;i++)
|
||||
_LastPlayerCharac[i]= 0;
|
||||
|
@ -214,6 +215,10 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
||||
}
|
||||
|
||||
// issue #78: dragable is not parsed by _CtrlInfo, need to do it here.
|
||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
||||
if (prop) _Draggable = convertBool(prop);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -855,6 +860,7 @@ void CDBGroupListSheetText::setup()
|
|||
ctrl->setParamsOnLeftClick(toString(i));
|
||||
ctrl->setActionOnRightClick("lst_rclick");
|
||||
ctrl->setParamsOnRightClick(toString(i));
|
||||
ctrl->setDraggable(_Draggable);
|
||||
|
||||
// Add it to the list.
|
||||
_List->addCtrl(ctrl);
|
||||
|
|
|
@ -224,6 +224,7 @@ protected:
|
|||
bool _GrayTextWithCtrlState;
|
||||
|
||||
bool _CanDrop;
|
||||
bool _Draggable;
|
||||
|
||||
// Common Info for ctrl and group
|
||||
CCtrlSheetInfo _CtrlInfo;
|
||||
|
|
Loading…
Reference in a new issue