mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-24 07:46:20 +00:00
MODIFIED: Draw the highlight of the currently selected widget in editor mode.
This commit is contained in:
parent
d84b4dcf14
commit
bf53503fc1
5 changed files with 19 additions and 3 deletions
|
@ -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…
Reference in a new issue