mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 13:01:41 +00:00
MODIFIED: Draw the highlight of the currently selected widget in editor mode.
This commit is contained in:
parent
8af3618cbf
commit
836f3c9c2c
5 changed files with 19 additions and 3 deletions
|
@ -424,6 +424,8 @@ namespace NLGUI
|
||||||
|
|
||||||
void drawHotSpot(THotSpot hs, NLMISC::CRGBA col);
|
void drawHotSpot(THotSpot hs, NLMISC::CRGBA col);
|
||||||
|
|
||||||
|
void drawHighlight();
|
||||||
|
|
||||||
// Returns 'true' if that element can be downcasted to a view
|
// Returns 'true' if that element can be downcasted to a view
|
||||||
virtual bool isView() const { return false; }
|
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))
|
if( !editorMode && (lastOver == false) && (_AHOnOver != NULL))
|
||||||
|
|
|
@ -774,8 +774,7 @@ namespace NLGUI
|
||||||
CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft();
|
CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft();
|
||||||
|
|
||||||
// *** Draw Over
|
// *** Draw Over
|
||||||
if( editorSelected ||
|
if( ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
|
||||||
( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if( !editorMode && (lastOver == false) && (_AHOnOver != NULL) )
|
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()
|
void CInterfaceElement::invalidateContent()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2056,6 +2056,16 @@ namespace NLGUI
|
||||||
getPointer()->draw ();
|
getPointer()->draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( CInterfaceElement::getEditorMode() )
|
||||||
|
{
|
||||||
|
if( !currentEditorSelection.empty() )
|
||||||
|
{
|
||||||
|
CInterfaceElement *e = getElementFromId( currentEditorSelection );
|
||||||
|
if( e != NULL )
|
||||||
|
e->drawHighlight();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// flush layers
|
// flush layers
|
||||||
CViewRenderer::getInstance()->flush();
|
CViewRenderer::getInstance()->flush();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue