MODIFIED: Draw the highlight of the currently selected widget in editor mode.

--HG--
branch : gsoc2012-gui-editor
hg/feature/sse2
dfighter1985 12 years ago
parent 532a3ef7d3
commit aa2affa158

@ -424,6 +424,8 @@ namespace NLGUI
void drawHotSpot(THotSpot hs, NLMISC::CRGBA col);
void drawHighlight();
// Returns 'true' if that element can be downcasted to a view
virtual bool isView() const { return false; }

@ -357,7 +357,7 @@ namespace NLGUI
if ( ( _Over && !editorMode ) || editorSelected )
if ( ( _Over && !editorMode ) )
{
if( !editorMode && (lastOver == false) && (_AHOnOver != NULL))

@ -774,8 +774,7 @@ namespace NLGUI
CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft();
// *** Draw Over
if( editorSelected ||
( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
if( ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
)
{
if( !editorMode && (lastOver == false) && (_AHOnOver != NULL) )

@ -1300,6 +1300,11 @@ namespace NLGUI
}
void CInterfaceElement::drawHighlight()
{
CViewRenderer::getInstance()->drawWiredQuad( _XReal, _YReal, _WReal, _HReal );
}
// ***************************************************************************
void CInterfaceElement::invalidateContent()
{

@ -2056,6 +2056,16 @@ namespace NLGUI
getPointer()->draw ();
}
if( CInterfaceElement::getEditorMode() )
{
if( !currentEditorSelection.empty() )
{
CInterfaceElement *e = getElementFromId( currentEditorSelection );
if( e != NULL )
e->drawHighlight();
}
}
// flush layers
CViewRenderer::getInstance()->flush();

Loading…
Cancel
Save