mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-29 03:40:55 +00:00
Merge with develop
This commit is contained in:
parent
de42e97fca
commit
4d3aa59507
10 changed files with 130 additions and 77 deletions
|
@ -366,7 +366,7 @@ namespace NLGUI
|
||||||
bool _Connecting;
|
bool _Connecting;
|
||||||
double _TimeoutValue; // the timeout in seconds
|
double _TimeoutValue; // the timeout in seconds
|
||||||
double _ConnectingTimeout;
|
double _ConnectingTimeout;
|
||||||
uint32 _RedirectsRemaining;
|
sint _RedirectsRemaining;
|
||||||
|
|
||||||
// minimal embeded lua script support
|
// minimal embeded lua script support
|
||||||
// Note : any embeded script is executed immediately after the closing
|
// Note : any embeded script is executed immediately after the closing
|
||||||
|
|
|
@ -1781,13 +1781,19 @@ void registerGlExtensions(CGlExtensions &ext)
|
||||||
// GPU_MEMORY_INFO_EVICTED_MEMORY_NVX;
|
// GPU_MEMORY_INFO_EVICTED_MEMORY_NVX;
|
||||||
|
|
||||||
GLint nDedicatedMemoryInKB = 0;
|
GLint nDedicatedMemoryInKB = 0;
|
||||||
|
#ifdef GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX
|
||||||
glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &nDedicatedMemoryInKB);
|
glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &nDedicatedMemoryInKB);
|
||||||
|
#endif
|
||||||
|
|
||||||
GLint nTotalMemoryInKB = 0;
|
GLint nTotalMemoryInKB = 0;
|
||||||
|
#ifdef GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX
|
||||||
glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &nTotalMemoryInKB);
|
glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &nTotalMemoryInKB);
|
||||||
|
#endif
|
||||||
|
|
||||||
GLint nCurAvailMemoryInKB = 0;
|
GLint nCurAvailMemoryInKB = 0;
|
||||||
|
#ifdef GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX
|
||||||
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &nCurAvailMemoryInKB);
|
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &nCurAvailMemoryInKB);
|
||||||
|
#endif
|
||||||
|
|
||||||
nlinfo("Memory: total: %d available: %d dedicated: %d", nTotalMemoryInKB, nCurAvailMemoryInKB, nDedicatedMemoryInKB);
|
nlinfo("Memory: total: %d available: %d dedicated: %d", nTotalMemoryInKB, nCurAvailMemoryInKB, nDedicatedMemoryInKB);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1026,7 +1026,7 @@ namespace NLGUI
|
||||||
void CWidgetManager::reset()
|
void CWidgetManager::reset()
|
||||||
{
|
{
|
||||||
setCurContextHelp( NULL );
|
setCurContextHelp( NULL );
|
||||||
|
|
||||||
_ViewsUnderPointer.clear();
|
_ViewsUnderPointer.clear();
|
||||||
_CtrlsUnderPointer.clear();
|
_CtrlsUnderPointer.clear();
|
||||||
_GroupsUnderPointer.clear();
|
_GroupsUnderPointer.clear();
|
||||||
|
@ -1254,7 +1254,7 @@ namespace NLGUI
|
||||||
sint32 wParent, sint32 hParent )
|
sint32 wParent, sint32 hParent )
|
||||||
{
|
{
|
||||||
CCtrlBase::TToolTipParentType parentType= newCtrl->getToolTipParent();
|
CCtrlBase::TToolTipParentType parentType= newCtrl->getToolTipParent();
|
||||||
CInterfaceGroup *groupContextHelp =
|
CInterfaceGroup *groupContextHelp =
|
||||||
getWindowForActiveMasterGroup(newCtrl->getContextHelpWindowName());
|
getWindowForActiveMasterGroup(newCtrl->getContextHelpWindowName());
|
||||||
|
|
||||||
uint32 _ScreenH, _ScreenW;
|
uint32 _ScreenH, _ScreenW;
|
||||||
|
@ -1383,7 +1383,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
if (!newCtrl) return;
|
if (!newCtrl) return;
|
||||||
if (!newCtrl->getInvalidCoords()) return;
|
if (!newCtrl->getInvalidCoords()) return;
|
||||||
|
|
||||||
CInterfaceGroup *groupContextHelp =
|
CInterfaceGroup *groupContextHelp =
|
||||||
getWindowForActiveMasterGroup(newCtrl->getContextHelpWindowName());
|
getWindowForActiveMasterGroup(newCtrl->getContextHelpWindowName());
|
||||||
|
|
||||||
|
@ -1450,7 +1450,7 @@ namespace NLGUI
|
||||||
|
|
||||||
|
|
||||||
// **** resolve auto posref
|
// **** resolve auto posref
|
||||||
uint clampCount =
|
uint clampCount =
|
||||||
adjustTooltipPosition( newCtrl, win, newCtrl->getToolTipParentPosRef(),
|
adjustTooltipPosition( newCtrl, win, newCtrl->getToolTipParentPosRef(),
|
||||||
newCtrl->getToolTipPosRef(), xParent, yParent,
|
newCtrl->getToolTipPosRef(), xParent, yParent,
|
||||||
wParent, hParent);
|
wParent, hParent);
|
||||||
|
@ -1458,7 +1458,7 @@ namespace NLGUI
|
||||||
if (clampCount != 0)
|
if (clampCount != 0)
|
||||||
{
|
{
|
||||||
// try to fallback on alternate tooltip posref
|
// try to fallback on alternate tooltip posref
|
||||||
uint altClampCount =
|
uint altClampCount =
|
||||||
adjustTooltipPosition( newCtrl, win, newCtrl->getToolTipParentPosRefAlt(),
|
adjustTooltipPosition( newCtrl, win, newCtrl->getToolTipParentPosRefAlt(),
|
||||||
newCtrl->getToolTipPosRefAlt(), xParent, yParent,
|
newCtrl->getToolTipPosRefAlt(), xParent, yParent,
|
||||||
wParent, hParent);
|
wParent, hParent);
|
||||||
|
@ -1961,6 +1961,7 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
while (cb);
|
while (cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if screen size changed
|
// Check if screen size changed
|
||||||
uint32 w, h;
|
uint32 w, h;
|
||||||
CViewRenderer::getInstance()->checkNewScreenSize ();
|
CViewRenderer::getInstance()->checkNewScreenSize ();
|
||||||
|
@ -1974,7 +1975,7 @@ namespace NLGUI
|
||||||
setScreenWH( w, h );
|
setScreenWH( w, h );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update global color from database
|
// Update global color from database
|
||||||
if (!_RProp)
|
if (!_RProp)
|
||||||
{
|
{
|
||||||
|
@ -1983,6 +1984,7 @@ namespace NLGUI
|
||||||
_BProp = CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:B");
|
_BProp = CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:B");
|
||||||
_AProp = CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:A");
|
_AProp = CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:A");
|
||||||
}
|
}
|
||||||
|
|
||||||
setGlobalColor(NLMISC::CRGBA(
|
setGlobalColor(NLMISC::CRGBA(
|
||||||
(uint8)_RProp->getValue32(),
|
(uint8)_RProp->getValue32(),
|
||||||
(uint8)_GProp->getValue32(),
|
(uint8)_GProp->getValue32(),
|
||||||
|
@ -1996,7 +1998,7 @@ namespace NLGUI
|
||||||
c.B = gc.B;
|
c.B = gc.B;
|
||||||
c.A = (uint8) (( (uint16) c.A * (uint16) getContentAlpha() ) >> 8);
|
c.A = (uint8) (( (uint16) c.A * (uint16) getContentAlpha() ) >> 8);
|
||||||
setGlobalColorForContent( c );
|
setGlobalColorForContent( c );
|
||||||
|
|
||||||
// Update global alphaS from database
|
// Update global alphaS from database
|
||||||
updateGlobalAlphas();
|
updateGlobalAlphas();
|
||||||
|
|
||||||
|
@ -2005,7 +2007,7 @@ namespace NLGUI
|
||||||
Computed String are rendered in on big drawQuads at last part of each layer
|
Computed String are rendered in on big drawQuads at last part of each layer
|
||||||
*/
|
*/
|
||||||
CDBManager::getInstance()->flushObserverCalls();
|
CDBManager::getInstance()->flushObserverCalls();
|
||||||
|
|
||||||
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
{
|
{
|
||||||
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
@ -2158,7 +2160,7 @@ namespace NLGUI
|
||||||
bool CWidgetManager::handleKeyboardEvent( const CEventDescriptor &evnt )
|
bool CWidgetManager::handleKeyboardEvent( const CEventDescriptor &evnt )
|
||||||
{
|
{
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
CEventDescriptorKey &eventDesc = (CEventDescriptorKey&)evnt;
|
CEventDescriptorKey &eventDesc = (CEventDescriptorKey&)evnt;
|
||||||
|
|
||||||
//_LastEventKeyDesc = eventDesc;
|
//_LastEventKeyDesc = eventDesc;
|
||||||
|
@ -2541,7 +2543,7 @@ namespace NLGUI
|
||||||
|
|
||||||
|
|
||||||
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup)
|
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup)
|
||||||
{
|
{
|
||||||
if (!handled)
|
if (!handled)
|
||||||
if (pNewCurrentWnd != NULL)
|
if (pNewCurrentWnd != NULL)
|
||||||
pNewCurrentWnd->handleEvent(evnt);
|
pNewCurrentWnd->handleEvent(evnt);
|
||||||
|
@ -2589,7 +2591,7 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
_CapturedView = NULL;
|
_CapturedView = NULL;
|
||||||
|
|
||||||
if( CInterfaceElement::getEditorMode() )
|
if( CInterfaceElement::getEditorMode() )
|
||||||
stopDragging();
|
stopDragging();
|
||||||
}
|
}
|
||||||
|
@ -2634,7 +2636,7 @@ namespace NLGUI
|
||||||
if( eventDesc.getType() != CEventDescriptor::mouse )
|
if( eventDesc.getType() != CEventDescriptor::mouse )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const CEventDescriptorMouse &e = static_cast< const CEventDescriptorMouse& >( eventDesc );
|
const CEventDescriptorMouse &e = static_cast< const CEventDescriptorMouse& >( eventDesc );
|
||||||
|
|
||||||
if( e.getEventTypeExtended() != CEventDescriptorMouse::mousemove )
|
if( e.getEventTypeExtended() != CEventDescriptorMouse::mousemove )
|
||||||
return false;
|
return false;
|
||||||
|
@ -2699,7 +2701,7 @@ namespace NLGUI
|
||||||
|
|
||||||
e->setParent( NULL );
|
e->setParent( NULL );
|
||||||
draggedElement = e;
|
draggedElement = e;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2715,7 +2717,7 @@ namespace NLGUI
|
||||||
g = tw;
|
g = tw;
|
||||||
|
|
||||||
std::string oldid = e->getId();
|
std::string oldid = e->getId();
|
||||||
|
|
||||||
e->setParent( g );
|
e->setParent( g );
|
||||||
e->setIdRecurse( e->getShortId() );
|
e->setIdRecurse( e->getShortId() );
|
||||||
e->setParentPos( g );
|
e->setParentPos( g );
|
||||||
|
@ -2730,7 +2732,7 @@ namespace NLGUI
|
||||||
onWidgetMoved( oldid, e->getId() );
|
onWidgetMoved( oldid, e->getId() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CWidgetManager::movePointer (sint32 dx, sint32 dy)
|
void CWidgetManager::movePointer (sint32 dx, sint32 dy)
|
||||||
{
|
{
|
||||||
|
@ -3091,7 +3093,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
const SMasterGroup &mg = _MasterGroups[ i ];
|
const SMasterGroup &mg = _MasterGroups[ i ];
|
||||||
|
|
||||||
std::vector< CInterfaceGroup* >::size_type j;
|
std::vector< CInterfaceGroup* >::size_type j;
|
||||||
for( j = 0; j < mg.Group->getNumGroup(); j++ )
|
for( j = 0; j < mg.Group->getNumGroup(); j++ )
|
||||||
{
|
{
|
||||||
CInterfaceGroup *g = mg.Group->getGroup( j );
|
CInterfaceGroup *g = mg.Group->getGroup( j );
|
||||||
|
@ -3106,8 +3108,8 @@ namespace NLGUI
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CWidgetManager::enableMouseHandling( bool handle )
|
void CWidgetManager::enableMouseHandling( bool handle )
|
||||||
{
|
{
|
||||||
|
@ -3116,7 +3118,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
if(!getPointer())
|
if(!getPointer())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If Left captured, reset
|
// If Left captured, reset
|
||||||
if( getCapturePointerLeft() )
|
if( getCapturePointerLeft() )
|
||||||
setCapturePointerLeft( NULL );
|
setCapturePointerLeft( NULL );
|
||||||
|
@ -3124,12 +3126,12 @@ namespace NLGUI
|
||||||
// Same for Right
|
// Same for Right
|
||||||
if( getCapturePointerRight() )
|
if( getCapturePointerRight() )
|
||||||
setCapturePointerRight( NULL );
|
setCapturePointerRight( NULL );
|
||||||
|
|
||||||
// Avoid any problem with modals
|
// Avoid any problem with modals
|
||||||
disableModalWindow();
|
disableModalWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
uint CWidgetManager::getUserDblClickDelay()
|
uint CWidgetManager::getUserDblClickDelay()
|
||||||
{
|
{
|
||||||
|
@ -3137,11 +3139,11 @@ namespace NLGUI
|
||||||
NLMISC::CCDBNodeLeaf *pNL = CDBManager::getInstance()->getDbProp("UI:SAVE:DOUBLE_CLICK_SPEED");
|
NLMISC::CCDBNodeLeaf *pNL = CDBManager::getInstance()->getDbProp("UI:SAVE:DOUBLE_CLICK_SPEED");
|
||||||
if( pNL != NULL )
|
if( pNL != NULL )
|
||||||
nVal = pNL->getValue32();
|
nVal = pNL->getValue32();
|
||||||
|
|
||||||
uint dbclickDelay = (uint)(DOUBLE_CLICK_MIN + (DOUBLE_CLICK_MAX-DOUBLE_CLICK_MIN) * (float)nVal / 100.0f);
|
uint dbclickDelay = (uint)(DOUBLE_CLICK_MIN + (DOUBLE_CLICK_MAX-DOUBLE_CLICK_MIN) * (float)nVal / 100.0f);
|
||||||
return dbclickDelay;
|
return dbclickDelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CWidgetManager::setupOptions()
|
void CWidgetManager::setupOptions()
|
||||||
{
|
{
|
||||||
|
@ -3165,9 +3167,9 @@ namespace NLGUI
|
||||||
_SystemOptions[OptionTimeoutContext]= opt->getValue("context_timeout");
|
_SystemOptions[OptionTimeoutContext]= opt->getValue("context_timeout");
|
||||||
_SystemOptions[OptionTimeoutContextHtml]= opt->getValue("context_html_timeout");
|
_SystemOptions[OptionTimeoutContextHtml]= opt->getValue("context_html_timeout");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the alpha roll over speed
|
// Get the alpha roll over speed
|
||||||
float CWidgetManager::getAlphaRolloverSpeed()
|
float CWidgetManager::getAlphaRolloverSpeed()
|
||||||
{
|
{
|
||||||
|
@ -3181,7 +3183,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
_AlphaRolloverSpeedDB = NULL;
|
_AlphaRolloverSpeedDB = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWidgetManager::setContainerAlpha(uint8 alpha)
|
void CWidgetManager::setContainerAlpha(uint8 alpha)
|
||||||
{
|
{
|
||||||
_ContainerAlpha = alpha;
|
_ContainerAlpha = alpha;
|
||||||
|
@ -3376,11 +3378,11 @@ namespace NLGUI
|
||||||
|
|
||||||
void CWidgetManager::selectWidget( const std::string &name )
|
void CWidgetManager::selectWidget( const std::string &name )
|
||||||
{
|
{
|
||||||
std::vector< std::string >::iterator itr
|
std::vector< std::string >::iterator itr
|
||||||
= std::find( editorSelection.begin(), editorSelection.end(), name );
|
= std::find( editorSelection.begin(), editorSelection.end(), name );
|
||||||
|
|
||||||
CInterfaceElement *e = getElementFromId( name );
|
CInterfaceElement *e = getElementFromId( name );
|
||||||
|
|
||||||
if( itr != editorSelection.end() )
|
if( itr != editorSelection.end() )
|
||||||
{
|
{
|
||||||
// If multiselection is on unselect if already selected
|
// If multiselection is on unselect if already selected
|
||||||
|
@ -3405,7 +3407,7 @@ namespace NLGUI
|
||||||
e->setEditorSelected( true );
|
e->setEditorSelected( true );
|
||||||
editorSelection.push_back( name );
|
editorSelection.push_back( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notifySelectionWatchers();
|
notifySelectionWatchers();
|
||||||
|
@ -3422,7 +3424,7 @@ namespace NLGUI
|
||||||
std::vector< IEditorSelectionWatcher* >::iterator itr = selectionWatchers.begin();
|
std::vector< IEditorSelectionWatcher* >::iterator itr = selectionWatchers.begin();
|
||||||
while( itr != selectionWatchers.end() )
|
while( itr != selectionWatchers.end() )
|
||||||
{
|
{
|
||||||
(*itr)->selectionChanged();
|
(*itr)->selectionChanged();
|
||||||
++itr;
|
++itr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3431,7 +3433,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
std::vector< IEditorSelectionWatcher* >::iterator itr =
|
std::vector< IEditorSelectionWatcher* >::iterator itr =
|
||||||
std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher );
|
std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher );
|
||||||
|
|
||||||
// We already have this watcher
|
// We already have this watcher
|
||||||
if( itr != selectionWatchers.end() )
|
if( itr != selectionWatchers.end() )
|
||||||
return;
|
return;
|
||||||
|
@ -3443,7 +3445,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
std::vector< IEditorSelectionWatcher* >::iterator itr =
|
std::vector< IEditorSelectionWatcher* >::iterator itr =
|
||||||
std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher );
|
std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher );
|
||||||
|
|
||||||
// We don't have this watcher
|
// We don't have this watcher
|
||||||
if( itr == selectionWatchers.end() )
|
if( itr == selectionWatchers.end() )
|
||||||
return;
|
return;
|
||||||
|
@ -3473,7 +3475,7 @@ namespace NLGUI
|
||||||
|
|
||||||
void CWidgetManager::registerWidgetWatcher( IWidgetWatcher *watcher )
|
void CWidgetManager::registerWidgetWatcher( IWidgetWatcher *watcher )
|
||||||
{
|
{
|
||||||
std::vector< IWidgetWatcher* >::const_iterator itr
|
std::vector< IWidgetWatcher* >::const_iterator itr
|
||||||
= std::find( widgetWatchers.begin(), widgetWatchers.end(), watcher );
|
= std::find( widgetWatchers.begin(), widgetWatchers.end(), watcher );
|
||||||
// already exists
|
// already exists
|
||||||
if( itr != widgetWatchers.end() )
|
if( itr != widgetWatchers.end() )
|
||||||
|
@ -3524,7 +3526,7 @@ namespace NLGUI
|
||||||
g->addView( v );
|
g->addView( v );
|
||||||
|
|
||||||
onWidgetAdded( v->getId() );
|
onWidgetAdded( v->getId() );
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3568,7 +3570,7 @@ namespace NLGUI
|
||||||
e->setParent( g );
|
e->setParent( g );
|
||||||
e->setParentPos( g );
|
e->setParentPos( g );
|
||||||
e->setParentSize( g );
|
e->setParentSize( g );
|
||||||
e->setIdRecurse( e->getShortId() );
|
e->setIdRecurse( e->getShortId() );
|
||||||
|
|
||||||
onWidgetMoved( oldId, e->getId() );
|
onWidgetMoved( oldId, e->getId() );
|
||||||
}
|
}
|
||||||
|
@ -3580,9 +3582,9 @@ namespace NLGUI
|
||||||
g->alignElements();
|
g->alignElements();
|
||||||
// Align the new group to the top window
|
// Align the new group to the top window
|
||||||
g->alignTo( getTopWindow() );
|
g->alignTo( getTopWindow() );
|
||||||
|
|
||||||
g->setActive( true );
|
g->setActive( true );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3634,7 +3636,7 @@ namespace NLGUI
|
||||||
|
|
||||||
SMasterGroup mg;
|
SMasterGroup mg;
|
||||||
mg.Group = root;
|
mg.Group = root;
|
||||||
|
|
||||||
root->setIdRecurse( project );
|
root->setIdRecurse( project );
|
||||||
root->setW( 1024 );
|
root->setW( 1024 );
|
||||||
root->setH( 768 );
|
root->setH( 768 );
|
||||||
|
@ -3666,7 +3668,7 @@ namespace NLGUI
|
||||||
VariableData v;
|
VariableData v;
|
||||||
v.type = "sint32";
|
v.type = "sint32";
|
||||||
v.value = "255";
|
v.value = "255";
|
||||||
|
|
||||||
v.entry = "UI:SAVE:COLOR:R";
|
v.entry = "UI:SAVE:COLOR:R";
|
||||||
parser->setVariable( v );
|
parser->setVariable( v );
|
||||||
|
|
||||||
|
@ -3678,7 +3680,7 @@ namespace NLGUI
|
||||||
|
|
||||||
v.entry = "UI:SAVE:COLOR:A";
|
v.entry = "UI:SAVE:COLOR:A";
|
||||||
parser->setVariable( v );
|
parser->setVariable( v );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ void xmlCheckNodeName (xmlNodePtr &node, const char *nodeName)
|
||||||
// Make an error message
|
// Make an error message
|
||||||
char tmp[512];
|
char tmp[512];
|
||||||
smprintf (tmp, 512, "LogicStateMachine STATE_MACHINE XML Syntax error in block line %d, node %s should be %s",
|
smprintf (tmp, 512, "LogicStateMachine STATE_MACHINE XML Syntax error in block line %d, node %s should be %s",
|
||||||
(int)node->line, node->name, nodeName);
|
node ? (int)node->line:-1, node->name, nodeName);
|
||||||
|
|
||||||
nlinfo (tmp);
|
nlinfo (tmp);
|
||||||
nlstop;
|
nlstop;
|
||||||
|
|
|
@ -700,6 +700,9 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m
|
||||||
# endif
|
# endif
|
||||||
abort();
|
abort();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no more sent mail for crash
|
// no more sent mail for crash
|
||||||
|
|
|
@ -784,7 +784,7 @@ bool NLPACS::CGlobalRetriever::buildInstance(const string &id, const NLMISC::C
|
||||||
const CRetrieverInstance &instance = makeInstance(retrieverId, 0, CVector(position));
|
const CRetrieverInstance &instance = makeInstance(retrieverId, 0, CVector(position));
|
||||||
|
|
||||||
// check make instance success
|
// check make instance success
|
||||||
if (&instance == NULL || instance.getInstanceId() == -1 || instance.getRetrieverId() != retrieverId)
|
if (instance.getInstanceId() == -1 || instance.getRetrieverId() != retrieverId)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// links new instance to its neighbors
|
// links new instance to its neighbors
|
||||||
|
|
|
@ -1950,8 +1950,14 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera)
|
||||||
nlctassert(CHARACTERISTICS::NUM_CHARACTERISTICS==8);
|
nlctassert(CHARACTERISTICS::NUM_CHARACTERISTICS==8);
|
||||||
for (uint i=0; i<CHARACTERISTICS::NUM_CHARACTERISTICS; ++i)
|
for (uint i=0; i<CHARACTERISTICS::NUM_CHARACTERISTICS; ++i)
|
||||||
{
|
{
|
||||||
NLMISC::CCDBNodeLeaf *node = _CurrentPlayerCharacLeaf[i] ? &*_CurrentPlayerCharacLeaf[i]
|
if (!_CurrentPlayerCharacLeaf[i])
|
||||||
: &*(_CurrentPlayerCharacLeaf[i] = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:CHARACTERISTICS%d:VALUE", i), false));
|
_CurrentPlayerCharacLeaf[i] = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:CHARACTERISTICS%d:VALUE", i), false);
|
||||||
|
|
||||||
|
NLMISC::CCDBNodeLeaf *node = NULL;
|
||||||
|
|
||||||
|
if (_CurrentPlayerCharacLeaf[i])
|
||||||
|
node = &*_CurrentPlayerCharacLeaf[i];
|
||||||
|
|
||||||
_CurrentPlayerCharac[i] = node ? node->getValue32() : 0;
|
_CurrentPlayerCharac[i] = node ? node->getValue32() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -923,7 +923,7 @@ void CInterfaceChatDisplayer::displayTell(/*TDataSetIndex senderIndex, */const u
|
||||||
bool windowVisible;
|
bool windowVisible;
|
||||||
|
|
||||||
ucstring goodSenderName = CEntityCL::removeTitleAndShardFromName(senderName);
|
ucstring goodSenderName = CEntityCL::removeTitleAndShardFromName(senderName);
|
||||||
|
|
||||||
// The sender part is up to and including the first ":" after the goodSenderName
|
// The sender part is up to and including the first ":" after the goodSenderName
|
||||||
ucstring::size_type pos = finalString.find(goodSenderName);
|
ucstring::size_type pos = finalString.find(goodSenderName);
|
||||||
pos = finalString.find(':', pos);
|
pos = finalString.find(':', pos);
|
||||||
|
@ -3288,7 +3288,7 @@ private:
|
||||||
contentStr = "";
|
contentStr = "";
|
||||||
i = digitStart;
|
i = digitStart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(contentStr.size()>=5 && contentStr[0]=='@' && contentStr[1]=='{' && contentStr[2]=='W')
|
else if(contentStr.size()>=5 && contentStr[0]=='@' && contentStr[1]=='{' && contentStr[2]=='W')
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
|
@ -3883,30 +3883,67 @@ bool CNetManager::update()
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
if (im)
|
if (im)
|
||||||
{
|
{
|
||||||
CCDBNodeLeaf *node = m_PingLeaf ? &*m_PingLeaf
|
CCDBNodeLeaf *node = NULL;
|
||||||
: &*(m_PingLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PING", false));
|
|
||||||
if (node)
|
if (!m_PingLeaf)
|
||||||
node->setValue32(getPing());
|
m_PingLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PING", false);
|
||||||
node = m_UploadLeaf ? &*m_UploadLeaf
|
|
||||||
: &*(m_UploadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:UPLOAD", false));
|
if (m_PingLeaf)
|
||||||
if (node)
|
{
|
||||||
node->setValue32((sint32)(getMeanUpload()*1024.f/8.f));
|
node = &*m_PingLeaf;
|
||||||
node = m_DownloadLeaf ? &*m_DownloadLeaf
|
if (node)
|
||||||
: &*(m_DownloadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DOWNLOAD", false));
|
node->setValue32(getPing());
|
||||||
if (node)
|
}
|
||||||
node->setValue32((sint32)(getMeanDownload()*1024.f/8.f));
|
|
||||||
node = m_PacketLostLeaf ? &* m_PacketLostLeaf
|
if (!m_UploadLeaf)
|
||||||
: &*(m_PacketLostLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PACKETLOST", false));
|
m_UploadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:UPLOAD", false);
|
||||||
if (node)
|
|
||||||
node->setValue32((sint32)getMeanPacketLoss());
|
if (m_UploadLeaf)
|
||||||
node = m_ServerStateLeaf ? &*m_ServerStateLeaf
|
{
|
||||||
: &*(m_ServerStateLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SERVERSTATE", false));
|
node = &*m_UploadLeaf;
|
||||||
if (node)
|
if (node)
|
||||||
node->setValue32((sint32)getConnectionState());
|
node->setValue32((sint32)(getMeanUpload()*1024.f/8.f));
|
||||||
node = m_ConnectionQualityLeaf ? &*m_ConnectionQualityLeaf
|
}
|
||||||
: &*(m_ConnectionQualityLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CONNECTION_QUALITY", false));
|
|
||||||
if (node)
|
if (!m_DownloadLeaf)
|
||||||
node->setValue32((sint32)getConnectionQuality());
|
m_DownloadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DOWNLOAD", false);
|
||||||
|
|
||||||
|
if (m_DownloadLeaf)
|
||||||
|
{
|
||||||
|
node = &*m_DownloadLeaf;
|
||||||
|
if (node)
|
||||||
|
node->setValue32((sint32)(getMeanDownload()*1024.f/8.f));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_PacketLostLeaf)
|
||||||
|
m_PacketLostLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PACKETLOST", false);
|
||||||
|
|
||||||
|
if (m_PacketLostLeaf)
|
||||||
|
{
|
||||||
|
node = &*m_PacketLostLeaf;
|
||||||
|
if (node)
|
||||||
|
node->setValue32((sint32)getMeanPacketLoss());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_ServerStateLeaf)
|
||||||
|
m_ServerStateLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SERVERSTATE", false);
|
||||||
|
|
||||||
|
if (m_ServerStateLeaf)
|
||||||
|
{
|
||||||
|
node = &*m_ServerStateLeaf;
|
||||||
|
if (node)
|
||||||
|
node->setValue32((sint32)getConnectionState());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_ConnectionQualityLeaf)
|
||||||
|
m_ConnectionQualityLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CONNECTION_QUALITY", false);
|
||||||
|
|
||||||
|
if (m_ConnectionQualityLeaf)
|
||||||
|
{
|
||||||
|
node = &*m_ConnectionQualityLeaf;
|
||||||
|
if (node)
|
||||||
|
node->setValue32((sint32)getConnectionQuality());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,7 @@ bool CSkyObject::setup(const CClientDate &date, const CClientDate &animationDate
|
||||||
for(uint k = 0; k < SKY_MAX_NUM_STAGE; ++k)
|
for(uint k = 0; k < SKY_MAX_NUM_STAGE; ++k)
|
||||||
{
|
{
|
||||||
if (TexPanner[k].U != 0.f || TexPanner[k].V != 0.f ||
|
if (TexPanner[k].U != 0.f || TexPanner[k].V != 0.f ||
|
||||||
OffsetUBitmap != NULL || OffsetVBitmap != NULL )
|
OffsetUBitmap[k] != NULL || OffsetVBitmap[k] != NULL )
|
||||||
{
|
{
|
||||||
//nlinfo("global date = %f", animTime);
|
//nlinfo("global date = %f", animTime);
|
||||||
// there's tex panning for that stage
|
// there's tex panning for that stage
|
||||||
|
|
|
@ -425,7 +425,8 @@ inline void CCallStackSingleton::setTopStackEntry(ICallStackEntry* newEntry)
|
||||||
inline void CCallStackSingleton::display(NLMISC::CLog *log)
|
inline void CCallStackSingleton::display(NLMISC::CLog *log)
|
||||||
{
|
{
|
||||||
nlassert(log!=NULL);
|
nlassert(log!=NULL);
|
||||||
getTopStackEntry()->displayStack(*log);
|
ICallStackEntry *entry = getTopStackEntry();
|
||||||
|
if (entry) entry->displayStack(*log);
|
||||||
log->displayNL("");
|
log->displayNL("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,15 +469,13 @@ inline ICallStackEntry::~ICallStackEntry()
|
||||||
inline void ICallStackEntry::displayStack(NLMISC::CLog& log) const
|
inline void ICallStackEntry::displayStack(NLMISC::CLog& log) const
|
||||||
{
|
{
|
||||||
// stop recursing when we reach a NULL object
|
// stop recursing when we reach a NULL object
|
||||||
// (this is implemented in this way in order to ximplify call code)
|
// (this is implemented in this way in order to simplify call code)
|
||||||
if (this==NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// display this entry
|
// display this entry
|
||||||
displayEntry(log);
|
displayEntry(log);
|
||||||
|
|
||||||
// recurse through call stack
|
// recurse through call stack
|
||||||
_Next->displayStack(log);
|
if (_Next) _Next->displayStack(log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue