Changed: Minor changes

This commit is contained in:
kervala 2015-12-26 14:00:39 +01:00
parent 0286ac2270
commit 80ec8e4321
5 changed files with 29 additions and 29 deletions

View file

@ -169,7 +169,7 @@ namespace NLGUI
/* /*
* getScreenSize : get the screen window size changed (at last checkNewScreenSize called) * getScreenSize : get the screen window size changed (at last checkNewScreenSize called)
*/ */
void getScreenSize (uint32 &w, uint32 &h); void getScreenSize(uint32 &w, uint32 &h);
/* /*
* get OOW / OOH * get OOW / OOH

View file

@ -64,7 +64,7 @@ namespace NLGUI
rVR.getClipWindow(x, y, w, h); rVR.getClipWindow(x, y, w, h);
uint32 sw, sh; uint32 sw, sh;
rVR.getScreenSize(sw, sh); rVR.getScreenSize(sw, sh);
rVR.setClipWindow(0, 0, (sint32) sw, (sint32) sh); rVR.setClipWindow(0, 0, (sint32)sw, (sint32)sh);
rVR.drawRotFlipBitmap (renderLayer, xreal, yreal, wreal, hreal, 0, false, rVR.getBlankTextureId(), color ); rVR.drawRotFlipBitmap (renderLayer, xreal, yreal, wreal, hreal, 0, false, rVR.getBlankTextureId(), color );
rVR.setClipWindow(x, y, w ,h); rVR.setClipWindow(x, y, w ,h);
} }
@ -350,7 +350,7 @@ namespace NLGUI
{ {
if (_ResizerPos & Hotspot_xR) if (_ResizerPos & Hotspot_xR)
{ {
clippedNewW = std::min((sint32) sw + _Parent->getW() - _Parent->getXReal(), clippedNewW); clippedNewW = std::min((sint32)sw + _Parent->getW() - _Parent->getXReal(), clippedNewW);
} }
else else
{ {
@ -365,7 +365,7 @@ namespace NLGUI
} }
else else
{ {
clippedNewW = std::min((sint32) sw - _Parent->getXReal(), clippedNewW); clippedNewW = std::min((sint32)sw - _Parent->getXReal(), clippedNewW);
} }
} }
// //

View file

@ -764,7 +764,7 @@ namespace NLGUI
} }
// Resize the array // Resize the array
if (column>=_Columns.size()) if (column >= _Columns.size())
_Columns.resize(column+1); _Columns.resize(column+1);
// Handle rowspan from previous row // Handle rowspan from previous row
@ -773,7 +773,7 @@ namespace NLGUI
_Columns[column].RowSpan--; _Columns[column].RowSpan--;
column++; column++;
// if previous row had less <TD> elements, then we missing columns // if previous row had less <TD> elements, then we missing columns
if (column>=_Columns.size()) if (column >= _Columns.size())
_Columns.resize(column+1); _Columns.resize(column+1);
} }

View file

@ -1790,13 +1790,13 @@ namespace NLGUI
for (uint nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++) for (uint nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
{ {
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup]; CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
if(!rMG.Group || rMG.Group->getId()!="ui:interface") if (!rMG.Group || rMG.Group->getId() != "ui:interface")
continue; continue;
// For all priorities, but the worldspace one // For all priorities, but the worldspace one
for (uint8 nPriority = 0; nPriority < WIN_PRIORITY_MAX; nPriority++) for (uint8 nPriority = 0; nPriority < WIN_PRIORITY_MAX; nPriority++)
{ {
if(nPriority==WIN_PRIORITY_WORLD_SPACE) if (nPriority==WIN_PRIORITY_WORLD_SPACE)
continue; continue;
// For All windows (only layer 0 group container) // For All windows (only layer 0 group container)
@ -1972,7 +1972,7 @@ namespace NLGUI
if(w!=0 && h!=0 && !CViewRenderer::getInstance()->isMinimized()) if(w!=0 && h!=0 && !CViewRenderer::getInstance()->isMinimized())
{ {
updateAllLocalisedElements (); updateAllLocalisedElements ();
setScreenWH( w, h ); setScreenWH(w, h);
} }
} }
@ -2075,18 +2075,18 @@ namespace NLGUI
} }
// Draw the pointer and DND Item // Draw the pointer and DND Item
if( getPointer() != NULL) if (getPointer() != NULL)
{ {
if ( getPointer()->getActive()) if (getPointer()->getActive())
getPointer()->draw (); getPointer()->draw ();
} }
if( CInterfaceElement::getEditorMode() ) if (CInterfaceElement::getEditorMode())
{ {
for( int i = 0; i < editorSelection.size(); i++ ) for( int i = 0; i < editorSelection.size(); i++ )
{ {
CInterfaceElement *e = getElementFromId( editorSelection[ i ] ); CInterfaceElement *e = getElementFromId(editorSelection[i]);
if( e != NULL ) if (e != NULL)
e->drawHighlight(); e->drawHighlight();
} }
} }
@ -3541,9 +3541,9 @@ namespace NLGUI
// Resolve the widget names // Resolve the widget names
for( int i = 0; i < editorSelection.size(); i++ ) for( int i = 0; i < editorSelection.size(); i++ )
{ {
CInterfaceElement *e = getElementFromId( editorSelection[ i ] ); CInterfaceElement *e = getElementFromId(editorSelection[i]);
if( e != NULL ) if (e != NULL)
elms.push_back( e ); elms.push_back(e);
} }
editorSelection.clear(); editorSelection.clear();
@ -3564,19 +3564,19 @@ namespace NLGUI
// Reparent the widgets to the new group // Reparent the widgets to the new group
for( int i = 0; i < elms.size(); i++ ) for( int i = 0; i < elms.size(); i++ )
{ {
CInterfaceElement *e = elms[ i ]; CInterfaceElement *e = elms[i];
oldId = e->getId(); oldId = e->getId();
CInterfaceGroup *p = e->getParent(); CInterfaceGroup *p = e->getParent();
if( p != NULL ) if (p != NULL)
p->takeElement( e ); p->takeElement(e);
g->addElement( e ); g->addElement(e);
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());
} }
elms.clear(); elms.clear();
@ -3724,7 +3724,7 @@ namespace NLGUI
_MouseOverWindow = false; _MouseOverWindow = false;
inGame = false; inGame = false;
setScreenWH( 0, 0 ); setScreenWH(0, 0);
_GroupSelection = false; _GroupSelection = false;
multiSelection = false; multiSelection = false;

View file

@ -495,8 +495,8 @@ CInterfaceManager::CInterfaceManager()
CViewRenderer::getInstance()->checkNewScreenSize(); CViewRenderer::getInstance()->checkNewScreenSize();
{ {
uint32 w,h; uint32 w,h;
CViewRenderer::getInstance()->getScreenSize( w, h ); CViewRenderer::getInstance()->getScreenSize(w, h);
CWidgetManager::getInstance()->setScreenWH( w, h ); CWidgetManager::getInstance()->setScreenWH(w, h);
} }
CViewRenderer::getInstance()->init(); CViewRenderer::getInstance()->init();