mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-11 17:59:03 +00:00
CHANGED: #1471 CGroupTab no longer depends on CInterfaceManager and the Ryzom game client time data.
This commit is contained in:
parent
6c2769839e
commit
924e891141
1 changed files with 11 additions and 28 deletions
|
@ -14,18 +14,12 @@
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "stdpch.h"
|
|
||||||
|
|
||||||
#include "group_tab.h"
|
#include "group_tab.h"
|
||||||
#include "nel/misc/xml_auto_ptr.h"
|
#include "nel/misc/xml_auto_ptr.h"
|
||||||
#include "../time_client.h"
|
|
||||||
#include "interface_manager.h"
|
|
||||||
|
|
||||||
#include "nel/gui/lua_ihm.h"
|
#include "nel/gui/lua_ihm.h"
|
||||||
#include "lua_ihm_ryzom.h"
|
#include "nel/gui/widget_manager.h"
|
||||||
|
#include "nel/gui/interface_group.h"
|
||||||
|
#include "nel/gui/view_text.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
@ -131,10 +125,8 @@ void CGroupTab::addTab(CCtrlTabButton * tabB)
|
||||||
selectFromCtrl(tabB);
|
selectFromCtrl(tabB);
|
||||||
|
|
||||||
if(_HideOutTabs && !_AHOnChange.empty())
|
if(_HideOutTabs && !_AHOnChange.empty())
|
||||||
{
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -225,10 +217,8 @@ void CGroupTab::addTab(CCtrlTabButton * tabB, sint index)
|
||||||
updateCoords();
|
updateCoords();
|
||||||
|
|
||||||
if(_HideOutTabs && !_AHOnChange.empty())
|
if(_HideOutTabs && !_AHOnChange.empty())
|
||||||
{
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -245,10 +235,8 @@ int CGroupTab::luaAddTab(CLuaState &ls)
|
||||||
updateCoords();
|
updateCoords();
|
||||||
|
|
||||||
if(_HideOutTabs && !_AHOnChange.empty())
|
if(_HideOutTabs && !_AHOnChange.empty())
|
||||||
{
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -332,12 +320,9 @@ void CGroupTab::removeTab(sint index)
|
||||||
select(_FirstTabIndex);
|
select(_FirstTabIndex);
|
||||||
|
|
||||||
if(!_AHOnChange.empty())
|
if(!_AHOnChange.empty())
|
||||||
{
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
|
@ -503,10 +488,8 @@ void CGroupTab::updateFirstTabButton()
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!_AHOnChange.empty() && ((oldFirstTabIndex!=_FirstTabIndex) || (oldLastTabIndex!=_LastTabIndex)))
|
if(!_AHOnChange.empty() && ((oldFirstTabIndex!=_FirstTabIndex) || (oldLastTabIndex!=_LastTabIndex)))
|
||||||
{
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -797,9 +780,10 @@ bool CCtrlTabButton::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
if (systemEvent.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::clocktick)
|
if (systemEvent.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::clocktick)
|
||||||
if (_Blinking)
|
if (_Blinking)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
uint dbclickDelay = CWidgetManager::getInstance()->getUserDblClickDelay();
|
uint dbclickDelay = CWidgetManager::getInstance()->getUserDblClickDelay();
|
||||||
if ((T1 - _BlinkDate) > dbclickDelay)
|
const CWidgetManager::SInterfaceTimes × = CWidgetManager::getInstance()->getInterfaceTimes();
|
||||||
|
|
||||||
|
if (( times.thisFrameMs - _BlinkDate) > dbclickDelay)
|
||||||
{
|
{
|
||||||
if (_BlinkState)
|
if (_BlinkState)
|
||||||
{
|
{
|
||||||
|
@ -812,7 +796,7 @@ bool CCtrlTabButton::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
setTextModulateGlobalColorNormal(_TextModulateGlobalColorNormalBlink);
|
setTextModulateGlobalColorNormal(_TextModulateGlobalColorNormalBlink);
|
||||||
}
|
}
|
||||||
_BlinkState = !_BlinkState;
|
_BlinkState = !_BlinkState;
|
||||||
_BlinkDate = T1;
|
_BlinkDate = times.thisFrameMs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -822,7 +806,6 @@ bool CCtrlTabButton::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CCtrlTabButton::setBlink (bool b)
|
void CCtrlTabButton::setBlink (bool b)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
if (!_Blinking)
|
if (!_Blinking)
|
||||||
|
|
Loading…
Reference in a new issue